docsify-dark-mode-toggle 1.0.3 → 1.0.4

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 +16 -1
  2. package/package.json +1 -1
package/index.css CHANGED
@@ -39,6 +39,8 @@ html.dark-mode {
39
39
  --dm-tip-bg: var(--dm-bg-elevated);
40
40
  --dm-summary-bg: var(--dm-bg-elevated);
41
41
  --dm-search-input-bg: var(--dm-bg-elevated);
42
+ --dm-search-clear-bg: var(--dm-border);
43
+ --dm-search-clear-icon: var(--dm-text);
42
44
 
43
45
  background: var(--dm-bg);
44
46
  color: var(--dm-text);
@@ -61,7 +63,9 @@ html.dark-mode {
61
63
  display: flex;
62
64
  align-items: center;
63
65
  justify-content: center;
64
- transition: color 0.2s ease, opacity 0.2s ease;
66
+ transition:
67
+ color 0.2s ease,
68
+ opacity 0.2s ease;
65
69
  }
66
70
 
67
71
  .dark-mode-toggle:hover {
@@ -193,6 +197,17 @@ html.dark-mode .search input[type="search"] {
193
197
  border-color: var(--dm-border);
194
198
  }
195
199
 
200
+ /* Clear (x) button of the search input: Docsify draws it as an inline SVG
201
+ with a light gray circle and a white cross, which is barely visible on a
202
+ dark sidebar. CSS overrides the SVG presentation attributes. */
203
+ html.dark-mode .search .clear-button circle {
204
+ fill: var(--dm-search-clear-bg);
205
+ }
206
+
207
+ html.dark-mode .search .clear-button path {
208
+ stroke: var(--dm-search-clear-icon);
209
+ }
210
+
196
211
  html.dark-mode .search .results-panel {
197
212
  background: var(--dm-bg);
198
213
  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.0.3",
4
+ "version": "1.0.4",
5
5
  "license": "MIT",
6
6
  "author": {
7
7
  "name": "Piotr Kowalski",