Skip to content

Commit 92c9fc5

Browse files
committed
Replace sass misc variables with css custom variables
1 parent 2e8690a commit 92c9fc5

16 files changed

Lines changed: 35 additions & 37 deletions

scss/_body.scss

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ body {
55
padding-inline: var(--space3);
66
font-family: 'Source Sans', Arial, sans-serif;
77
font-weight: 400;
8-
line-height: $line-height0;
8+
line-height: var(--line-height0);
99

1010
@include screen1 {
1111
max-width: 1400px;

scss/_button.scss

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -59,7 +59,7 @@
5959
@extend %o-button;
6060
gap: var(--space2);
6161
border: 2px solid rgb(var(--color-white));
62-
border-radius: $round-corner;
62+
border-radius: 3px;
6363
background-color: rgb(var(--color-blue));
6464
color: rgb(var(--color-white));
6565

scss/_categories.scss

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,7 @@
11
// ***** Categories Component ***** //
22

3+
// The --details-summary-left-space variable used below is defined in _variables.scss and also used in _details.scss to align the disclosure widget arrows and list items.
4+
35
.c-categories {
46
@include u-reset-list-styles;
57

@@ -26,12 +28,12 @@
2628
}
2729

2830
li li {
29-
padding-inline-start: $details-summary-left-space * 2;
31+
padding-inline-start: calc(var(--details-summary-left-space) * 2);
3032
}
3133

3234
> li > a {
3335
display: block;
34-
margin-inline-start: $details-summary-left-space;
36+
margin-inline-start: var(--details-summary-left-space);
3537
}
3638

3739
details {

scss/_details.scss

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
// ***** Details Object ***** //
22

3-
// $details-summary-left-space variable is defined in _variables and used in categories component to align the disclosure widget arrows and list items.
3+
// The --details-summary-left-space variable used below is defined in _variables.scss and also used in _categories.scss to align the disclosure widget arrows and list items.
44

55
details {
66
margin-bottom: var(--space2);
@@ -13,9 +13,9 @@ details {
1313
&::before {
1414
content: '';
1515
flex: none;
16-
block-size: calc($details-summary-left-space / 1.5);
17-
inline-size: calc($details-summary-left-space / 1.5);
18-
margin-inline: calc($details-summary-left-space / 6);
16+
block-size: calc(var(--details-summary-left-space) / 1.5);
17+
inline-size: calc(var(--details-summary-left-space) / 1.5);
18+
margin-inline: calc(var(--details-summary-left-space) / 6);
1919
background-color: rgb(var(--color-blue));
2020
mask-repeat: no-repeat;
2121
mask-size: 0.9rem;
@@ -34,7 +34,7 @@ details {
3434
summary {
3535

3636
&::before {
37-
margin-inline: 0 calc($details-summary-left-space / 3);
37+
margin-inline: 0 calc(var(--details-summary-left-space) / 3);
3838
mask-size: 1.4rem;
3939
mask-image: url('data-url:../icons/caret-down.svg');
4040
}

scss/_figure.scss

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ figure {
1717
padding-left: 0.5em;
1818
font-size: 0.9em;
1919
font-style: italic;
20-
line-height: $line-height1;
20+
line-height: var(--line-height1);
2121
}
2222

2323
}

scss/_headernav.scss

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -73,7 +73,7 @@
7373
border-bottom: 1px solid rgb(var(--color-gray));
7474
border-left: 1px solid rgb(var(--color-gray));
7575
background-color: rgb(var(--color-light-gray));
76-
box-shadow: $box-shadow;
76+
box-shadow: 3px 3px 3px rgb(var(--color-gray));
7777
}
7878

7979
// Panel columns (no columns, by default). These are set via 'columns-[#]' classes defined in the top-level menu items within WP Menus:

scss/_home.scss

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@
3939
'servicebox meet'
4040
'newsreel social'
4141
'footer footer'
42-
/ 1fr $sidebar-width;
42+
/ 1fr var(--sidebar-width);
4343
}
4444

4545
// This class used only to highlight the grid in layout4.hbs:

scss/_layout2.scss

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@
2121
'layout2c layout2d' 1fr
2222
'........ layout2e'
2323
'layout2f layout2f'
24-
/ $sidebar-width 1fr;
24+
/ var(--sidebar-width) 1fr;
2525
}
2626

2727
@media print {

scss/_layout3.scss

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@
2424
'layout3c layout3e'
2525
'........ layout3f'
2626
'layout3g layout3g'
27-
/ $sidebar-width 1fr;
27+
/ var(--sidebar-width) 1fr;
2828
}
2929

3030
@include screen3 {
@@ -34,7 +34,7 @@
3434
'layout3c layout3d layout3e' 1fr
3535
'........ layout3f ........'
3636
'layout3g layout3g layout3g'
37-
/ $sidebar-width 1fr $sidebar-width;
37+
/ var(--sidebar-width) 1fr var(--sidebar-width);
3838
}
3939

4040
@media print {

scss/_layout4.scss

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@
2121
'layout4c layout4d'
2222
'layout4c layout4e' 1fr
2323
'layout4f layout4f'
24-
/ 1fr $sidebar-width;
24+
/ 1fr var(--sidebar-width);
2525
}
2626

2727
@media print {

0 commit comments

Comments
 (0)