Skip to content

Commit ab63ae4

Browse files
committed
Update SCSS and remove deprecation warnings.
1 parent 4145773 commit ab63ae4

File tree

7 files changed

+14
-8
lines changed

7 files changed

+14
-8
lines changed

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@
3636
"scripts": {
3737
"dev": "vite",
3838
"build": "vite build --base /splitpanes/",
39-
"build-bundle": "BUNDLE=true vite build && mv ./dist/style.css ./dist/splitpanes.css",
39+
"build-bundle": "BUNDLE=true vite build",
4040
"serve": "vite preview --base /splitpanes/",
4141
"publish-doc": "npm run build && npm run build-bundle && git add . && git commit -m 'Publish documentation on Github.' && git push && git push --tag"
4242
},

src/scss/_base.scss

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
@use './variables' as *;
2+
13
// Global.
24
// --------------------------------------------------------
35
* {

src/scss/_typography.scss

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
@use './variables' as *;
2+
13
body {
24
font: 14px 'Avenir', Helvetica, Arial, sans-serif;
35
-webkit-font-smoothing: antialiased;

src/scss/examples.scss

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
@import './variables';
1+
@use './variables' as *;
22

33
.vueperslide {
44
&__content-wrapper {

src/scss/index.scss

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,2 @@
1-
@import './variables';
2-
@import './base';
3-
@import './typography';
1+
@forward './base';
2+
@forward './typography';

src/views/documentation.vue

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1032,6 +1032,8 @@ const incrementNumber = (i) => {
10321032
</script>
10331033

10341034
<style lang="scss">
1035+
@use 'sass:color';
1036+
10351037
$primary-color: #42b983;
10361038
$secondary-color: #78cfa8;
10371039
@@ -1088,8 +1090,8 @@ em.specs {
10881090
// Vue Router example.
10891091
//---------------
10901092
.example-vue-router {
1091-
&.w-button--active {background-color: darken($primary-color, 10) !important;}
1092-
.router-link-active {color: darken($primary-color, 10);}
1093+
&.w-button--active {background-color: color.adjust($primary-color, $lightness: -10%) !important;}
1094+
.router-link-active {color: color.adjust($primary-color, $lightness: -10%);}
10931095
}
10941096
10951097
// Touch example.

vite.config.js

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,8 @@ export default defineConfig({
4545
css: {
4646
preprocessorOptions: {
4747
scss: {
48-
additionalData: '@import "@/scss/_variables.scss";'
48+
api: 'modern-compiler',
49+
additionalData: '@use "@/scss/_variables.scss" as *;'
4950
}
5051
}
5152
},

0 commit comments

Comments
 (0)