Skip to content

Commit 4e4930e

Browse files
authored
chore(styles): omit sass deprecation warnings (jackyzha0#1737)
update to newer API
1 parent 01943ff commit 4e4930e

File tree

2 files changed

+25
-20
lines changed

2 files changed

+25
-20
lines changed

quartz/styles/base.scss

+19-16
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
@use "sass:map";
2+
13
@use "./variables.scss" as *;
24
@use "./syntax.scss";
35
@use "./callouts.scss";
@@ -121,7 +123,7 @@ a {
121123
}
122124

123125
.page {
124-
max-width: calc(#{map-get($breakpoints, desktop)} + 300px);
126+
max-width: calc(#{map.get($breakpoints, desktop)} + 300px);
125127
margin: 0 auto;
126128
& article {
127129
& > h1 {
@@ -151,24 +153,25 @@ a {
151153

152154
& > #quartz-body {
153155
display: grid;
154-
grid-template-columns: #{map-get($desktopGrid, templateColumns)};
155-
grid-template-rows: #{map-get($desktopGrid, templateRows)};
156-
column-gap: #{map-get($desktopGrid, columnGap)};
157-
row-gap: #{map-get($desktopGrid, rowGap)};
158-
grid-template-areas: #{map-get($desktopGrid, templateAreas)};
156+
grid-template-columns: #{map.get($desktopGrid, templateColumns)};
157+
grid-template-rows: #{map.get($desktopGrid, templateRows)};
158+
column-gap: #{map.get($desktopGrid, columnGap)};
159+
row-gap: #{map.get($desktopGrid, rowGap)};
160+
grid-template-areas: #{map.get($desktopGrid, templateAreas)};
161+
159162
@media all and ($tablet) {
160-
grid-template-columns: #{map-get($tabletGrid, templateColumns)};
161-
grid-template-rows: #{map-get($tabletGrid, templateRows)};
162-
column-gap: #{map-get($tabletGrid, columnGap)};
163-
row-gap: #{map-get($tabletGrid, rowGap)};
164-
grid-template-areas: #{map-get($tabletGrid, templateAreas)};
163+
grid-template-columns: #{map.get($tabletGrid, templateColumns)};
164+
grid-template-rows: #{map.get($tabletGrid, templateRows)};
165+
column-gap: #{map.get($tabletGrid, columnGap)};
166+
row-gap: #{map.get($tabletGrid, rowGap)};
167+
grid-template-areas: #{map.get($tabletGrid, templateAreas)};
165168
}
166169
@media all and ($mobile) {
167-
grid-template-columns: #{map-get($mobileGrid, templateColumns)};
168-
grid-template-rows: #{map-get($mobileGrid, templateRows)};
169-
column-gap: #{map-get($mobileGrid, columnGap)};
170-
row-gap: #{map-get($mobileGrid, rowGap)};
171-
grid-template-areas: #{map-get($mobileGrid, templateAreas)};
170+
grid-template-columns: #{map.get($mobileGrid, templateColumns)};
171+
grid-template-rows: #{map.get($mobileGrid, templateRows)};
172+
column-gap: #{map.get($mobileGrid, columnGap)};
173+
row-gap: #{map.get($mobileGrid, rowGap)};
174+
grid-template-areas: #{map.get($mobileGrid, templateAreas)};
172175
}
173176

174177
@media all and not ($desktop) {

quartz/styles/variables.scss

+6-4
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
@use "sass:map";
2+
13
/**
24
* Layout breakpoints
35
* $mobile: screen width below this value will use mobile styles
@@ -10,11 +12,11 @@ $breakpoints: (
1012
desktop: 1200px,
1113
);
1214

13-
$mobile: "(max-width: #{map-get($breakpoints, mobile)})";
14-
$tablet: "(min-width: #{map-get($breakpoints, mobile)}) and (max-width: #{map-get($breakpoints, desktop)})";
15-
$desktop: "(min-width: #{map-get($breakpoints, desktop)})";
15+
$mobile: "(max-width: #{map.get($breakpoints, mobile)})";
16+
$tablet: "(min-width: #{map.get($breakpoints, mobile)}) and (max-width: #{map.get($breakpoints, desktop)})";
17+
$desktop: "(min-width: #{map.get($breakpoints, desktop)})";
1618

17-
$pageWidth: #{map-get($breakpoints, mobile)};
19+
$pageWidth: #{map.get($breakpoints, mobile)};
1820
$sidePanelWidth: 320px; //380px;
1921
$topSpacing: 6rem;
2022
$boldWeight: 700;

0 commit comments

Comments
 (0)