Skip to content

Commit e602690

Browse files
committed
Prepare v1.2 pre-release
1 parent 3de00ca commit e602690

File tree

3 files changed

+54
-5
lines changed

3 files changed

+54
-5
lines changed

.github/workflows/main.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -61,15 +61,15 @@ jobs:
6161
echo 'NpmPackageVersion: ${{ steps.nbgv.outputs.NpmPackageVersion }}'
6262
6363
- run: npm install
64-
if: github.event_name == 'push'
64+
# if: github.event_name == 'push'
6565

6666
- run: npm run build
67-
if: github.event_name == 'push'
67+
# if: github.event_name == 'push'
6868

6969
- run: npm publish --access=public
7070
env:
7171
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
72-
if: github.event_name == 'push'
72+
# if: github.event_name == 'push'
7373

7474
- uses: actions/create-release@v1
7575
env:

readme.md

Lines changed: 50 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -121,6 +121,33 @@ See `./samples/html/prefers-light-default-dark.html` for a working example.
121121

122122
> Note that the _print css_ is included in `bootstrap-dark.min.css`.
123123
124+
## bootstrap-${default}-prefers-${specific}.css
125+
126+
Those two stylesheets leverage the `prefers-color-scheme` CSS media query.
127+
They are a combination of two CSS.
128+
Their high-level structure looks like the following:
129+
130+
```css
131+
/*
132+
DEFAULT STYLES (including print styles):
133+
bootstrap-light.css or bootstrap-dark.css
134+
*/
135+
@media (prefers-color-scheme: light|dark) {
136+
/*
137+
SPECIFIC COLOR STYLES:
138+
bootstrap-prefers-light-color-only.css or bootstrap-prefers-dark-color-only.css
139+
*/
140+
}
141+
```
142+
143+
Use by loading only that CSS (ex.: default: light with dark support):
144+
145+
```html
146+
<link rel="stylesheet" href="/dist/css/bootstrap-light-prefers-dark.min.css" />
147+
```
148+
149+
> You can also use jsdelivr CDN.
150+
124151
# How to build
125152

126153
If you want to build the theme manually, modify it or even contribute, this section explains how.
@@ -177,7 +204,7 @@ There is a few npm and gulp scripts.
177204
- `Services` are the web pages services; so far it's pretty thin.
178205
- `wwwroot` are the web assets; the `dist` files are copied there.
179206
- `assets` are the project assets (like the screenshot in the readme file).
180-
- `dist` are the redistributable files; if you want to copy/paste the files into your projects, that's the ones. They also include bootstrap JavaScript files, unaltered.
207+
- `dist` are the distributable files; if you want to copy/paste the files into your projects, that's the ones. They also include bootstrap JavaScript files, unaltered.
181208
- `scss` are the source theme files.
182209
- Other files (root): npm, license, readme, etc.
183210

@@ -198,6 +225,28 @@ See [Contributing to ForEvolve open source projects](https://github.com/ForEvolv
198225

199226
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.
200227

228+
## 1.2.x (preview)
229+
230+
_This version is not completed and could contain bugs._
231+
232+
- Add `bootstrap-dark-prefers-light.css` which default to Bootstrap dark and display the light colors if the user's `prefers-color-scheme: light`.
233+
- Add `bootstrap-light-prefers-dark.css` which default to Bootstrap and display the dark colors if the user's `prefers-color-scheme: dark`.
234+
- Add `bootstrap-prefers-dark-color-only.css` which is only the colors of `bootstrap-prefers-dark.css`. This is autogenerated by `clean_non_color_attr.js`.
235+
- Add `bootstrap-prefers-light-color-only.css` which is only the colors of `bootstrap-prefers-light.css`. This is autogenerated by `clean_non_color_attr.js`.
236+
- Add `clean_non_color_attr.js` gulp plugin (based on `gulp-css-remove-attributes`).
237+
- Update .NET/Razor Pages sample to use these new CSS files.
238+
239+
### Completed state
240+
241+
- [x] default: light - prefers: light
242+
- [x] default: light - prefers: dark
243+
- [ ] default: dark - prefers: light
244+
- [x] default: dark - prefers: dark
245+
246+
### Known issues
247+
248+
- Color bugs in the dark/light theme are caused by color variables being set to `null` in Bootstrap and overridden in Bootstrap-dark.
249+
201250
## 1.1.0
202251

203252
- Update `bootstrap-dark.css` to include the `.navbar-themed` class (dark version).

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.1.0",
3+
"version": "1.2.0",
44
"publicReleaseRefSpec": ["^refs/heads/(main|master)$"],
55
"cloudBuild": {
66
"buildNumber": {

0 commit comments

Comments
 (0)