Skip to content

Commit bb0daae

Browse files
authored
fix: fix sass v16 deprecation warnings (#858)
1 parent baa9310 commit bb0daae

File tree

4 files changed

+35
-32
lines changed

4 files changed

+35
-32
lines changed

src/sass/_asciidoc.scss

+9-7
Original file line numberDiff line numberDiff line change
@@ -7,11 +7,13 @@
77
}
88
}
99

10-
margin: $padding-16 0;
11-
padding: 0;
10+
& {
11+
margin: $padding-16 0;
12+
padding: 0;
1213

13-
border-left: $border-4 solid var(--accent-color);
14-
border-radius: $border-radius;
14+
border-left: $border-4 solid var(--accent-color);
15+
border-radius: $border-radius;
16+
}
1517

1618
table {
1719
margin: 0 !important;
@@ -22,6 +24,9 @@
2224
}
2325

2426
td {
27+
display: block;
28+
padding: $padding-4 $padding-16 !important;
29+
2530
&:first-child {
2631
background-color: scale-color($gray-600, $alpha: -95%);
2732
font-weight: bold;
@@ -53,9 +58,6 @@
5358
}
5459
}
5560
}
56-
57-
display: block;
58-
padding: $padding-4 $padding-16 !important;
5961
}
6062
}
6163
}

src/sass/_color_mode.scss

+21-17
Original file line numberDiff line numberDiff line change
@@ -110,27 +110,31 @@
110110
@mixin code_theme_dark {
111111
@include chroma_dark;
112112

113-
--code-background: #{$code-background-dark};
114-
--code-accent-color: #{darken($code-background-dark, 4)};
115-
--code-accent-color-lite: #{darken($code-background-dark, 2)};
116-
--code-font-color: #{$code-font-color-dark};
117-
118-
--code-copy-background: #{$code-background-dark};
119-
--code-copy-font-color: #{darken($code-font-color-dark, 15)};
120-
--code-copy-border-color: #{darken($code-font-color-dark, 20)};
121-
--code-copy-success-color: #{scale-color(map.get($hint-colors, "ok"), $alpha: -55%)};
113+
& {
114+
--code-background: #{$code-background-dark};
115+
--code-accent-color: #{darken($code-background-dark, 4)};
116+
--code-accent-color-lite: #{darken($code-background-dark, 2)};
117+
--code-font-color: #{$code-font-color-dark};
118+
119+
--code-copy-background: #{$code-background-dark};
120+
--code-copy-font-color: #{darken($code-font-color-dark, 15)};
121+
--code-copy-border-color: #{darken($code-font-color-dark, 20)};
122+
--code-copy-success-color: #{scale-color(map.get($hint-colors, "ok"), $alpha: -55%)};
123+
}
122124
}
123125

124126
@mixin code_theme_light {
125127
@include chroma_github;
126128

127-
--code-background: #{$code-background};
128-
--code-accent-color: #{darken($code-background, 6)};
129-
--code-accent-color-lite: #{darken($code-background, 2)};
130-
--code-font-color: #{$code-font-color};
129+
& {
130+
--code-background: #{$code-background};
131+
--code-accent-color: #{darken($code-background, 6)};
132+
--code-accent-color-lite: #{darken($code-background, 2)};
133+
--code-font-color: #{$code-font-color};
131134

132-
--code-copy-background: #{$code-background};
133-
--code-copy-font-color: #{lighten($code-font-color, 15)};
134-
--code-copy-border-color: #{lighten($code-font-color, 20)};
135-
--code-copy-success-color: #{map.get($hint-colors, "ok")};
135+
--code-copy-background: #{$code-background};
136+
--code-copy-font-color: #{lighten($code-font-color, 15)};
137+
--code-copy-border-color: #{lighten($code-font-color, 20)};
138+
--code-copy-success-color: #{map.get($hint-colors, "ok")};
139+
}
136140
}

src/sass/_markdown.scss

+3-3
Original file line numberDiff line numberDiff line change
@@ -186,6 +186,7 @@
186186
}
187187

188188
&__align {
189+
text-align: left;
189190
&--left {
190191
h1,
191192
h2,
@@ -195,10 +196,10 @@
195196
h6 {
196197
justify-content: flex-start;
197198
}
198-
text-align: left;
199199
}
200200

201201
&--center {
202+
text-align: center;
202203
h1,
203204
h2,
204205
h3,
@@ -207,10 +208,10 @@
207208
h6 {
208209
justify-content: center;
209210
}
210-
text-align: center;
211211
}
212212

213213
&--right {
214+
text-align: right;
214215
h1,
215216
h2,
216217
h3,
@@ -219,7 +220,6 @@
219220
h6 {
220221
justify-content: flex-end;
221222
}
222-
text-align: right;
223223
}
224224
}
225225
}

webpack.config.js

+2-5
Original file line numberDiff line numberDiff line change
@@ -142,12 +142,9 @@ module.exports = (env, argv) => {
142142
{
143143
loader: "sass-loader",
144144
options: {
145+
sourceMap: argv.mode === "development" ? true : false,
145146
sassOptions: {
146-
// FIXME: https://github.com/webpack-contrib/sass-loader/issues/962#issuecomment-1002675051
147-
sourceMap: argv.mode === "development" ? true : false,
148-
sourceMapEmbed: argv.mode === "development" ? true : false,
149-
outputStyle: argv.mode === "development" ? "expanded" : "compressed",
150-
includePaths: [nodeModulesPath]
147+
outputStyle: argv.mode === "development" ? "expanded" : "compressed"
151148
}
152149
}
153150
}

0 commit comments

Comments
 (0)