docsify-dark-mode-toggle 1.1.1 → 2.0.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (2) hide show
  1. package/index.css +20 -0
  2. package/package.json +1 -1
package/index.css CHANGED
@@ -42,6 +42,12 @@ html.dark-mode {
42
42
  --dm-search-clear-bg: var(--dm-border);
43
43
  --dm-search-clear-icon: var(--dm-text);
44
44
 
45
+ /* Docsify 5 themes read their colors from these properties. */
46
+ --color-bg: var(--dm-bg);
47
+ --color-text: var(--dm-text);
48
+ --heading-color: var(--dm-text-strong);
49
+ --strong-color: var(--dm-text-strong);
50
+
45
51
  background: var(--dm-bg);
46
52
  color: var(--dm-text);
47
53
  }
@@ -72,6 +78,16 @@ html.dark-mode {
72
78
  opacity: 0.7;
73
79
  }
74
80
 
81
+ /* Docsify 5 styles every button[type], which would turn the icon into a pill. */
82
+ button.dark-mode-toggle[type],
83
+ button.dark-mode-toggle[type]:hover {
84
+ margin: 0;
85
+ padding: 0;
86
+ border: none;
87
+ background: transparent;
88
+ color: var(--dm-toggle-color);
89
+ }
90
+
75
91
  .dark-mode-toggle svg {
76
92
  display: block;
77
93
  width: 100%;
@@ -186,6 +202,10 @@ html.dark-mode .markdown-section .tip {
186
202
  border-color: var(--dm-border);
187
203
  }
188
204
 
205
+ html.dark-mode .markdown-section .callout[class] {
206
+ --callout-bg: var(--dm-tip-bg);
207
+ }
208
+
189
209
  html.dark-mode details > summary {
190
210
  background-color: var(--dm-summary-bg);
191
211
  color: var(--dm-text);
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "docsify-dark-mode-toggle",
3
3
  "description": "Dark mode toggle button for Docsify - vanilla JS, no dependencies, configurable storage key, i18n, custom SVG icons.",
4
- "version": "1.1.1",
4
+ "version": "2.0.0",
5
5
  "license": "MIT",
6
6
  "author": {
7
7
  "name": "Piotr Kowalski",