Global styles?


#1

Is there any way to simply write styles for entire app?
Something like:

$navbar-background: blue;

And then every navbar in app would have blue color.


#2

All global styles that you can override can be found over here:

If you would like a custom color for your navbar all over your app, just add a custom color to the colors variable in your variables.scss and then add color=“mycustomcolor” to your navbar.


#3

so i have to edit every single navbar in my app?

and how to set font color of navbar?


#4

primary is the default color, so if you change your primary variable into something else it will change every navbar. But I don’t think it’s that much work…

If you want to change the font color, just check the link I just posted. Search for toolbar-text-color.


#5

primary is something-blue
and default color of navbar is something-white
so it is much work…


#6

So just add color=“myColor” to your navbars. I don’t know how many pages you have, but I don’t see why it would be such a big issue. Maybe setting $toolbar-background works as well for a default color?


#7

maybe it isnt very time consuming but still it could be done much easier if there were any global style variables

oh wow seems like there is $toolbar-background and it works

but somehow toolbar-text-color doesnt work this way :open_mouth:


#8

So there’s your answer then ;). Reading the docs carefully would also have given you that answer by the way :slight_smile:


#9

yeah but it doesnt work with text-color


#10

Did you try and set it specific to the platform?


#11

yes i did and it doesnt work the way background worked


#12

Probably because you need the toolbar title, not the text:

$toolbar-ios-title-text-color


#13

oh yes you are right again, thank you!