created media queries

This commit is contained in:
Yusuf Ipek
2021-05-11 15:08:09 +03:00
parent 5b8f1751b7
commit 4bba618d56
6 changed files with 125 additions and 6 deletions
+9 -3
View File
@@ -29,9 +29,15 @@
/// $breakpoints: ('phone': 320px); /// $breakpoints: ('phone': 320px);
/// ///
$breakpoints: ( $breakpoints: (
"phone": 320px, "smallest": 31.25em,
"tablet": 768px, "small": 37.5em,
"desktop": 1024px, // 600px
"medium": 56.25em,
// 900px
"large": 68.75em,
// 1100px
"largest": 75em,
// 1200 px
) !default; ) !default;
/// ///
+4
View File
@@ -8,6 +8,10 @@
html { html {
font-size: 62.5%; // 1 rem = 10px; 10px/16px = 62.5% (16 is default browser font size) font-size: 62.5%; // 1 rem = 10px; 10px/16px = 62.5% (16 is default browser font size)
@include media("<large") {
font-size: 50%;
}
} }
body { body {
+5
View File
@@ -10,6 +10,11 @@ body {
text-transform: uppercase; text-transform: uppercase;
letter-spacing: 1px; letter-spacing: 1px;
padding: 1.5rem 3rem; padding: 1.5rem 3rem;
@include media("<small") {
font-size: 1.8rem;
padding: 1.25rem 2rem;
}
} }
.paragraph:not(:last-of-type) { .paragraph:not(:last-of-type) {
+18 -1
View File
@@ -11,6 +11,10 @@
&__item { &__item {
flex: 0 0 50%; flex: 0 0 50%;
margin-bottom: 0.7rem; margin-bottom: 0.7rem;
@include media("<smallest") {
font-size: 1.3rem;
}
} }
&__item::before { &__item::before {
@@ -32,6 +36,10 @@
display: flex; display: flex;
align-items: center; align-items: center;
&__friends {
display: flex;
}
&__photo { &__photo {
box-sizing: content-box; box-sizing: content-box;
height: 4rem; height: 4rem;
@@ -40,7 +48,7 @@
border: 3px solid $color-white; border: 3px solid $color-white;
} }
&__photo:not(:last-child) { &__photo:not(:last-child) {
margin-right: -1.5rem; margin-right: -2rem;
} }
&__count { &__count {
@@ -57,6 +65,11 @@
position: relative; position: relative;
overflow: hidden; overflow: hidden;
@include media("<medium") {
padding: 2rem;
margin-bottom: 3rem;
}
&__text { &__text {
margin-bottom: 2rem; margin-bottom: 2rem;
z-index: 2; z-index: 2;
@@ -95,6 +108,10 @@
color: $color-primary; color: $color-primary;
font-size: 2.2rem; font-size: 2.2rem;
font-weight: 300; font-weight: 300;
@include media("<small") {
font-size: 0 1.5rem;
}
} }
&::before { &::before {
+28
View File
@@ -3,10 +3,20 @@
margin: 8rem auto; margin: 8rem auto;
background-color: $color-grey-light-2; background-color: $color-grey-light-2;
box-shadow: $shadow-blurry; box-shadow: $shadow-blurry;
@include media("<largest") {
margin: 0;
max-width: 100%;
width: 100%;
}
} }
.content { .content {
display: flex; display: flex;
@include media("<medium") {
flex-direction: column;
}
} }
.hotel-view { .hotel-view {
@@ -21,6 +31,14 @@
background-color: $color-grey-light-1; background-color: $color-grey-light-1;
border-bottom: $line; border-bottom: $line;
font-size: $normal-font-size; font-size: $normal-font-size;
@include media("<medium") {
padding: 3rem;
}
@include media("<small") {
flex-direction: column;
}
} }
.description { .description {
@@ -29,6 +47,16 @@
padding: 3rem; padding: 3rem;
flex: 0 0 60%; flex: 0 0 60%;
margin-right: 4.5rem; margin-right: 4.5rem;
@include media("<medium") {
padding: 2rem;
margin-right: 3rem;
}
@include media("<small") {
margin-right: 0;
margin-bottom: 3rem;
}
} }
.user-reviews { .user-reviews {
+61 -2
View File
@@ -6,6 +6,12 @@
display: flex; display: flex;
font-size: $normal-font-size; font-size: $normal-font-size;
@include media("<smallest") {
flex-wrap: wrap;
align-content: space-around;
height: 12rem;
}
// main axis // main axis
justify-content: space-between; justify-content: space-between;
@@ -24,6 +30,12 @@
align-items: center; align-items: center;
justify-content: center; justify-content: center;
@include media("<smallest") {
order: 1;
flex: 0 0 100%;
background-color: $color-grey-light-2;
}
&--input { &--input {
font-family: inherit; font-family: inherit;
font-size: inherit; font-size: inherit;
@@ -137,11 +149,21 @@
list-style: none; list-style: none;
margin-top: 3.5rem; margin-top: 3.5rem;
@include media("<medium") {
display: flex;
margin: 0;
}
&--item { &--item {
position: relative; position: relative;
&:not(:last-child) { &:not(:last-child) {
margin-bottom: 0.5rem; margin-bottom: 0.5rem;
@include media("<medium") {
flex: 1;
margin-bottom: 0;
}
} }
&::before { &::before {
@@ -180,6 +202,16 @@
display: flex; display: flex;
align-items: center; align-items: center;
@include media("<medium") {
justify-content: center;
padding: 2rem;
}
@include media("<small") {
flex-direction: column;
padding: 1.5rem 0.5rem;
}
} }
&--icon { &--icon {
@@ -187,6 +219,13 @@
height: 1.75rem; height: 1.75rem;
margin-right: 2rem; margin-right: 2rem;
fill: currentColor; fill: currentColor;
@include media("<small") {
margin-bottom: 0.7rem;
margin-right: 0;
width: 1.5rem;
height: 1.5rem;
}
} }
} }
@@ -195,6 +234,10 @@
color: $color-grey-light-4; color: $color-grey-light-4;
text-align: center; text-align: center;
padding: 2.5rem; padding: 2.5rem;
@include media("<medium") {
display: none;
}
} }
} }
@@ -245,17 +288,29 @@
align-items: center; align-items: center;
justify-content: center; justify-content: center;
flex-direction: column; flex-direction: column;
@include media("<small") {
padding: 0 1.5rem;
}
} }
&__rating-average { &__rating-average {
font-size: 2.25rem; font-size: 2.25rem;
font-weight: 300; font-weight: 300;
margin-bottom: -4px; margin-bottom: -3px;
@include media("<small") {
font-size: 1.8rem;
}
} }
&__rating-count { &__rating-count {
font-size: $small-font-size; font-size: 1rem;
text-transform: uppercase; text-transform: uppercase;
@include media("<smallest") {
display: none;
}
} }
} }
@@ -263,6 +318,10 @@
padding: 3.5rem 0; padding: 3.5rem 0;
text-align: center; text-align: center;
@include media("<medium") {
padding: 2.5rem 0;
}
&__book-now { &__book-now {
font-size: 1.5rem; font-size: 1.5rem;
font-weight: 300; font-weight: 300;