Skip to content

Commit 03ff932

Browse files
committed
Update docs and bump minor version
1 parent 21bd01c commit 03ff932

File tree

2 files changed

+43
-1
lines changed

2 files changed

+43
-1
lines changed

readme.md

Lines changed: 42 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -88,6 +88,39 @@ Example, instead of `navbar-light bg-light` or `navbar-dark bg-dark`, use `.navb
8888

8989
Check out the samples app for more info about this feature.
9090

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)
101+
102+
Here is an example for a **light default**:
103+
104+
```html
105+
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/@forevolve/bootstrap-dark@1.1.0/dist/css/bootstrap-light.min.css" />
106+
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/@forevolve/bootstrap-dark@1.1.0/dist/css/bootstrap-prefers-dark.min.css" />
107+
```
108+
109+
See `./samples/html/prefers-dark-default-light.html` for a working example.
110+
111+
> Note that the _print css_ is included in `bootstrap-light.min.css`.
112+
113+
Here is an example for a **dark default**:
114+
115+
```html
116+
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/@forevolve/bootstrap-dark@1.1.0/dist/css/bootstrap-dark.min.css" />
117+
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/@forevolve/bootstrap-dark@1.1.0/dist/css/bootstrap-prefers-light.min.css" />
118+
```
119+
120+
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+
91124
# How to build
92125

93126
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
165198

166199
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.
167200

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.
209+
168210
## 1.0.0
169211

170212
- Update to Bootstrap 4.6.0

version.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"$schema": "https://raw.githubusercontent.com/dotnet/Nerdbank.GitVersioning/master/src/NerdBank.GitVersioning/version.schema.json",
3-
"version": "1.0.0",
3+
"version": "1.1.0",
44
"publicReleaseRefSpec": ["^refs/heads/(main|master)$"],
55
"cloudBuild": {
66
"buildNumber": {

0 commit comments

Comments
 (0)