Skip to content

Commit 0aef07c

Browse files
author
Edward
committed
Revert "OEI-70 ginger foundation (#744)"
This reverts commit f0fe2f4.
1 parent 30c9991 commit 0aef07c

File tree

5 files changed

+17
-12
lines changed

5 files changed

+17
-12
lines changed

modules/mod_ginger_foundation/lib/css/src/_base.scss

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -133,7 +133,7 @@ h3 {
133133
@include size(margin-bottom, 0);
134134
}
135135

136-
@include mq(min-width, 900px) {
136+
@include mq(min-width, 900) {
137137
h1 {
138138
@include size(font-size, 41);
139139
@include size(line-height, 44);

modules/mod_ginger_foundation/lib/css/src/_mixins.scss

Lines changed: 13 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,11 @@
11
@use "sass:math";
22

3+
@function strip-unit($num) {
4+
@return math.div($num, $num * 0 + 1);
5+
}
6+
37
@function px-to-rem($value) {
4-
@return calc(#{$value} * 0.1);
8+
@return $value*0.1;
59
}
610

711
/* Takes sizes in pixels and outputs both the pixel and rem values for the given property */
@@ -11,10 +15,9 @@
1115
$remValues: '';
1216

1317
@for $i from 1 through $max {
14-
$value: nth($values, $i);
18+
$value: strip-unit(nth($values, $i));
1519
$pxValues: #{$pxValues + $value}px;
16-
$pxToRems: px-to-rem(#{$value}rem);
17-
$remValues: #{$remValues + $pxToRems};
20+
$remValues: #{$remValues + px-to-rem($value)}rem;
1821

1922
@if $i < $max {
2023
$pxValues: #{$pxValues + " "};
@@ -32,7 +35,9 @@
3235

3336
/* Creates a mediaquery based on property and size in pixels */
3437
@mixin mq($property, $size) {
35-
@media only screen and (#{$property}: $size ) {
38+
$value: strip-unit($size);
39+
40+
@media only screen and (#{$property}: #{$value}px ) {
3641
@content;
3742
}
3843
}
@@ -112,8 +117,8 @@
112117
&:before {
113118
content: '';
114119
display: inline-block;
115-
@include size(width, 15);
116-
@include size(height, 15);
120+
@include size(width, 15px);
121+
@include size(height, 15px);
117122
@include size(margin-right, 15);
118123
position: relative;
119124
top: 2px;
@@ -168,7 +173,7 @@
168173
display: block;
169174
content: "";
170175
width: 100%;
171-
padding-top: calc(#{$height} / #{$width} * 100%);
176+
padding-top: math.div($height, $width) * 100%;
172177
}
173178

174179
> div {

modules/mod_ginger_foundation/lib/css/src/blocks/_1page-actions-extends.scss

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
@include size(margin-bottom, 10);
44
}
55

6-
@include mq(min-width, 900px) {
6+
@include mq(min-width, 900) {
77
.page-action-elements {
88
margin-top: 0px;
99
@include size(margin-bottom, 10);

modules/mod_ginger_foundation/lib/css/src/layout/_global-nav.scss

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -297,7 +297,7 @@
297297
}
298298
}
299299

300-
@include mq(max-height, 500px) {
300+
@include mq(max-height, 500) {
301301
.is-open .global-nav__menu {
302302
height: calc(100% - (#{$globalNavHeight + $globalNavHeight}px));
303303
overflow-y: scroll;

modules/mod_ginger_foundation/lib/css/src/layout/_page-actions.scss

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@
2020
display: inline-block;
2121
}
2222

23-
@include mq(min-width, 900px) {
23+
@include mq(min-width, 900) {
2424
.page-actions__author {
2525
@include size(margin-bottom, 10);
2626
}

0 commit comments

Comments
 (0)