@keenmate/pure-css 1.0.0-rc05 → 1.0.0-rc06

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
@@ -3,6 +3,49 @@
3
3
  All notable changes to `@keenmate/pure-css` are documented here. Format based on
4
4
  [Keep a Changelog](https://keepachangelog.com/en/1.0.0/).
5
5
 
6
+ ## [1.0.0-rc06] — 2026-08-30
7
+
8
+ ### Fixed
9
+
10
+ - **The app shell now renders standalone — component `--pc-*` tokens fall back to
11
+ `--base-*`.** rc05 relocated the shell into the foundation, but its CSS
12
+ hard-referenced component tokens (`--pc-navbar-bg`, `--pc-sidebar-*`,
13
+ `--pc-footer-*`, `--pc-card-bg`, `--pc-input-bg`) that pure-css does **not**
14
+ emit — those are pure-admin's `output-pc-component-variables` contract. So a
15
+ consumer linking `base.css` / `pure-css.css` alone (keen-docs hit this) got an
16
+ unstyled navbar/sidebar. Every such reference now carries a `--base-*` fallback
17
+ traced from the token's own derivation: `var(--pc-navbar-bg, var(--base-main-bg))`,
18
+ `var(--pc-sidebar-bg, var(--base-page-bg))`, navbar/sidebar text →
19
+ `--base-text-color-1/2`, borders → `--base-border-color`, submenu surfaces →
20
+ `--base-subtle-bg`, input → `--base-input-bg`. This makes `--pc-*` an *optional*
21
+ override layer over a guaranteed `--base-*` floor — link only the base vars and
22
+ the shell just works; set `--pc-navbar-bg` to tune the bar independently of the
23
+ page. 40 references across the eight shell partials.
24
+ - **Dangling token references in `_fit-flyout.scss`.** The fit-flyout trigger
25
+ referenced `--pc-accent-color` (defined nowhere — the token is `--pc-accent`)
26
+ with no fallback, so its focus outline was inert; and `--pc-hover-bg` (also
27
+ undefined) with only an rgba literal. Repointed to
28
+ `var(--pc-accent, var(--base-accent-color))` and
29
+ `var(--pc-hover-bg, var(--base-hover-bg, rgba(…)))`.
30
+
31
+ ### Changed
32
+
33
+ - **Unified the `--pc-border-radius*` scale with the `--base-border-radius-*`
34
+ contract the components already use.** pure-css shipped two disconnected radius
35
+ systems: `--base-border-radius-sm/md/lg` (the unitless rem-multipliers
36
+ `0.4/0.6/0.8` every web/svelte component reads — e.g. web-multiselect's
37
+ `calc(var(--base-border-radius-md) * --ms-rem)`), and its OWN
38
+ `--pc-border-radius-sm/base/lg` as hardcoded `2px/4px/8px` literals disconnected
39
+ from the base layer. On one themed page a `<keen-web-multiselect>` and a pure-css
40
+ `.rounded` element rounded differently, and a runtime `--base-border-radius-*`
41
+ override re-rounded the components but not pure-css's own elements. The three
42
+ `--pc-border-radius*` tokens now derive from the base contract —
43
+ `calc(var(--base-border-radius-{sm,md,lg}, <default>) * 1rem)` (unsuffixed
44
+ `--pc-border-radius` = the `-md` mid step) — mirroring how `--pc-border-color`
45
+ already tracked `--base-border-color`. **Rendered radii change** to match the
46
+ ecosystem: `-sm` 2px → 4px, mid 4px → 6px, `-lg` 8px (unchanged). Overriding
47
+ `--base-border-radius-*` now re-rounds pure-css and the components together.
48
+
6
49
  ## [1.0.0-rc05] — 2026-08-27 [PUBLISHED]
7
50
 
8
51
  ### Added
package/README.md CHANGED
@@ -4,6 +4,11 @@ The KeenMate CSS **foundation** — the `--base-*` theming contract, the flexbox
4
4
  utility classes — extracted from [`@keenmate/pure-admin-core`](https://github.com/KeenMate/pure-admin)
5
5
  so it can be consumed on its own.
6
6
 
7
+ ## What's New in 1.0.0-rc06
8
+
9
+ - **The app shell renders standalone — no `--pc-*` component setup required** — rc05 moved the shell into the foundation, but its CSS referenced component tokens (`--pc-navbar-bg`, `--pc-sidebar-*`, `--pc-card-bg`, …) that pure-css doesn't emit, so linking `base.css` / `pure-css.css` alone gave an unstyled navbar/sidebar (keen-docs hit this). Every such reference now falls back to a `--base-*` var that pure-css *does* emit — `var(--pc-navbar-bg, var(--base-main-bg))` and friends, 40 in all, each traced from the token's real derivation. That's a clean two-tier contract: link the base vars and the shell just works out of the box; set the `--pc-*` token only when you want to fine-tune a piece independently. Also fixed two dangling refs in the fit flyout (`--pc-accent-color` → `--pc-accent`, plus a `--base-hover-bg` tier for `--pc-hover-bg`).
10
+ - **One border-radius scale across the whole ecosystem** — pure-css shipped two disconnected radius systems: the `--base-border-radius-sm/md/lg` multipliers every web/svelte component reads (e.g. web-multiselect), and its own `--pc-border-radius*` as hardcoded 2/4/8px literals that ignored the base layer — so a `<keen-web-multiselect>` and a pure-css `.rounded` element rounded differently on the same theme, and a runtime `--base-border-radius-*` override moved the components but not pure-css's own elements. The `--pc-border-radius*` tokens now derive from `--base-border-radius-*` (`calc(var(--base-border-radius-md, 0.6) * 1rem)`), so radii match the components and one override re-rounds everything together. Rendered corners change slightly: small 2px→4px, medium 4px→6px, large unchanged.
11
+
7
12
  ## What's New in 1.0.0-rc05
8
13
 
9
14
  - **App shell — the navbar, sidebar, and layout container join the foundation** — pure-css has been variables + grid + utilities since the extraction; rc05 relocates the structural *app-shell* layer out of `@keenmate/pure-admin-core`, so a standalone page gets the same navbar/sidebar/layout chrome as a full admin app without pulling in the 40+ component library. Eight new partials (`_navbar.scss`, `_navbar-elements.scss`, `_sidebar.scss`, `_sidebar-states.scss`, `_layout-container.scss`, `_layout-responsive.scss`, `_resize-handle.scss`, `_fit-flyout.scss`) `@use` into the `pure-css.css` bundle — `base.css`, `grid.css` and `utilities.css` are untouched and there's no new CSS artifact. The emitted surface is `pc-`-branded like the rest of the foundation: the fixed navbar (`.pc-navbar` + `__start`/`__center`/`__end`, burger, brand `.pc-app-header`, `.pc-navmenu`, profile button, theme switcher), the nested sidebar with hidden/icon-collapse/expanded states and a drag-to-resize handle (`.pc-sidebar`, `.pc-layout__sidebar`, `.pc-sidebar-resize`), and the layout wrapper (`.pc-layout` + `__main`/`__content`/`__footer`) with mobile/tablet media queries. pure-admin-core now `@forward`s same-named partials instead of owning copies, so the shell is single-sourced here and can't drift.
@@ -11,42 +16,6 @@ so it can be consumed on its own.
11
16
  - **The grid's automatic responsive context now ships in the same bundle** — `_pa-grid.scss`'s container-query responsive columns (`.pc-col-md-*`, …) need a containment-context ancestor, documented as `.pc-layout__main`. That selector previously lived only in pure-admin-core, so the note was aspirational for a standalone pure-css page; with `_layout-container.scss` relocated into the bundle, `.pc-layout__main` is emitted here and the responsive variants get their context out of the box (the stale comment still read `.pa-layout__main` from before the rc04 de-brand — corrected to `.pc-layout__main`).
12
17
  - **Toolchain-free zip distribution via GitHub Releases** — a new `.github/workflows/release.yml` builds the CSS on every `v*.*.*` tag push and publishes a GitHub Release carrying `pure-css-<version>.zip` (the same file set as the npm package — `dist/`, `src/scss/`, `README.md`, `CHANGELOG.md`, `LICENSE`) plus a `.sha256` checksum, so consumers who don't use npm can vendor the built foundation as a drop-in. rc tags (those containing `-`) publish as GitHub pre-releases. Mirrors pure-admin-core's release workflow, adapted for this single-package repo.
13
18
 
14
- ## What's New in 1.0.0-rc04
15
-
16
- - **pure-css is now strictly a base — it emits only the base token contract
17
- (BREAKING).** `base.css` / `pure-css.css` ship the ~46 base `--pc-*` tokens the
18
- foundation actually uses or exposes as universal primitives; the ~165 component
19
- tokens (buttons, cards, tables, alerts, panels, …) are pure-admin's contract,
20
- emitted by the new `output-pc-component-variables` mixin. If you author themes
21
- or call the emit mixins, add `@include output-pc-component-variables;` after
22
- `output-pc-css-variables`. Consumers of compiled CSS are unaffected.
23
- - **The foundation namespace is fully de-branded from `pa` to `pc` (BREAKING).**
24
- pure-css was carved out of pure-admin, so it still carried pure-admin's `pa`
25
- brand in its public surface. That's gone:
26
- - **Grid + mode classes:** `.pa-row` / `.pa-col*` / `.pa-offset*` / `.pa-cq` /
27
- `.pa-hide*` / `.pa-show*` → `.pc-*`; `.pa-mode-light` / `.pa-mode-dark` →
28
- `.pc-mode-*`.
29
- - **Every emitted CSS variable:** the whole `--pa-*` runtime surface (~210
30
- custom properties) → `--pc-*` (`--pa-accent` → `--pc-accent`, `--pa-card-bg`
31
- → `--pc-card-bg`, `--pa-color-1..9` → `--pc-color-1..9`, …). `--base-*`
32
- (web-component bridge) and `--page-loader-*` are unchanged.
33
- - **The emit mixins:** `output-pa-css-variables` → `output-pc-css-variables`,
34
- `output-pa-alert-variables-light/dark` → `output-pc-alert-variables-*`.
35
- Consumers migrate markup, `var()` reads, inline `style="--pa-…"`, and theme
36
- `:root` blocks in lockstep — a boundary-aware find/replace of the string
37
- `--pa-` → `--pc-` (safe: it can't touch `--base-*`, `--page-loader-*`, or the
38
- `.pa-color-{name}` variant **class**).
39
- - **Sizing utilities consolidated into the foundation.** The universal
40
- viewport-height utilities (`h-full` / `h-screen` / `min-h-full` /
41
- `min-h-screen` / `max-h-full` / `max-h-screen`) and the Tailwind-style flex
42
- shorthands (`flex-1` / `flex-auto` / `flex-initial` / `flex-none` /
43
- `flex-grow` / `flex-shrink`) now ship from pure-css, so a standalone page gets
44
- the complete set without borrowing anything from pure-admin. pure-admin's
45
- duplicate rem-height `h-Nx` / `min-h-Nx` / `max-h-Nx` classes are retired in
46
- favour of the foundation's `hr-` / `wr-` naming (`r` = rem).
47
- - **Complete form-spacing contract as runtime `--pc-*` variables** and the
48
- `$form-scale` → `$form-gap` rename (see CHANGELOG).
49
-
50
19
  ## Why
51
20
 
52
21
  Any surface that isn't a full admin app — a docs site, a marketing page, a standalone widget host —
package/dist/css/base.css CHANGED
@@ -142,7 +142,7 @@
142
142
  --pc-color-7-text: #ffffff;
143
143
  --pc-color-8-text: #ffffff;
144
144
  --pc-color-9-text: #ffffff;
145
- --pc-border-radius-sm: 2px;
146
- --pc-border-radius: 4px;
147
- --pc-border-radius-lg: 8px;
145
+ --pc-border-radius-sm: calc(var(--base-border-radius-sm, 0.4) * 1rem);
146
+ --pc-border-radius: calc(var(--base-border-radius-md, 0.6) * 1rem);
147
+ --pc-border-radius-lg: calc(var(--base-border-radius-lg, 0.8) * 1rem);
148
148
  }
@@ -1907,8 +1907,8 @@ label {
1907
1907
  top: 0;
1908
1908
  inset-inline: 0;
1909
1909
  height: 4.8rem;
1910
- background-color: var(--pc-navbar-bg);
1911
- border-bottom: 1px solid var(--pc-navbar-border-color);
1910
+ background-color: var(--pc-navbar-bg, var(--base-main-bg));
1911
+ border-bottom: 1px solid var(--pc-navbar-border-color, var(--base-border-color));
1912
1912
  z-index: 4000;
1913
1913
  display: flex;
1914
1914
  align-items: center;
@@ -1997,14 +1997,14 @@ body.pc-container-2xl .pc-navbar {
1997
1997
  margin: 0;
1998
1998
  font-size: 1.8rem;
1999
1999
  font-weight: 600;
2000
- color: var(--pc-navbar-text);
2000
+ color: var(--pc-navbar-text, var(--base-text-color-1));
2001
2001
  white-space: nowrap;
2002
2002
  }
2003
2003
  .pc-app-header__version {
2004
2004
  margin-inline-start: 0.4rem;
2005
2005
  font-size: 1.2rem;
2006
2006
  font-weight: 400;
2007
- color: var(--pc-navbar-text-secondary);
2007
+ color: var(--pc-navbar-text-secondary, var(--base-text-color-2));
2008
2008
  }
2009
2009
 
2010
2010
  .pc-navbar__burger {
@@ -2030,7 +2030,7 @@ body.pc-container-2xl .pc-navbar {
2030
2030
  }
2031
2031
  .pc-navmenu > ul > li > a {
2032
2032
  text-decoration: none;
2033
- color: var(--pc-navbar-text-secondary);
2033
+ color: var(--pc-navbar-text-secondary, var(--base-text-color-2));
2034
2034
  font-weight: 500;
2035
2035
  padding: 0.4rem 0.8rem;
2036
2036
  border-radius: var(--pc-border-radius);
@@ -2040,11 +2040,11 @@ body.pc-container-2xl .pc-navbar {
2040
2040
  align-items: center;
2041
2041
  }
2042
2042
  .pc-navmenu > ul > li > a:hover {
2043
- color: var(--pc-navbar-text);
2043
+ color: var(--pc-navbar-text, var(--base-text-color-1));
2044
2044
  background-color: color-mix(in srgb, currentColor 12%, transparent);
2045
2045
  }
2046
2046
  .pc-navmenu > ul > li.pc-navmenu__item--active > a, .pc-navmenu > ul > li.pc-navmenu__item--active > a:hover {
2047
- color: var(--pc-navbar-text);
2047
+ color: var(--pc-navbar-text, var(--base-text-color-1));
2048
2048
  background-color: color-mix(in srgb, currentColor 22%, transparent);
2049
2049
  font-weight: 600;
2050
2050
  }
@@ -2070,7 +2070,7 @@ body.pc-container-2xl .pc-navbar {
2070
2070
  top: 100%;
2071
2071
  inset-inline-start: 0;
2072
2072
  min-width: 19.2rem;
2073
- background-color: var(--pc-card-bg);
2073
+ background-color: var(--pc-card-bg, var(--base-main-bg));
2074
2074
  border: 1px solid var(--pc-border-color);
2075
2075
  border-radius: var(--pc-border-radius);
2076
2076
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
@@ -2194,7 +2194,7 @@ body.pc-container-2xl .pc-navbar {
2194
2194
  margin: 0;
2195
2195
  font-size: 1.8rem;
2196
2196
  font-weight: 600;
2197
- color: var(--pc-navbar-text);
2197
+ color: var(--pc-navbar-text, var(--base-text-color-1));
2198
2198
  white-space: nowrap;
2199
2199
  overflow: hidden;
2200
2200
  text-overflow: ellipsis;
@@ -2218,7 +2218,7 @@ body.pc-container-2xl .pc-navbar {
2218
2218
  .burger-menu span {
2219
2219
  width: 100%;
2220
2220
  height: 2px;
2221
- background-color: var(--pc-navbar-text);
2221
+ background-color: var(--pc-navbar-text, var(--base-text-color-1));
2222
2222
  border-radius: var(--pc-border-radius);
2223
2223
  transition: all 0.15s ease-out;
2224
2224
  transform-origin: center;
@@ -2248,15 +2248,15 @@ body.pc-container-2xl .pc-navbar {
2248
2248
  gap: 0.8rem;
2249
2249
  }
2250
2250
  .theme-switcher label {
2251
- color: var(--pc-navbar-text-secondary);
2251
+ color: var(--pc-navbar-text-secondary, var(--base-text-color-2));
2252
2252
  font-size: 1.4rem;
2253
2253
  }
2254
2254
  .theme-switcher select {
2255
2255
  padding: 0.4rem 0.8rem;
2256
2256
  border: 1px solid var(--pc-border-color);
2257
2257
  border-radius: var(--pc-border-radius);
2258
- background-color: var(--pc-navbar-bg);
2259
- color: var(--pc-navbar-text);
2258
+ background-color: var(--pc-navbar-bg, var(--base-main-bg));
2259
+ color: var(--pc-navbar-text, var(--base-text-color-1));
2260
2260
  font-size: 1.4rem;
2261
2261
  }
2262
2262
  .theme-switcher select:focus {
@@ -2287,7 +2287,7 @@ body.pc-container-2xl .pc-navbar {
2287
2287
  }
2288
2288
 
2289
2289
  .pc-layout__sidebar {
2290
- background-color: var(--pc-sidebar-bg);
2290
+ background-color: var(--pc-sidebar-bg, var(--base-page-bg));
2291
2291
  border-inline-end: 1px solid var(--pc-border-color);
2292
2292
  flex-shrink: 0;
2293
2293
  position: relative;
@@ -2314,7 +2314,7 @@ body.pc-container-2xl .pc-navbar {
2314
2314
  width: 14px;
2315
2315
  height: 44px;
2316
2316
  border-radius: min(var(--pc-border-radius-lg), 4px);
2317
- background-color: var(--pc-card-bg);
2317
+ background-color: var(--pc-card-bg, var(--base-main-bg));
2318
2318
  border: 2px solid var(--pc-border-color);
2319
2319
  color: var(--pc-text-color-2);
2320
2320
  font-size: 1.8rem;
@@ -2379,7 +2379,7 @@ body.pc-layout--sticky .pc-layout__sidebar {
2379
2379
  font-weight: 600;
2380
2380
  text-transform: uppercase;
2381
2381
  letter-spacing: 0.05em;
2382
- color: var(--pc-sidebar-text-secondary);
2382
+ color: var(--pc-sidebar-text-secondary, var(--base-text-color-2));
2383
2383
  user-select: none;
2384
2384
  }
2385
2385
  .pc-sidebar__section:first-child {
@@ -2398,7 +2398,7 @@ body.pc-layout--sticky .pc-layout__sidebar {
2398
2398
  align-items: center;
2399
2399
  gap: 1.2rem;
2400
2400
  padding: 0.8rem 1.6rem;
2401
- color: var(--pc-sidebar-text-secondary);
2401
+ color: var(--pc-sidebar-text-secondary, var(--base-text-color-2));
2402
2402
  text-decoration: none;
2403
2403
  font-weight: 500;
2404
2404
  border-inline-end: 3px solid transparent;
@@ -2407,7 +2407,7 @@ body.loaded .pc-sidebar__link {
2407
2407
  transition: all 0.1s ease-out;
2408
2408
  }
2409
2409
  .pc-sidebar__link:hover {
2410
- color: var(--pc-sidebar-text);
2410
+ color: var(--pc-sidebar-text, var(--base-text-color-1));
2411
2411
  background-color: var(--pc-accent-light);
2412
2412
  }
2413
2413
  .pc-sidebar__link--active {
@@ -2425,7 +2425,7 @@ body.loaded .pc-sidebar__link {
2425
2425
  height: 3.5rem;
2426
2426
  padding: 0 1.6rem;
2427
2427
  color: var(--pc-text-color-2);
2428
- background-color: var(--pc-input-bg);
2428
+ background-color: var(--pc-input-bg, var(--base-input-bg));
2429
2429
  border: 1px solid var(--pc-border-color);
2430
2430
  border-radius: var(--pc-border-radius);
2431
2431
  text-align: start;
@@ -2440,7 +2440,7 @@ body.loaded .pc-sidebar__search {
2440
2440
  }
2441
2441
  .pc-sidebar__search:hover {
2442
2442
  border-color: #007bff;
2443
- color: var(--pc-sidebar-text);
2443
+ color: var(--pc-sidebar-text, var(--base-text-color-1));
2444
2444
  }
2445
2445
  .pc-layout__sidebar--icon-collapse .pc-sidebar__search {
2446
2446
  width: auto;
@@ -2475,7 +2475,7 @@ body.loaded .pc-sidebar__search {
2475
2475
  border: none;
2476
2476
  outline: none;
2477
2477
  background: transparent;
2478
- color: var(--pc-sidebar-text);
2478
+ color: var(--pc-sidebar-text, var(--base-text-color-1));
2479
2479
  font: inherit;
2480
2480
  padding: 0;
2481
2481
  }
@@ -2497,7 +2497,7 @@ body.loaded .pc-sidebar__search {
2497
2497
  align-items: center;
2498
2498
  gap: 1.2rem;
2499
2499
  padding: 0.8rem 1.6rem;
2500
- color: var(--pc-sidebar-text-secondary);
2500
+ color: var(--pc-sidebar-text-secondary, var(--base-text-color-2));
2501
2501
  background: none;
2502
2502
  border: none;
2503
2503
  width: 100%;
@@ -2509,7 +2509,7 @@ body.loaded .pc-sidebar__toggle {
2509
2509
  transition: all 0.1s ease-out;
2510
2510
  }
2511
2511
  .pc-sidebar__toggle:hover {
2512
- color: var(--pc-sidebar-text);
2512
+ color: var(--pc-sidebar-text, var(--base-text-color-1));
2513
2513
  background-color: var(--pc-accent-light);
2514
2514
  }
2515
2515
  .pc-sidebar__toggle--active {
@@ -2542,7 +2542,7 @@ body.loaded .pc-sidebar__label {
2542
2542
  margin: 0;
2543
2543
  padding: 0;
2544
2544
  display: none;
2545
- background-color: var(--pc-sidebar-submenu-bg);
2545
+ background-color: var(--pc-sidebar-submenu-bg, var(--base-subtle-bg));
2546
2546
  }
2547
2547
  .pc-sidebar__submenu--open {
2548
2548
  display: block;
@@ -2553,11 +2553,11 @@ body.loaded .pc-sidebar__label {
2553
2553
  border-inline-end: 2px solid transparent;
2554
2554
  }
2555
2555
  .pc-sidebar__submenu > .pc-sidebar__item > .pc-sidebar__link:hover {
2556
- background-color: var(--pc-sidebar-submenu-hover-bg);
2556
+ background-color: var(--pc-sidebar-submenu-hover-bg, var(--base-subtle-bg));
2557
2557
  }
2558
2558
  .pc-sidebar__submenu > .pc-sidebar__item > .pc-sidebar__link--active {
2559
- background-color: var(--pc-sidebar-submenu-active-bg);
2560
- color: var(--pc-sidebar-submenu-active-text);
2559
+ background-color: var(--pc-sidebar-submenu-active-bg, var(--base-subtle-bg));
2560
+ color: var(--pc-sidebar-submenu-active-text, var(--base-text-color-1));
2561
2561
  border-inline-end-color: var(--pc-accent);
2562
2562
  }
2563
2563
  .pc-sidebar__submenu > .pc-sidebar__item > .pc-sidebar__toggle {
@@ -2637,7 +2637,7 @@ body.loaded .pc-sidebar__chevron {
2637
2637
  top: 0;
2638
2638
  bottom: 0;
2639
2639
  padding: 0.8rem 1.6rem;
2640
- background-color: var(--pc-sidebar-bg);
2640
+ background-color: var(--pc-sidebar-bg, var(--base-page-bg));
2641
2641
  border: 1px solid var(--pc-border-color);
2642
2642
  border-inline-start: none;
2643
2643
  border-start-start-radius: 0;
@@ -2662,7 +2662,7 @@ body.loaded .pc-sidebar__chevron {
2662
2662
  margin: 0;
2663
2663
  padding: 0;
2664
2664
  list-style: none;
2665
- background-color: var(--pc-sidebar-submenu-bg);
2665
+ background-color: var(--pc-sidebar-submenu-bg, var(--base-subtle-bg));
2666
2666
  border: 1px solid var(--pc-border-color);
2667
2667
  border-inline-start: none;
2668
2668
  border-start-start-radius: 0;
@@ -2690,14 +2690,14 @@ body.loaded .pc-sidebar__chevron {
2690
2690
  .sidebar-hidden .pc-layout__sidebar--icon-collapse .pc-sidebar__item:hover > .pc-sidebar__submenu .pc-sidebar__toggle:hover,
2691
2691
  .sidebar-hidden .pc-layout__sidebar--icon-collapse .pc-sidebar__submenu:hover .pc-sidebar__link:hover,
2692
2692
  .sidebar-hidden .pc-layout__sidebar--icon-collapse .pc-sidebar__submenu:hover .pc-sidebar__toggle:hover {
2693
- background-color: var(--pc-sidebar-submenu-hover-bg);
2693
+ background-color: var(--pc-sidebar-submenu-hover-bg, var(--base-subtle-bg));
2694
2694
  }
2695
2695
  .sidebar-hidden .pc-layout__sidebar--icon-collapse .pc-sidebar__item:hover > .pc-sidebar__submenu .pc-sidebar__link--active,
2696
2696
  .sidebar-hidden .pc-layout__sidebar--icon-collapse .pc-sidebar__item:hover > .pc-sidebar__submenu .pc-sidebar__toggle--active,
2697
2697
  .sidebar-hidden .pc-layout__sidebar--icon-collapse .pc-sidebar__submenu:hover .pc-sidebar__link--active,
2698
2698
  .sidebar-hidden .pc-layout__sidebar--icon-collapse .pc-sidebar__submenu:hover .pc-sidebar__toggle--active {
2699
- background-color: var(--pc-sidebar-submenu-active-bg);
2700
- color: var(--pc-sidebar-submenu-active-text);
2699
+ background-color: var(--pc-sidebar-submenu-active-bg, var(--base-subtle-bg));
2700
+ color: var(--pc-sidebar-submenu-active-text, var(--base-text-color-1));
2701
2701
  }
2702
2702
  .sidebar-hidden .pc-layout__sidebar--icon-collapse .pc-sidebar__item:hover > .pc-sidebar__submenu .pc-sidebar__icon,
2703
2703
  .sidebar-hidden .pc-layout__sidebar--icon-collapse .pc-sidebar__submenu:hover .pc-sidebar__icon {
@@ -2739,7 +2739,7 @@ body.loaded .pc-sidebar__chevron {
2739
2739
  margin: 0;
2740
2740
  padding: 0;
2741
2741
  list-style: none;
2742
- background-color: var(--pc-sidebar-submenu-bg);
2742
+ background-color: var(--pc-sidebar-submenu-bg, var(--base-subtle-bg));
2743
2743
  border: 1px solid var(--pc-border-color);
2744
2744
  border-inline-start: none;
2745
2745
  border-start-start-radius: 0;
@@ -2881,8 +2881,8 @@ body.pc-layout--sticky .pc-layout__inner {
2881
2881
 
2882
2882
  .pc-layout__footer {
2883
2883
  min-height: 4.8rem;
2884
- background-color: var(--pc-footer-bg);
2885
- border-top: 1px solid var(--pc-footer-border-color);
2884
+ background-color: var(--pc-footer-bg, var(--base-main-bg));
2885
+ border-top: 1px solid var(--pc-footer-border-color, var(--base-border-color));
2886
2886
  display: flex;
2887
2887
  align-items: center;
2888
2888
  padding: 0.4rem 1.6rem;
@@ -2964,7 +2964,7 @@ body.pc-layout--sticky .pc-layout__inner {
2964
2964
  bottom: 0;
2965
2965
  width: 90vw;
2966
2966
  z-index: 1050;
2967
- background-color: var(--pc-sidebar-bg);
2967
+ background-color: var(--pc-sidebar-bg, var(--base-page-bg));
2968
2968
  opacity: 1;
2969
2969
  overflow-y: auto;
2970
2970
  overscroll-behavior: contain;
@@ -3063,14 +3063,14 @@ body.pc-layout--sticky .pc-layout__inner {
3063
3063
  cursor: pointer;
3064
3064
  }
3065
3065
  .pc-fit-flyout__trigger:hover {
3066
- background: var(--pc-hover-bg, rgba(0, 0, 0, 0.05));
3066
+ background: var(--pc-hover-bg, var(--base-hover-bg, rgba(0, 0, 0, 0.05)));
3067
3067
  }
3068
3068
  .pc-fit-flyout__trigger:focus-visible {
3069
- outline: 2px solid var(--pc-accent-color);
3069
+ outline: 2px solid var(--pc-accent, var(--base-accent-color));
3070
3070
  outline-offset: 1px;
3071
3071
  }
3072
3072
  .pc-fit-flyout__trigger[aria-expanded=true] {
3073
- background: var(--pc-hover-bg, rgba(0, 0, 0, 0.08));
3073
+ background: var(--pc-hover-bg, var(--base-hover-bg, rgba(0, 0, 0, 0.08)));
3074
3074
  }
3075
3075
 
3076
3076
  .pc-fit-flyout__dots {
@@ -3103,7 +3103,7 @@ body.pc-layout--sticky .pc-layout__inner {
3103
3103
  min-width: 20rem;
3104
3104
  max-width: 32rem;
3105
3105
  padding: 0.8rem;
3106
- background: var(--pc-card-bg);
3106
+ background: var(--pc-card-bg, var(--base-main-bg));
3107
3107
  border: 1px solid var(--pc-border-color);
3108
3108
  border-radius: var(--pc-border-radius);
3109
3109
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
@@ -6075,7 +6075,7 @@ body.pc-layout--sticky .pc-layout__inner {
6075
6075
  --pc-color-7-text: #ffffff;
6076
6076
  --pc-color-8-text: #ffffff;
6077
6077
  --pc-color-9-text: #ffffff;
6078
- --pc-border-radius-sm: 2px;
6079
- --pc-border-radius: 4px;
6080
- --pc-border-radius-lg: 8px;
6078
+ --pc-border-radius-sm: calc(var(--base-border-radius-sm, 0.4) * 1rem);
6079
+ --pc-border-radius: calc(var(--base-border-radius-md, 0.6) * 1rem);
6080
+ --pc-border-radius-lg: calc(var(--base-border-radius-lg, 0.8) * 1rem);
6081
6081
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@keenmate/pure-css",
3
- "version": "1.0.0-rc05",
3
+ "version": "1.0.0-rc06",
4
4
  "description": "The KeenMate CSS foundation — --base-* theming contract, PureCSS grid and utility classes. Extracted from pure-admin-core so docs sites, standalone pages and every web/svelte component share one theming layer.",
5
5
  "style": "dist/css/pure-css.css",
6
6
  "exports": {
@@ -270,10 +270,17 @@
270
270
  --pc-color-8-text: #{$color-8-text};
271
271
  --pc-color-9-text: #{$color-9-text};
272
272
 
273
- // Border-radius scale
274
- --pc-border-radius-sm: #{$border-radius-sm};
275
- --pc-border-radius: #{$border-radius};
276
- --pc-border-radius-lg: #{$border-radius-lg};
273
+ // Border-radius scale — derived from the --base-border-radius-* contract (the
274
+ // same unitless rem-multipliers the web/svelte components read; e.g.
275
+ // web-multiselect: `calc(var(--base-border-radius-md) * --ms-rem)`). Multiplying
276
+ // by 1rem yields px at pure-css's 10px rem base (0.6 → 0.6rem → 6px) and keeps
277
+ // the scale live: overriding --base-border-radius-* at runtime re-rounds
278
+ // pure-css's own elements and the components together, instead of the old baked
279
+ // 2/4/8px literals that ignored the base contract. The $base-* multipliers are
280
+ // the fallbacks. NOTE: --pc-border-radius (unsuffixed) is the MID (-md) step.
281
+ --pc-border-radius-sm: calc(var(--base-border-radius-sm, #{$base-border-radius-sm}) * 1rem);
282
+ --pc-border-radius: calc(var(--base-border-radius-md, #{$base-border-radius-md}) * 1rem);
283
+ --pc-border-radius-lg: calc(var(--base-border-radius-lg, #{$base-border-radius-lg}) * 1rem);
277
284
  }
278
285
 
279
286
  // ============================================================================
@@ -25,9 +25,9 @@
25
25
  color: inherit;
26
26
  cursor: pointer;
27
27
 
28
- &:hover { background: var(--pc-hover-bg, rgba(0, 0, 0, 0.05)); }
29
- &:focus-visible { outline: 2px solid var(--pc-accent-color); outline-offset: 1px; }
30
- &[aria-expanded='true'] { background: var(--pc-hover-bg, rgba(0, 0, 0, 0.08)); }
28
+ &:hover { background: var(--pc-hover-bg, var(--base-hover-bg, rgba(0, 0, 0, 0.05))); }
29
+ &:focus-visible { outline: 2px solid var(--pc-accent, var(--base-accent-color)); outline-offset: 1px; }
30
+ &[aria-expanded='true'] { background: var(--pc-hover-bg, var(--base-hover-bg, rgba(0, 0, 0, 0.08))); }
31
31
  }
32
32
 
33
33
  // The three dots, drawn so the sink needs no icon-font dependency.
@@ -60,7 +60,7 @@
60
60
  min-width: 20rem;
61
61
  max-width: 32rem;
62
62
  padding: $spacing-sm;
63
- background: var(--pc-card-bg);
63
+ background: var(--pc-card-bg, var(--base-main-bg));
64
64
  border: $border-width-base solid var(--pc-border-color);
65
65
  border-radius: var(--pc-border-radius);
66
66
  box-shadow: $shadow-lg;
@@ -97,8 +97,8 @@ body.pc-layout--sticky .pc-layout__inner {
97
97
  // Footer - outside inner, sibling to inner
98
98
  .pc-layout__footer {
99
99
  min-height: $footer-height;
100
- background-color: var(--pc-footer-bg);
101
- border-top: $border-width-base solid var(--pc-footer-border-color);
100
+ background-color: var(--pc-footer-bg, var(--base-main-bg));
101
+ border-top: $border-width-base solid var(--pc-footer-border-color, var(--base-border-color));
102
102
  display: flex;
103
103
  align-items: center;
104
104
  padding: $spacing-xs $spacing-base;
@@ -38,7 +38,7 @@
38
38
  bottom: 0;
39
39
  width: $mobile-sidebar-width;
40
40
  z-index: 1050;
41
- background-color: var(--pc-sidebar-bg);
41
+ background-color: var(--pc-sidebar-bg, var(--base-page-bg));
42
42
  opacity: 1;
43
43
  overflow-y: auto;
44
44
  overscroll-behavior: contain; // drawer's own scroll doesn't chain to the page
@@ -25,7 +25,7 @@
25
25
  margin: 0;
26
26
  font-size: $font-size-lg;
27
27
  font-weight: $font-weight-semibold;
28
- color: var(--pc-navbar-text);
28
+ color: var(--pc-navbar-text, var(--base-text-color-1));
29
29
  white-space: nowrap;
30
30
  }
31
31
 
@@ -35,7 +35,7 @@
35
35
  margin-inline-start: $spacing-xs;
36
36
  font-size: $font-size-xs;
37
37
  font-weight: $font-weight-normal;
38
- color: var(--pc-navbar-text-secondary);
38
+ color: var(--pc-navbar-text-secondary, var(--base-text-color-2));
39
39
  }
40
40
  }
41
41
 
@@ -66,7 +66,7 @@
66
66
 
67
67
  > a {
68
68
  text-decoration: none;
69
- color: var(--pc-navbar-text-secondary);
69
+ color: var(--pc-navbar-text-secondary, var(--base-text-color-2));
70
70
  font-weight: $font-weight-medium;
71
71
  padding: $spacing-xs $spacing-sm;
72
72
  border-radius: var(--pc-border-radius);
@@ -86,7 +86,7 @@
86
86
  // or --pc-navbar-text tint would be dark-on-dark and vanish. Text
87
87
  // brightens to --pc-navbar-text, which those themes override to match.
88
88
  &:hover {
89
- color: var(--pc-navbar-text);
89
+ color: var(--pc-navbar-text, var(--base-text-color-1));
90
90
  background-color: color-mix(in srgb, currentColor 12%, transparent);
91
91
  }
92
92
  }
@@ -99,7 +99,7 @@
99
99
  &.pc-navmenu__item--active > a {
100
100
  &,
101
101
  &:hover {
102
- color: var(--pc-navbar-text);
102
+ color: var(--pc-navbar-text, var(--base-text-color-1));
103
103
  background-color: color-mix(in srgb, currentColor 22%, transparent);
104
104
  font-weight: $font-weight-semibold;
105
105
  }
@@ -142,7 +142,7 @@
142
142
  top: 100%;
143
143
  inset-inline-start: 0; // RTL: flips to right: 0
144
144
  min-width: 19.2rem;
145
- background-color: var(--pc-card-bg);
145
+ background-color: var(--pc-card-bg, var(--base-main-bg));
146
146
  border: $border-width-base solid var(--pc-border-color);
147
147
  border-radius: var(--pc-border-radius);
148
148
  box-shadow: $shadow-lg;
@@ -329,7 +329,7 @@
329
329
  margin: 0;
330
330
  font-size: $font-size-lg;
331
331
  font-weight: $font-weight-semibold;
332
- color: var(--pc-navbar-text);
332
+ color: var(--pc-navbar-text, var(--base-text-color-1));
333
333
  white-space: nowrap;
334
334
  overflow: hidden;
335
335
  text-overflow: ellipsis;
@@ -356,7 +356,7 @@
356
356
  span {
357
357
  width: 100%;
358
358
  height: $burger-bar-height;
359
- background-color: var(--pc-navbar-text);
359
+ background-color: var(--pc-navbar-text, var(--base-text-color-1));
360
360
  border-radius: var(--pc-border-radius);
361
361
  transition: all $transition-normal $easing-snappy;
362
362
  transform-origin: center;
@@ -399,7 +399,7 @@
399
399
  gap: $spacing-sm;
400
400
 
401
401
  label {
402
- color: var(--pc-navbar-text-secondary);
402
+ color: var(--pc-navbar-text-secondary, var(--base-text-color-2));
403
403
  font-size: $font-size-sm;
404
404
  }
405
405
 
@@ -407,8 +407,8 @@
407
407
  padding: $spacing-xs $spacing-sm;
408
408
  border: $border-width-base solid var(--pc-border-color);
409
409
  border-radius: var(--pc-border-radius);
410
- background-color: var(--pc-navbar-bg);
411
- color: var(--pc-navbar-text);
410
+ background-color: var(--pc-navbar-bg, var(--base-main-bg));
411
+ color: var(--pc-navbar-text, var(--base-text-color-1));
412
412
  font-size: $font-size-sm;
413
413
 
414
414
  &:focus {
@@ -15,8 +15,8 @@ $navbar-search-reserve-width: 18rem !default;
15
15
  top: 0;
16
16
  inset-inline: 0; // RTL: works for both LTR and RTL
17
17
  height: $navbar-height;
18
- background-color: var(--pc-navbar-bg);
19
- border-bottom: $border-width-base solid var(--pc-navbar-border-color);
18
+ background-color: var(--pc-navbar-bg, var(--base-main-bg));
19
+ border-bottom: $border-width-base solid var(--pc-navbar-border-color, var(--base-border-color));
20
20
  z-index: $z-index-navbar; // 2000
21
21
  display: flex;
22
22
  align-items: center;
@@ -46,7 +46,7 @@ $resize-knob-radius-lg: 6px !default;
46
46
  // themes (radius 0) stay square via min(). High-contrast fill / border / shadow
47
47
  // so the knob stands out on both light and dark surfaces.
48
48
  border-radius: min(var(--pc-border-radius-lg), #{$resize-knob-radius});
49
- background-color: var(--pc-card-bg);
49
+ background-color: var(--pc-card-bg, var(--base-main-bg));
50
50
  border: $border-width-medium solid var(--pc-border-color);
51
51
  color: var(--pc-text-color-2);
52
52
  font-size: $font-size-lg;
@@ -68,7 +68,7 @@
68
68
  top: 0;
69
69
  bottom: 0;
70
70
  padding: $spacing-sm $spacing-base;
71
- background-color: var(--pc-sidebar-bg);
71
+ background-color: var(--pc-sidebar-bg, var(--base-page-bg));
72
72
  border: $border-width-base solid var(--pc-border-color);
73
73
  border-inline-start: none; // RTL: flips to border-right: none
74
74
  border-start-start-radius: 0;
@@ -96,7 +96,7 @@
96
96
  margin: 0;
97
97
  padding: 0;
98
98
  list-style: none;
99
- background-color: var(--pc-sidebar-submenu-bg);
99
+ background-color: var(--pc-sidebar-submenu-bg, var(--base-subtle-bg));
100
100
  border: $border-width-base solid var(--pc-border-color);
101
101
  border-inline-start: none; // RTL: flips to border-right: none
102
102
  border-start-start-radius: 0;
@@ -120,12 +120,12 @@
120
120
  width: 100%;
121
121
 
122
122
  &:hover {
123
- background-color: var(--pc-sidebar-submenu-hover-bg);
123
+ background-color: var(--pc-sidebar-submenu-hover-bg, var(--base-subtle-bg));
124
124
  }
125
125
 
126
126
  &--active {
127
- background-color: var(--pc-sidebar-submenu-active-bg);
128
- color: var(--pc-sidebar-submenu-active-text);
127
+ background-color: var(--pc-sidebar-submenu-active-bg, var(--base-subtle-bg));
128
+ color: var(--pc-sidebar-submenu-active-text, var(--base-text-color-1));
129
129
  }
130
130
  }
131
131
 
@@ -168,7 +168,7 @@
168
168
  margin: 0;
169
169
  padding: 0;
170
170
  list-style: none;
171
- background-color: var(--pc-sidebar-submenu-bg);
171
+ background-color: var(--pc-sidebar-submenu-bg, var(--base-subtle-bg));
172
172
  border: $border-width-base solid var(--pc-border-color);
173
173
  border-inline-start: none; // RTL: flips to border-right: none
174
174
  border-start-start-radius: 0;
@@ -18,7 +18,7 @@
18
18
  }
19
19
 
20
20
  .pc-layout__sidebar {
21
- background-color: var(--pc-sidebar-bg);
21
+ background-color: var(--pc-sidebar-bg, var(--base-page-bg));
22
22
  border-inline-end: $border-width-base solid var(--pc-border-color); // RTL: flips to border-left
23
23
  flex-shrink: 0;
24
24
  position: relative;
@@ -127,7 +127,7 @@ body.pc-layout--sticky .pc-layout__sidebar {
127
127
  font-weight: $font-weight-semibold;
128
128
  text-transform: uppercase;
129
129
  letter-spacing: 0.05em;
130
- color: var(--pc-sidebar-text-secondary);
130
+ color: var(--pc-sidebar-text-secondary, var(--base-text-color-2));
131
131
  user-select: none;
132
132
 
133
133
  // First heading shouldn't push the whole nav down
@@ -154,7 +154,7 @@ body.pc-layout--sticky .pc-layout__sidebar {
154
154
  align-items: center;
155
155
  gap: $sidebar-item-gap;
156
156
  padding: $sidebar-padding;
157
- color: var(--pc-sidebar-text-secondary);
157
+ color: var(--pc-sidebar-text-secondary, var(--base-text-color-2));
158
158
  text-decoration: none;
159
159
  font-weight: $font-weight-medium;
160
160
  border-inline-end: $border-width-thick solid transparent; // RTL: flips to border-left
@@ -164,7 +164,7 @@ body.pc-layout--sticky .pc-layout__sidebar {
164
164
  }
165
165
 
166
166
  &:hover {
167
- color: var(--pc-sidebar-text);
167
+ color: var(--pc-sidebar-text, var(--base-text-color-1));
168
168
  background-color: var(--pc-accent-light);
169
169
  }
170
170
 
@@ -197,7 +197,7 @@ body.pc-layout--sticky .pc-layout__sidebar {
197
197
  height: #{$base-input-size-md-height}rem;
198
198
  padding: 0 $spacing-base;
199
199
  color: var(--pc-text-color-2);
200
- background-color: var(--pc-input-bg);
200
+ background-color: var(--pc-input-bg, var(--base-input-bg));
201
201
  border: $border-width-base solid var(--pc-border-color);
202
202
  border-radius: var(--pc-border-radius);
203
203
  text-align: start; // RTL: flips to right
@@ -216,7 +216,7 @@ body.pc-layout--sticky .pc-layout__sidebar {
216
216
 
217
217
  &:hover {
218
218
  border-color: $input-focus-border-color;
219
- color: var(--pc-sidebar-text);
219
+ color: var(--pc-sidebar-text, var(--base-text-color-1));
220
220
  }
221
221
 
222
222
  // Collapsed sidebar: drop the frame, icon-only, matching link padding so the
@@ -267,7 +267,7 @@ body.pc-layout--sticky .pc-layout__sidebar {
267
267
  border: none;
268
268
  outline: none;
269
269
  background: transparent;
270
- color: var(--pc-sidebar-text);
270
+ color: var(--pc-sidebar-text, var(--base-text-color-1));
271
271
  font: inherit;
272
272
  padding: 0;
273
273
 
@@ -300,7 +300,7 @@ body.pc-layout--sticky .pc-layout__sidebar {
300
300
  align-items: center;
301
301
  gap: $sidebar-item-gap;
302
302
  padding: $sidebar-padding;
303
- color: var(--pc-sidebar-text-secondary);
303
+ color: var(--pc-sidebar-text-secondary, var(--base-text-color-2));
304
304
  background: none;
305
305
  border: none;
306
306
  width: 100%;
@@ -313,7 +313,7 @@ body.pc-layout--sticky .pc-layout__sidebar {
313
313
  }
314
314
 
315
315
  &:hover {
316
- color: var(--pc-sidebar-text);
316
+ color: var(--pc-sidebar-text, var(--base-text-color-1));
317
317
  background-color: var(--pc-accent-light);
318
318
  }
319
319
 
@@ -354,7 +354,7 @@ body.pc-layout--sticky .pc-layout__sidebar {
354
354
  margin: 0;
355
355
  padding: 0;
356
356
  display: none;
357
- background-color: var(--pc-sidebar-submenu-bg);
357
+ background-color: var(--pc-sidebar-submenu-bg, var(--base-subtle-bg));
358
358
 
359
359
  &--open {
360
360
  display: block;
@@ -368,12 +368,12 @@ body.pc-layout--sticky .pc-layout__sidebar {
368
368
  border-inline-end: $border-width-medium solid transparent; // RTL: flips to border-left
369
369
 
370
370
  &:hover {
371
- background-color: var(--pc-sidebar-submenu-hover-bg);
371
+ background-color: var(--pc-sidebar-submenu-hover-bg, var(--base-subtle-bg));
372
372
  }
373
373
 
374
374
  &--active {
375
- background-color: var(--pc-sidebar-submenu-active-bg);
376
- color: var(--pc-sidebar-submenu-active-text);
375
+ background-color: var(--pc-sidebar-submenu-active-bg, var(--base-subtle-bg));
376
+ color: var(--pc-sidebar-submenu-active-text, var(--base-text-color-1));
377
377
  border-inline-end-color: var(--pc-accent); // RTL: flips to border-left-color
378
378
  }
379
379
  }