Skip to content

Commit 1650bec

Browse files
committed
Apply rem-calc function to appropriate pixel units
1 parent c88f32d commit 1650bec

File tree

4 files changed

+18
-18
lines changed

4 files changed

+18
-18
lines changed

assets/_sass/base/_helpers.scss

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,7 @@
5454
.logo {
5555
vertical-align: middle;
5656
width: 100%;
57-
max-width: 130px;
57+
max-width: rem-calc(130px);
5858
}
5959

6060
// Dark version of logo

assets/_sass/base/_layout.scss

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,9 +3,9 @@
33
////////////////////
44

55
// Container padding
6-
$cp-sm: 15px;
6+
$cp-sm: rem-calc(15px);
77
$cp-md: 5%;
8-
$cp-lg: 75px;
8+
$cp-lg: rem-calc(75px);
99

1010
// Max site width
1111
$max-width: 1440px;

assets/_sass/component/_hamburger-button.scss

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,8 @@
22
// Variables
33
////////////////////
44

5-
$width: 20px;
6-
$height: 2px;
5+
$width: rem-calc(20px);
6+
$height: rem-calc(2px);
77

88
////////////////////
99
// Hamburger Button
@@ -21,7 +21,7 @@ $height: 2px;
2121
position: absolute;
2222
display: block;
2323
right: 0;
24-
width: $width - 3px;
24+
width: $width - rem-calc(3px);
2525
height: $height;
2626
background-color: $teal;
2727
border-radius: $height;
@@ -35,21 +35,21 @@ $height: 2px;
3535
}
3636

3737
.hamburger:before {
38-
top: -7px;
38+
top: rem-calc(-7px);
3939
}
4040

4141
.hamburger:after {
42-
top: 7px;
42+
top: rem-calc(7px);
4343
}
4444

4545
.active .hamburger:before {
46-
transform: translateX(3px) rotate(45deg);
46+
transform: translateX(rem-calc(3px)) rotate(45deg);
4747
}
4848

4949
.active .hamburger__inner {
5050
opacity: 0;
5151
}
5252

5353
.active .hamburger:after {
54-
transform: translateX(3px) rotate(-45deg);
54+
transform: translateX(rem-calc(3px)) rotate(-45deg);
5555
}

assets/_sass/component/_navigation.scss

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,8 @@
22
// Variables
33
////////////////////
44

5-
$nav-height-sm: 60px;
6-
$nav-height-lg: 80px;
5+
$nav-height-sm: rem-calc(60px);
6+
$nav-height-lg: rem-calc(80px);
77
$nav-zindex: 10;
88

99
////////////////////
@@ -33,7 +33,7 @@ $nav-zindex: 10;
3333

3434
.nav .logo {
3535
@media(max-width: $bp-md) {
36-
max-width: 105px;
36+
max-width: rem-calc(105px);
3737
}
3838
}
3939

@@ -61,7 +61,7 @@ $nav-zindex: 10;
6161
bottom: 0;
6262
left: 0;
6363
height: calc(100vh - #{$nav-height-sm});
64-
padding: 20px $cp-sm;
64+
padding: rem-calc(20px) $cp-sm;
6565
background-color: $teal;
6666
display: flex;
6767
flex-direction: column;
@@ -90,23 +90,23 @@ $nav-zindex: 10;
9090
&:not(:last-of-type) {
9191

9292
@media (min-width: $bp-md) {
93-
margin-right: 20px;
93+
margin-left: rem-calc(20px);
9494
}
9595

9696
@media (min-width: $bp-lg) {
97-
margin-right: 40px;
97+
margin-left: rem-calc(40px);
9898
}
9999
}
100100
}
101101

102102
.nav-list__link {
103103
display: block;
104-
padding: 20px 10px;
104+
padding: rem-calc(20px 10px);
105105
color: $white;
106106

107107
@media (min-width: $bp-md) {
108108
display: inline;
109-
padding: 10px 0;
109+
padding: rem-calc(10px 0);
110110
color: $slate-600;
111111

112112
&:hover,

0 commit comments

Comments
 (0)