virtualidentityag / stadtKoeln-openData-frontend

GNU Affero General Public License v3.0
1 stars 1 forks source link

color variable definition #26

Open stefan-korn opened 1 week ago

stefan-korn commented 1 week ago

Custom color variables (i. e. primary color) are defined in default.css.

But this does not make use of the Bootstrap sass variables. Why not override the variables in styles.scss like it is already done for some variables?

This way the css variables for :root would be generated automatically, at least for existing Bootstrap variables. And variables that Bootstrap does deviate from each other will be generated automatically too (which is not the case right now), like for example some border colors or text colors that are based on $primary.

And redundancies like defining --primary and --primary-rgb would be avoided.

paulovareiro29 commented 5 days ago

Hi @stefan-korn , this was done this way to make life easier to implement new themes, by just overriding the theme variables in default.css.

This way we can also declare the variables as we want in darkmode, and not rely on bootstrap to generate it automatically, which in this case, would have an accessibility problem due to #a01e28 not being accessible in dark backgrounds.