You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: readme.md
+42Lines changed: 42 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -88,6 +88,39 @@ Example, instead of `navbar-light bg-light` or `navbar-dark bg-dark`, use `.navb
88
88
89
89
Check out the samples app for more info about this feature.
90
90
91
+
## prefers-color-scheme
92
+
93
+
From version 1.1, I added two new css files: `bootstrap-prefers-dark.css` and `bootstrap-prefers-light.css`.
94
+
Those two files use `prefers-color-scheme` media query instead of relying on a body's css class.
95
+
There is also a new `bootstrap-light.css` file that is bootstrap, plus the `.navbar-themed` light addon.
96
+
97
+
There is two possible combination:
98
+
99
+
- default (no `prefers-color-scheme` specified or `prefers-color-scheme: light`): default bootstrap (light), `prefers-color-scheme: dark`: bootstrap dark
100
+
- default (no `prefers-color-scheme` specified or `prefers-color-scheme: dark`): bootstrap dark, `prefers-color-scheme: light`: default bootstrap (light)
See `./samples/html/prefers-light-default-dark.html` for a working example.
121
+
122
+
> Note that the _print css_ is included in `bootstrap-dark.min.css`.
123
+
91
124
# How to build
92
125
93
126
If you want to build the theme manually, modify it or even contribute, this section explains how.
@@ -165,6 +198,15 @@ See [Contributing to ForEvolve open source projects](https://github.com/ForEvolv
165
198
166
199
Since CI build numbers are automated, it is hard to know in advance what the next deployed build number will be, so the `(latest)` version represent that version.
167
200
201
+
## 1.1.0
202
+
203
+
- Update `bootstrap-dark.css` to include the `.navbar-themed` class (dark version).
204
+
- Add `bootstrap-light.css` which is bootstrap plus the `.navbar-themed` class (light version).
205
+
- Add `bootstrap-prefers-dark.[css|scss]` that is the equivalent of `bootstrap-dark.[css|scss]`, without the print, wrapped in a `@media (prefers-color-scheme: dark)` media query.
206
+
- Add `bootstrap-prefers-light.[css|scss]` that is the equivalent of `bootstrap-light.[css|scss]`, without the print, wrapped in a `@media (prefers-color-scheme: light)` media query.
207
+
- Add two samples to show this usage: `./samples/html/prefers-dark-default-light.html` and `./samples/html/prefers-light-default-dark.html`
208
+
- Update .NET/Razor Pages sample to use these new CSS files.
0 commit comments