[v1.0.0-rc.5] Style QBtn background-color and color css
-
It would be really helpful to be able to set the css styles or the colors of the button.
Similar to the current QInput behavior.input-style input-class
-
@caragon is the
color
prop not enough for this? Anyway you can use the default slot and do your own styling there. -
@metalsadman color only accepts colors from the Quasar Color Palette…
Setting my own slot is not an option to set the background color.Another option, and perfect for my case, would be that
color
andtext-color
accept all kind of colors, not only Quasar Color Palette.But if other components have the input-styles or input-class, I don’t see why it can not be applied here.
-
The same happens with the QIcon
-
@caragon you can set your own colors see https://quasar.dev/style/color-palette#Adding-Your-Own-Colors
-
@metalsadman I can create my own colors, but I need them to change dynamically, and without using https://quasar.dev/style/color-palette#Dynamic-Change-of-Brand-Colors-(Dynamic-Theme-Colors) cause the website is used from IE too…
Do you know an easy way to apply css styles dynamically with js?
This would be really easy if Quasar elements accept colors strings… -
The workaround I found is create all
.text-
and.bg-
and then with a mixin’s reactive property I change all colors when needed.