Skip to content

Commit 0a0d522

Browse files
authored
Add respect of system configuration (#87)
1 parent 6f3b614 commit 0a0d522

File tree

2 files changed

+8
-2
lines changed

2 files changed

+8
-2
lines changed

README.md

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,20 +16,25 @@ _Note: replace 'tag-name' with the latest released version:_
1616

1717
[![GitHub release](https://img.shields.io/github/release/jenkinsci/dark-theme.svg?label=latest)](https://github.com/jenkinsci/dark-theme/releases/latest)
1818

19-
The CSS URL is:
19+
The CSS URLs are:
2020

2121
```text
2222
https://cdn.jsdelivr.net/gh/jenkinsci/dark-theme@<tag-name>/theme.css
23+
https://cdn.jsdelivr.net/gh/jenkinsci/dark-theme@<tag-name>/theme-system.css
2324
```
2425

26+
* theme.css - forces dark theme for all users
27+
* theme-system.css - respects users system setting for dark / light mode, in most cases this is the theme you should be using
28+
2529
or with the [configuration-as-code](https://github.com/jenkinsci/configuration-as-code-plugin) plugin:
2630

2731
```yaml
2832
unclassified:
2933
simple-theme-plugin:
3034
elements:
3135
- cssUrl:
32-
url: "https://cdn.jsdelivr.net/gh/jenkinsci/dark-theme@<tag-name>/theme.css"
36+
url: "https://cdn.jsdelivr.net/gh/jenkinsci/dark-theme@<tag-name>/theme-system.css"
37+
#url: "https://cdn.jsdelivr.net/gh/jenkinsci/dark-theme@<tag-name>/theme.css"
3338
```
3439

3540
## Screenshots

theme-system.css

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
@import url('theme.css') screen and (prefers-color-scheme: dark);

0 commit comments

Comments
 (0)