Skip to content

Commit 63d0ad7

Browse files
authored
Use modern compiler for css processing in vite (to remove SASS 2.0.0 warnings on deprecated JS API usage); (#180)
Resolve some of SASS deprecation warnings; Add note to readme about icons generation
1 parent 1c8f53c commit 63d0ad7

File tree

4 files changed

+22
-12
lines changed

4 files changed

+22
-12
lines changed

CONTRIBUTING.md

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -35,3 +35,9 @@ way to subset variable woff2 fonts with ligatures.
3535

3636
In other words, either have python as a development dependency or
3737
serve a 3.5MB icons font of which 99.5% is completely unused.
38+
39+
To generate the icons use the following command:
40+
41+
```shell
42+
npm run minify-icons
43+
```

src/lib/style/form/_button.scss

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,8 @@ button {
1919

2020
font-family: inherit;
2121
font-weight: 600;
22+
border-radius: 32px;
23+
transition: all 250ms ease;
2224

2325
@media not (forced-colors: active) {
2426
color: currentcolor;
@@ -36,10 +38,6 @@ button {
3638
color: ButtonText;
3739
}
3840

39-
border-radius: 32px;
40-
41-
transition: all 250ms ease;
42-
4341
&.icon {
4442
display: inline-flex;
4543

@@ -48,7 +46,6 @@ button {
4846
padding-inline: 0;
4947

5048
font-size: 24px;
51-
5249
border-radius: 50%;
5350

5451
@media (forced-colors: active) {

src/lib/style/theme.scss

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,13 @@
1-
@import "./reset";
1+
@use "reset";
22

3-
@import "./form/button";
4-
@import "./form/toggle";
5-
@import "./form/checkbox";
3+
@use "form/button";
4+
@use "form/toggle";
5+
@use "form/checkbox";
66

7-
@import "./kbd";
8-
@import "./print";
7+
@use "kbd";
8+
@use "print";
99

10-
@import "./elements/h1";
10+
@use "elements/h1";
1111

1212
body {
1313
overflow: hidden;

vite.config.ts

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -37,6 +37,13 @@ export default defineConfig({
3737
define: {
3838
global: "window",
3939
},
40+
css: {
41+
preprocessorOptions: {
42+
scss: {
43+
api: "modern-compiler",
44+
},
45+
},
46+
},
4047
envPrefix: ["TAURI_", "VITE_"],
4148
plugins: [
4249
ViteYaml(),

0 commit comments

Comments
 (0)