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
This commit is contained in:
Aleksandr Iushmanov
2025-04-08 10:51:36 +01:00
committed by GitHub
parent 1c8f53caf6
commit 63d0ad7ae8
4 changed files with 22 additions and 12 deletions

View File

@@ -35,3 +35,9 @@ way to subset variable woff2 fonts with ligatures.
In other words, either have python as a development dependency or In other words, either have python as a development dependency or
serve a 3.5MB icons font of which 99.5% is completely unused. serve a 3.5MB icons font of which 99.5% is completely unused.
To generate the icons use the following command:
```shell
npm run minify-icons
```

View File

@@ -19,6 +19,8 @@ button {
font-family: inherit; font-family: inherit;
font-weight: 600; font-weight: 600;
border-radius: 32px;
transition: all 250ms ease;
@media not (forced-colors: active) { @media not (forced-colors: active) {
color: currentcolor; color: currentcolor;
@@ -36,10 +38,6 @@ button {
color: ButtonText; color: ButtonText;
} }
border-radius: 32px;
transition: all 250ms ease;
&.icon { &.icon {
display: inline-flex; display: inline-flex;
@@ -48,7 +46,6 @@ button {
padding-inline: 0; padding-inline: 0;
font-size: 24px; font-size: 24px;
border-radius: 50%; border-radius: 50%;
@media (forced-colors: active) { @media (forced-colors: active) {

View File

@@ -1,13 +1,13 @@
@import "./reset"; @use "reset";
@import "./form/button"; @use "form/button";
@import "./form/toggle"; @use "form/toggle";
@import "./form/checkbox"; @use "form/checkbox";
@import "./kbd"; @use "kbd";
@import "./print"; @use "print";
@import "./elements/h1"; @use "elements/h1";
body { body {
overflow: hidden; overflow: hidden;

View File

@@ -37,6 +37,13 @@ export default defineConfig({
define: { define: {
global: "window", global: "window",
}, },
css: {
preprocessorOptions: {
scss: {
api: "modern-compiler",
},
},
},
envPrefix: ["TAURI_", "VITE_"], envPrefix: ["TAURI_", "VITE_"],
plugins: [ plugins: [
ViteYaml(), ViteYaml(),