cosmos-docusaurus-theme 1.1.2 → 1.1.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.
- package/CHANGELOG.md +17 -0
- package/package.json +1 -1
- package/src/css/theme.css +81 -0
package/CHANGELOG.md
CHANGED
|
@@ -7,6 +7,23 @@ This project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.htm
|
|
|
7
7
|
|
|
8
8
|
---
|
|
9
9
|
|
|
10
|
+
## [1.1.4] — 2026-03-10
|
|
11
|
+
|
|
12
|
+
### Fixed
|
|
13
|
+
|
|
14
|
+
- Tooltip now appears **below** the toggle button instead of above (was clipped
|
|
15
|
+
by the top of the viewport since the navbar sits at the very top of the page)
|
|
16
|
+
- Arrow direction corrected accordingly (points up toward the button)
|
|
17
|
+
|
|
18
|
+
## [1.1.3] — 2026-03-10
|
|
19
|
+
|
|
20
|
+
### Added
|
|
21
|
+
|
|
22
|
+
- **Theme transition**: smooth 0.25s fade on `background-color`, `color`, `border-color`
|
|
23
|
+
for navbar, sidebar, article, footer and cards — no more abrupt color switch
|
|
24
|
+
- **Color mode tooltip**: shows current mode (`dark mode` / `light mode` / `system mode`)
|
|
25
|
+
on hover over the Docusaurus toggle button — styled per Void/Slate palette
|
|
26
|
+
|
|
10
27
|
## [1.1.2] — 2026-03-10
|
|
11
28
|
|
|
12
29
|
### Added
|
package/package.json
CHANGED
package/src/css/theme.css
CHANGED
|
@@ -146,6 +146,87 @@ html {
|
|
|
146
146
|
-webkit-font-smoothing: antialiased;
|
|
147
147
|
}
|
|
148
148
|
|
|
149
|
+
/* ── Smooth dark/light theme transition ──────────────────────────────────── */
|
|
150
|
+
/* Fades background, text and borders when the user toggles the color mode. */
|
|
151
|
+
/* Scoped to key layout elements — avoids blanket html/body transitions that */
|
|
152
|
+
/* can cause perf issues on pages with many elements. */
|
|
153
|
+
.navbar,
|
|
154
|
+
.theme-doc-sidebar-container,
|
|
155
|
+
.menu__link,
|
|
156
|
+
.main-wrapper,
|
|
157
|
+
article,
|
|
158
|
+
.footer,
|
|
159
|
+
.table-of-contents__link,
|
|
160
|
+
.pagination-nav__link,
|
|
161
|
+
.prism-code,
|
|
162
|
+
.alert,
|
|
163
|
+
.card {
|
|
164
|
+
transition:
|
|
165
|
+
background-color 0.25s ease,
|
|
166
|
+
color 0.2s ease,
|
|
167
|
+
border-color 0.2s ease;
|
|
168
|
+
}
|
|
169
|
+
|
|
170
|
+
/* ── Color mode toggle — styled tooltip ──────────────────────────────────── */
|
|
171
|
+
/* The toggle button has title="dark mode" | "light mode" | "system mode" */
|
|
172
|
+
/* which updates to reflect the current state. We display it as a tooltip. */
|
|
173
|
+
button[aria-label*="dark and light mode"] {
|
|
174
|
+
position: relative;
|
|
175
|
+
}
|
|
176
|
+
|
|
177
|
+
button[aria-label*="dark and light mode"]::after {
|
|
178
|
+
content: attr(title);
|
|
179
|
+
position: absolute;
|
|
180
|
+
top: calc(100% + 10px);
|
|
181
|
+
left: 50%;
|
|
182
|
+
transform: translateX(-50%);
|
|
183
|
+
padding: 5px 10px;
|
|
184
|
+
background: #111827;
|
|
185
|
+
color: #e5e5e5;
|
|
186
|
+
border: 1px solid #1f2937;
|
|
187
|
+
border-radius: 6px;
|
|
188
|
+
font-family: var(--ifm-font-family-base);
|
|
189
|
+
font-size: 0.75rem;
|
|
190
|
+
font-weight: 500;
|
|
191
|
+
white-space: nowrap;
|
|
192
|
+
pointer-events: none;
|
|
193
|
+
opacity: 0;
|
|
194
|
+
transition: opacity 0.15s ease;
|
|
195
|
+
z-index: 100;
|
|
196
|
+
}
|
|
197
|
+
|
|
198
|
+
/* Arrow pointing up toward button */
|
|
199
|
+
button[aria-label*="dark and light mode"]::before {
|
|
200
|
+
content: '';
|
|
201
|
+
position: absolute;
|
|
202
|
+
top: calc(100% + 4px);
|
|
203
|
+
left: 50%;
|
|
204
|
+
transform: translateX(-50%);
|
|
205
|
+
border: 5px solid transparent;
|
|
206
|
+
border-bottom-color: #1f2937;
|
|
207
|
+
pointer-events: none;
|
|
208
|
+
opacity: 0;
|
|
209
|
+
transition: opacity 0.15s ease;
|
|
210
|
+
z-index: 100;
|
|
211
|
+
}
|
|
212
|
+
|
|
213
|
+
button[aria-label*="dark and light mode"]:hover::after,
|
|
214
|
+
button[aria-label*="dark and light mode"]:hover::before {
|
|
215
|
+
opacity: 1;
|
|
216
|
+
}
|
|
217
|
+
|
|
218
|
+
[data-theme='light'] button[aria-label*="dark and light mode"]::after {
|
|
219
|
+
background: #fff;
|
|
220
|
+
color: #1a1714;
|
|
221
|
+
border-color: #e5e7eb;
|
|
222
|
+
box-shadow: 0 2px 8px rgb(0, 0, 0, 0.1);
|
|
223
|
+
}
|
|
224
|
+
|
|
225
|
+
[data-theme='light'] button[aria-label*="dark and light mode"]::before {
|
|
226
|
+
border-bottom-color: #e5e7eb;
|
|
227
|
+
border-top-color: transparent;
|
|
228
|
+
}
|
|
229
|
+
|
|
149
230
|
/* ── Navbar ──────────────────────────────────────────────────────────────── */
|
|
150
231
|
.navbar {
|
|
151
232
|
border-bottom: 1px solid var(--ifm-toc-border-color);
|