I’m working on the styles for my project and I’m putting most of it in global.scss so that general ion components are styled consistently through the app.
But I’m getting overridden by complex special rules:
Like, setting the --color
on ion-label
in global.scss is being overridden by .item.sc-ion-label-ios-h, .item .sc-ion-label-ios-h
.
It’s not clear what the structure of the rules should be to get my rules in there, without resorting to either playing hit and miss with targeting each rule (which seems like its going to be a whole new game when I move from ios to styling android, and not the right solution), or using important
which always feels like something has gone wrong.
Is there any guidance for writing global styles?