app.scss does not allow use of variables #15710
Labels
area/style
bug/1-hard-to-reproduce
A reproduction is available, but it's hard to reproduce, so it has a lower priority.
bug/1-repro-available
A reproduction is available and needs to be confirmed.
flavour/quasar-cli-vite
kind/bug 🐞
Qv2 🔝
Quasar v2 issues
What happened?
The primary
app.scss
file does not allow you to use any global variables, even if you have them imported, or even declared within the same file.I have set up a project using the Quasar CLI and made the following changes:
Declare new global variables in
quasar.variables.scss
Add
body.body--dark
styling toapp.scss
using variables declared inquasar.variables.scss
Change
quasar.config.js
to force dark modeEven the variables already declared such as
$primary
amongst others are not accessible inapp.scss
You can declare the variable within
app.scss
and it still will not be picked up.What did you expect to happen?
I was expecting to be able to use variables in
app.scss
, whether they are imported or declared at top level.Reproduction URL
https://codesandbox.io/p/github/eancuta/quasar-scss-bug/master?file=%2FREADME.md&workspace=%257B%2522activeFilepath%2522%253A%2522%252FREADME.md%2522%252C%2522openFiles%2522%253A%255B%2522%252FREADME.md%2522%252C%2522%252Fquasar.config.js%2522%255D%252C%2522sidebarPanel%2522%253A%2522EXPLORER%2522%252C%2522gitSidebarPanel%2522%253A%2522COMMIT%2522%252C%2522spaces%2522%253A%257B%2522clggeln6l000x286dbldmjdg9%2522%253A%257B%2522key%2522%253A%2522clggeln6l000x286dbldmjdg9%2522%252C%2522name%2522%253A%2522Default%2522%252C%2522devtools%2522%253A%255B%257B%2522key%2522%253A%2522clggezq560014286dwyc4fp3p%2522%252C%2522type%2522%253A%2522PROJECT_SETUP%2522%252C%2522isMinimized%2522%253Afalse%257D%252C%257B%2522type%2522%253A%2522PREVIEW%2522%252C%2522taskId%2522%253A%2522dev%2522%252C%2522port%2522%253A9000%252C%2522key%2522%253A%2522clggelss9006e286dcz9cjfni%2522%252C%2522isMinimized%2522%253Afalse%252C%2522path%2522%253A%2522%252F%2523%252F%2522%257D%252C%257B%2522type%2522%253A%2522TASK_LOG%2522%252C%2522taskId%2522%253A%2522dev%2522%252C%2522key%2522%253A%2522clggelrp7003t286df2vf5qcr%2522%252C%2522isMinimized%2522%253Afalse%257D%255D%257D%257D%252C%2522currentSpace%2522%253A%2522clggeln6l000x286dbldmjdg9%2522%252C%2522spacesOrder%2522%253A%255B%2522clggeln6l000x286dbldmjdg9%2522%255D%252C%2522hideCodeEditor%2522%253Afalse%257D
How to reproduce?
Flavour
Quasar CLI with Vite (@quasar/cli | @quasar/app-vite)
Areas
Style & Identity (quasar)
Platforms/Browsers
Firefox, Chrome
Quasar info output
Relevant log output
No response
Additional context
No response
The text was updated successfully, but these errors were encountered: