cosmos-docusaurus-theme 1.2.3 → 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.3",
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
@@ -924,35 +930,105 @@ details > :not(summary) {
924
930
  --ifm-navbar-search-input-background-color: #1f2937;
925
931
  --ifm-navbar-search-input-color: #e5e5e5;
926
932
  --ifm-navbar-search-input-placeholder-color: #a3a3a3;
933
+ /* Fix: SVG background-image can't use currentColor — hardcode a light fill */
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>");
927
935
  }
928
936
 
929
- /* Navbar search input styled like Rackscope's AppSearch component */
930
- /* rounded-lg, bg surface, border, focus ring consistent with the app */
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
+
931
942
  .navbar__search-input {
932
- height: 36px;
933
- min-width: 180px;
934
- border-radius: 8px;
935
- border: 1px solid var(--ifm-toc-border-color);
936
- background-color: var(--ifm-code-background);
937
- color: var(--ifm-font-color-base);
938
- font-size: 0.875rem;
939
- 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;
940
955
  }
941
956
 
942
957
  .navbar__search-input::placeholder {
943
- color: var(--ifm-font-color-secondary);
944
- 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;
945
969
  }
946
970
 
947
971
  .navbar__search-input:focus {
948
- border-color: var(--ifm-color-primary);
949
- background-color: var(--ifm-background-surface-color);
950
- box-shadow: 0 0 0 3px rgb(70, 95, 255, 0.10);
951
- 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;
952
976
  }
953
977
 
954
978
  [data-theme='dark'] .navbar__search-input:focus {
955
- 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;
981
+ }
982
+
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;
1011
+ }
1012
+
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;
1022
+ }
1023
+
1024
+ /* External links (GitHub, npm…) — middle */
1025
+ .navbar__items--right .navbar__link {
1026
+ order: 0 !important;
1027
+ }
1028
+
1029
+ /* Color mode toggle wrapper — rightmost */
1030
+ [class*="colorModeToggle"] {
1031
+ order: 1 !important;
956
1032
  }
957
1033
 
958
1034
  /* ── Algolia DocSearch ───────────────────────────────────────────────────── */