Closed pmeinhardt closed 4 years ago
Unfortunately Bootstrap does not support customization through CSS variables. It exports theme info (colorsβ¦) as CSS variables, but does not read variables to allow adjusting styling. The current solution therefore instead of tweaking variables based on media queries, adjusts the CSS classes.
An alternative solution could be to build 2 CSS files with complete versions of Bootstrap - just with different theming - and to include those via <link href="β¦" rel="stylesheet" media="(prefers-color-scheme: β¦)">
.
The current solution therefore instead of tweaking variables based on media queries, adjusts the CSS classes.
Given the bootstrap-circumstances, this is still pretty close to the approach suggested in https://codeguide.co/#css-media-queries and perfectly fine in my opinion π
Switched the logo on the help page to use the SVG and style it based on theme colors:
I ended up creating 2 themed versions of (a trimmed-down) Bootstrap, one of which is nested under .dark
to conditionally apply these more specific styles if (prefers-color-scheme: dark)
matches.
This makes it easier to configure the two themes and to keep them consistent (see src/popup/styles/settings/{_default,_dark}.scss
).
Of course this about doubles the size of the CSS and adds a lot of duplication, but - hey π€· - it's about 186K now and it's not like we're transferring this over the network anyways.
Currently in the middle of my review, but I don't see the right place to ask this π: why does the menu bar icon not change for you? This is a behavior for Firefox I already added in #227 π€
See here β¬
Currently in the middle of my review, but I don't see the right place to ask this π: why does the menu bar icon not change for you? This is a behavior for Firefox I already added in #227 π€
The screenshot was taken in Chrome. In Firefox, the icon behaves as expected. The changes here don't touch the manifest. βοΈ
The screenshot was taken in Chrome. In Firefox, the icon behaves as expected. The changes here don't touch the manifest. βοΈ
On my π Time for holidays and sorry for the noise π³οΈ
Closes #261.
To do: