cosmos-docusaurus-theme 1.2.4 → 1.2.5

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,19 @@ This project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.htm
7
7
 
8
8
  ---
9
9
 
10
+ ## [1.2.5] — 2026-03-10
11
+
12
+ ### Fixed
13
+
14
+ - **Search position**: add `{ type: 'search' }` in demo config before external links
15
+ (CSS `order` alone insufficient when easyops inserts search last in DOM)
16
+ - **Search CSS selectors**: `[class*="navbarSearchContainer"]` with `order: -1 !important`
17
+ + `[class*="navbarSearch"]` — previous `.navbar__search` didn't match actual class
18
+ - **Search input styling**: `!important` on bg/color to beat CSS module specificity
19
+ - **CTRL+K**: redesigned as compact transparent pill with clean kbd elements
20
+ - **colorModeToggle**: `order: 1 !important` on wrapper div (not button)
21
+ - **Hover**: navbar link color now changes to brand primary in both modes
22
+
10
23
  ## [1.2.2] — 2026-03-10
11
24
 
12
25
  ### Added
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "cosmos-docusaurus-theme",
3
- "version": "1.2.4",
3
+ "version": "1.2.5",
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
@@ -254,6 +254,12 @@ button[aria-label*="dark and light mode"]:hover::before {
254
254
 
255
255
  .navbar__link:hover {
256
256
  background: rgb(70, 95, 255, 0.08);
257
+ color: var(--ifm-color-primary);
258
+ }
259
+
260
+ [data-theme='dark'] .navbar__link:hover {
261
+ color: #7592ff;
262
+ background: rgb(117, 146, 255, 0.10);
257
263
  }
258
264
 
259
265
  /* Force direct properties — CSS variables alone are not reliable for navbar
@@ -928,60 +934,101 @@ details > :not(summary) {
928
934
  --ifm-navbar-search-input-icon: url("data:image/svg+xml;utf8,<svg fill='%23a3a3a3' xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16' height='16px' width='16px'><path d='M6.02945,10.20327a4.17382,4.17382,0,1,1,4.17382-4.17382A4.15609,4.15609,0,0,1,6.02945,10.20327Zm9.69195,4.2199L10.8989,9.59979A5.88021,5.88021,0,0,0,12.058,6.02856,6.00467,6.00467,0,1,0,9.59979,10.8989l4.82338,4.82338a.89729.89729,0,0,0,1.29912,0,.89749.89749,0,0,0-.00087-1.29909Z' /></svg>");
929
935
  }
930
936
 
931
- /* Navbar search input styled like Rackscope AppSearch component */
937
+ /* ── Navbar search — input styling ───────────────────────────────────────── */
938
+ /* The easyops search plugin renders: navbarSearchContainer > searchBarContainer
939
+ > input.navbar__search-input.searchInput_xxx (CSS module).
940
+ We need !important on background/color to beat the CSS module specificity. */
941
+
932
942
  .navbar__search-input {
933
- height: 38px;
934
- min-width: 220px;
935
- border-radius: 8px;
936
- border: 1px solid var(--ifm-toc-border-color);
937
- background-color: var(--ifm-code-background);
938
- color: var(--ifm-font-color-base);
939
- font-size: 0.875rem;
940
- transition: border-color 0.15s, background-color 0.15s, box-shadow 0.15s;
943
+ height: 38px !important;
944
+ min-width: 220px !important;
945
+ border-radius: 8px !important;
946
+ border: 1px solid var(--ifm-toc-border-color) !important;
947
+ font-size: 0.875rem !important;
948
+ transition: border-color 0.15s, background-color 0.15s, box-shadow 0.15s !important;
949
+ }
950
+
951
+ /* Light (Slate): bg-gray-100 */
952
+ .navbar__search-input {
953
+ background-color: #f3f4f6 !important;
954
+ color: #1a1714 !important;
941
955
  }
942
956
 
943
957
  .navbar__search-input::placeholder {
944
- color: var(--ifm-font-color-secondary);
945
- font-size: 0.875rem;
958
+ color: #8a8479 !important;
959
+ }
960
+
961
+ /* Dark (Void): bg-gray-800 */
962
+ [data-theme='dark'] .navbar__search-input {
963
+ background-color: #1f2937 !important;
964
+ color: #e5e5e5 !important;
965
+ }
966
+
967
+ [data-theme='dark'] .navbar__search-input::placeholder {
968
+ color: #71717a !important;
946
969
  }
947
970
 
948
971
  .navbar__search-input:focus {
949
- border-color: var(--ifm-color-primary);
950
- background-color: var(--ifm-background-surface-color);
951
- box-shadow: 0 0 0 3px rgb(70, 95, 255, 0.10);
952
- outline: none;
972
+ border-color: var(--ifm-color-primary) !important;
973
+ background-color: var(--ifm-background-surface-color) !important;
974
+ box-shadow: 0 0 0 3px rgb(70, 95, 255, 0.10) !important;
975
+ outline: none !important;
953
976
  }
954
977
 
955
978
  [data-theme='dark'] .navbar__search-input:focus {
956
- box-shadow: 0 0 0 3px rgb(117, 146, 255, 0.12);
979
+ background-color: #111827 !important;
980
+ box-shadow: 0 0 0 3px rgb(117, 146, 255, 0.12) !important;
957
981
  }
958
982
 
959
- /* Ctrl+K hint badges inside search input */
960
- [class*="searchHint"] kbd,
961
- .navbar__search-input ~ * kbd {
962
- background: var(--ifm-code-background);
963
- border: 1px solid var(--ifm-toc-border-color);
964
- border-radius: 4px;
965
- color: var(--ifm-font-color-secondary);
966
- font-size: 0.65rem;
967
- font-family: var(--ifm-font-family-monospace);
968
- padding: 1px 5px;
969
- box-shadow: none;
983
+ /* ── Ctrl+K keyboard shortcut compact pill style ───────────────────────── */
984
+ /* Replaces the default split kbd elements with a unified minimal appearance */
985
+ [class*="searchHintContainer"] {
986
+ gap: 2px !important;
987
+ }
988
+
989
+ [class*="searchHint"] {
990
+ display: inline-flex !important;
991
+ align-items: center !important;
992
+ gap: 1px !important;
993
+ background: transparent !important;
994
+ border: 1px solid var(--ifm-toc-border-color) !important;
995
+ border-radius: 5px !important;
996
+ padding: 1px 5px !important;
997
+ box-shadow: none !important;
998
+ }
999
+
1000
+ /* Individual kbd keys inside the hint */
1001
+ [class*="searchHint"] kbd {
1002
+ background: transparent !important;
1003
+ border: none !important;
1004
+ border-radius: 0 !important;
1005
+ color: var(--ifm-font-color-secondary) !important;
1006
+ font-size: 0.68rem !important;
1007
+ font-family: var(--ifm-font-family-monospace) !important;
1008
+ padding: 0 !important;
1009
+ box-shadow: none !important;
1010
+ line-height: 1.4 !important;
970
1011
  }
971
1012
 
972
- /* Right-side navbar ordering: Search | GitHub | Theme toggle */
973
- .navbar__search {
974
- order: 0;
1013
+ /* ── Right-side navbar order: Search | GitHub/npm | Theme ────────────────── */
1014
+ /* Real DOM structure: navbarSearchContainer | a.navbar__link | colorModeToggle
1015
+ All are direct children of .navbar__items--right (flex container).
1016
+ Use !important to beat any default ordering. */
1017
+
1018
+ /* Search container (class contains 'navbarSearch') — leftmost */
1019
+ [class*="navbarSearch"],
1020
+ [class*="navbarSearchContainer"] {
1021
+ order: -1 !important;
975
1022
  }
976
1023
 
1024
+ /* External links (GitHub, npm…) — middle */
977
1025
  .navbar__items--right .navbar__link {
978
- order: 1;
1026
+ order: 0 !important;
979
1027
  }
980
1028
 
981
- /* Color mode toggle wrapper (direct flex child) — rightmost */
982
- /* Must target the wrapper div, not button[aria-label] which is a nested child */
1029
+ /* Color mode toggle wrapper — rightmost */
983
1030
  [class*="colorModeToggle"] {
984
- order: 2;
1031
+ order: 1 !important;
985
1032
  }
986
1033
 
987
1034
  /* ── Algolia DocSearch ───────────────────────────────────────────────────── */