cosmos-docusaurus-theme 1.1.1 → 1.1.3

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 CHANGED
@@ -7,6 +7,22 @@ This project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.htm
7
7
 
8
8
  ---
9
9
 
10
+ ## [1.1.3] — 2026-03-10
11
+
12
+ ### Added
13
+
14
+ - **Theme transition**: smooth 0.25s fade on `background-color`, `color`, `border-color`
15
+ for navbar, sidebar, article, footer and cards — no more abrupt color switch
16
+ - **Color mode tooltip**: shows current mode (`dark mode` / `light mode` / `system mode`)
17
+ on hover over the Docusaurus toggle button — styled per Void/Slate palette
18
+
19
+ ## [1.1.2] — 2026-03-10
20
+
21
+ ### Added
22
+
23
+ - `.state-ok`, `.state-warn`, `.state-crit`, `.state-unknown` — aliases for projects
24
+ that use `.state-*` naming convention (identical colors to `.status-*`)
25
+
10
26
  ## [1.1.1] — 2026-03-09
11
27
 
12
28
  ### Fixed
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "cosmos-docusaurus-theme",
3
- "version": "1.1.1",
3
+ "version": "1.1.3",
4
4
  "description": "A clean, dark-first Docusaurus CSS theme based on TailAdmin design system with Outfit typography",
5
5
  "keywords": [
6
6
  "docusaurus",
package/src/css/theme.css CHANGED
@@ -146,6 +146,86 @@ 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
+ bottom: 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 down from tooltip */
199
+ button[aria-label*="dark and light mode"]::before {
200
+ content: '';
201
+ position: absolute;
202
+ bottom: calc(100% + 4px);
203
+ left: 50%;
204
+ transform: translateX(-50%);
205
+ border: 5px solid transparent;
206
+ border-top-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-top-color: #e5e7eb;
227
+ }
228
+
149
229
  /* ── Navbar ──────────────────────────────────────────────────────────────── */
150
230
  .navbar {
151
231
  border-bottom: 1px solid var(--ifm-toc-border-color);
@@ -652,3 +732,24 @@ code {
652
732
  color: #6b7280; /* neutral gray-500 */
653
733
  font-weight: 600;
654
734
  }
735
+
736
+ /* Aliases for projects that use .state-* naming (e.g. Rackscope docs) */
737
+ .state-ok {
738
+ color: #12b76a;
739
+ font-weight: 600;
740
+ }
741
+
742
+ .state-warn {
743
+ color: #f79009;
744
+ font-weight: 600;
745
+ }
746
+
747
+ .state-crit {
748
+ color: #f04438;
749
+ font-weight: 600;
750
+ }
751
+
752
+ .state-unknown {
753
+ color: #6b7280;
754
+ font-weight: 600;
755
+ }