vuetify: [Bug Report] Cannot customize stylus-variables anymore
Versions and Environment
Vuetify: 1.0.0-alpha.1 Vue: 2.5.9 Browsers: Chrome 62.0.3202.94 OS: Linux x86_64
Steps to reproduce
// main.styl -> my custom stylus entry point
@import './theme.styl'
@import '../../node_modules/vuetify/src/stylus/main.styl'
#foo {
color: $theme.primary;
}
// theme.styl
$theme.primary = #ff0000;
$material-light := {
status-bar: {
regular: $theme.primary,
lights-out: rgba(#fff, .7)
},
/* ... */
}
/* ... */
Expected Behavior
Vuetify should use the variables I defined in my custom file. This worked on v0.16.1.
Actual Behavior
Vuetify completely ignores custom defined variables. Even though the correct $theme.primary gets used for my #foo-selector afterwards.
Reproduction Link
https://codepen.io/janein/pen/ooRNMp
Other comments
Any idea why this has been working on the older version and now broke? Or is there any suggested way to customize those varibales?
(repodruction link is not working - I just couldn’t find a sane way to rebuild this on codepen - sorry)
About this issue
- Original URL
- State: closed
- Created 7 years ago
- Comments: 15 (6 by maintainers)
@KaelWD I’m confused – https://vuetifyjs.com/en/style/theme still describes overriding stylus variables (but I tried what it described and it didn’t work for me – using vue-cli3 project)
How would I go about overriding, for example,
$material-dark.background?Use the label slot: https://codepen.io/anon/pen/gopNbq?editors=1010