Add global SASS include for all Vue components

This commit is contained in:
Jonatan Heyman 2023-12-10 22:58:33 +01:00
parent 131a9ec877
commit 13afe62e11
6 changed files with 13 additions and 16 deletions

View File

@ -91,10 +91,6 @@
</template>
<style scoped lang="sass">
=dark-mode()
@media (prefers-color-scheme: dark)
@content
.language-selector
font-size: 13px
padding: 10px

View File

@ -76,9 +76,6 @@
</template>
<style scoped lang="sass">
=dark-mode()
@media (prefers-color-scheme: dark)
@content
.status
box-sizing: border-box
height: 22px

View File

@ -152,10 +152,6 @@
</template>
<style scoped lang="sass">
=dark-mode()
@media (prefers-color-scheme: dark)
@content
@keyframes spin
from
transform: rotate(0deg)

View File

@ -118,10 +118,6 @@
</template>
<style lang="sass">
=dark-mode()
@media (prefers-color-scheme: dark)
@content
.settings
position: fixed
top: 0

3
src/css/include.sass Normal file
View File

@ -0,0 +1,3 @@
=dark-mode()
@media (prefers-color-scheme: dark)
@content

View File

@ -87,6 +87,15 @@ export default defineConfig({
},
})
],
css: {
preprocessorOptions: {
sass: {
additionalData: `
@import "./src/css/include.sass"
`
}
}
},
server: !!process.env.VSCODE_DEBUG ? (() => {
const url = new URL(pkg.debug.env.VITE_DEV_SERVER_URL)
return {