@kungal/ui-tokens 1.9.2 → 1.9.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
@@ -1,5 +1,27 @@
1
1
  # @kungal/ui-tokens
2
2
 
3
+ ## 1.9.3
4
+
5
+ ### Patch Changes
6
+
7
+ - 0b42fd3: perf: stop shipping backdrop-filter on every surface (mobile scroll jank)
8
+
9
+ KunCard shipped `backdrop-filter: blur(var(--kun-background-blur))` on EVERY card —
10
+ and the default blur was `0px` over an opaque surface, so it did nothing visually
11
+ while still promoting each card to a compositing layer and running the backdrop
12
+ pipeline. `backdrop-filter: blur()` is the #1 cause of janky scrolling on mobile
13
+ (a 120Hz phone can drop to ~30–60Hz). With many cards per page the layers piled up.
14
+
15
+ - KunCard / KunModal now emit `backdrop-filter` only via the new opt-in
16
+ `kun-backdrop` utility, which is `none` by default (free — no layer, no blur pass).
17
+ - New token `--kun-backdrop-filter` (default `none`) **replaces `--kun-background-blur`**.
18
+ A glass site opts in for every raised surface at once:
19
+ `:root { --kun-surface-opacity: 0.7; --kun-backdrop-filter: blur(12px); }`
20
+
21
+ BREAKING (glass only): if you set `--kun-background-blur: 12px`, switch to
22
+ `--kun-backdrop-filter: blur(12px)`. Sites that never enabled glass are unaffected
23
+ (and get smoother scrolling for free).
24
+
3
25
  ## 1.9.2
4
26
 
5
27
  ### Patch Changes
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@kungal/ui-tokens",
3
- "version": "1.9.2",
3
+ "version": "1.9.3",
4
4
  "description": "KunUI design tokens — framework-agnostic Tailwind v4 theme (semantic colors, radius, z-index, animations).",
5
5
  "type": "module",
6
6
  "keywords": [
package/src/tokens.css CHANGED
@@ -35,16 +35,26 @@
35
35
  * inputs, modal, drawer. Default 1 = fully opaque (the clean elevation look).
36
36
  * A site with a background image (e.g. a galgame page) can make every surface
37
37
  * frosted at once by lowering this and adding a blur, with NO component changes:
38
- * :root { --kun-surface-opacity: 0.7; --kun-background-blur: 12px; }
39
- * (Components don't ship a backdrop-blur on every surface, so set the blur too
40
- * if you want true frosted glass rather than plain see-through.) */
38
+ * :root { --kun-surface-opacity: 0.7; --kun-backdrop-filter: blur(12px); }
39
+ * (Surfaces ship `backdrop-filter: none` by default set --kun-backdrop-filter
40
+ * to opt into true frosted glass rather than plain see-through.) */
41
41
  --kun-surface-opacity: 1;
42
42
 
43
- /* Backdrop blur strength for glass surfaces (Card / Modal / sticky
44
- * topbar). 0 = no blur. Referenced as
45
- * `backdrop-blur-[var(--kun-background-blur)]` by those components.
46
- * Apps may override (e.g. a user-adjustable glass-blur setting). */
47
- --kun-background-blur: 0px;
43
+ /* Backdrop-filter for raised glass surfaces (Card / Modal), consumed via the
44
+ * `kun-backdrop` utility. Default `none` so NO backdrop-filter is emitted:
45
+ * backdrop-filter: blur() is the #1 cause of mobile scroll jank, and at the
46
+ * default opaque / zero-blur it produced no visual effect anyway. A glass site
47
+ * opts in for every surface at once, e.g. `--kun-backdrop-filter: blur(12px)`
48
+ * (pair with a lowered --kun-surface-opacity). */
49
+ --kun-backdrop-filter: none;
50
+ }
51
+
52
+ /* Opt-in frosted-glass backdrop for raised surfaces. At the default `none` it
53
+ * emits `backdrop-filter: none` (free — no compositing layer, no blur pass);
54
+ * set --kun-backdrop-filter to enable glass on every surface that uses it. */
55
+ @utility kun-backdrop {
56
+ -webkit-backdrop-filter: var(--kun-backdrop-filter, none);
57
+ backdrop-filter: var(--kun-backdrop-filter, none);
48
58
  }
49
59
 
50
60
  @theme {