Skip to content

Commit d0c4778

Browse files
authored
html: add Light/Dark Theme
1 parent e2e8619 commit d0c4778

File tree

1 file changed

+22
-0
lines changed

1 file changed

+22
-0
lines changed

notes/html.md

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,28 @@
1919
- See: [Недоступность в картинках](http://css.yoksel.ru/inaccessibility/)
2020
- See: [HTML vocabulary](http://apps.workflower.fi/vocabs/html/en)
2121

22+
23+
## Light/Dark Theme
24+
25+
- See: https://developer.mozilla.org/en-US/docs/Web/CSS/color-scheme
26+
27+
```html
28+
<meta name="color-scheme" content="light dark">
29+
```
30+
31+
- See: https://developer.mozilla.org/en-US/docs/Web/HTML/Element/meta/name/theme-color
32+
33+
```html
34+
<meta name="theme-color" content="#4285f4" />
35+
```
36+
37+
```html
38+
<meta name="theme-color" media="(prefers-color-scheme: light)" content="cyan" />
39+
<meta name="theme-color" media="(prefers-color-scheme: dark)" content="black" />
40+
```
41+
42+
43+
2244
## Polyfills
2345

2446
- See: https://github.com/Modernizr/Modernizr/wiki/HTML5-Cross-Browser-Polyfills

0 commit comments

Comments
 (0)