@kungal/ui-tokens 1.9.2 → 1.9.4
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 +24 -0
- package/package.json +1 -1
- package/src/tokens.css +18 -8
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,29 @@
|
|
|
1
1
|
# @kungal/ui-tokens
|
|
2
2
|
|
|
3
|
+
## 1.9.4
|
|
4
|
+
|
|
5
|
+
## 1.9.3
|
|
6
|
+
|
|
7
|
+
### Patch Changes
|
|
8
|
+
|
|
9
|
+
- 0b42fd3: perf: stop shipping backdrop-filter on every surface (mobile scroll jank)
|
|
10
|
+
|
|
11
|
+
KunCard shipped `backdrop-filter: blur(var(--kun-background-blur))` on EVERY card —
|
|
12
|
+
and the default blur was `0px` over an opaque surface, so it did nothing visually
|
|
13
|
+
while still promoting each card to a compositing layer and running the backdrop
|
|
14
|
+
pipeline. `backdrop-filter: blur()` is the #1 cause of janky scrolling on mobile
|
|
15
|
+
(a 120Hz phone can drop to ~30–60Hz). With many cards per page the layers piled up.
|
|
16
|
+
|
|
17
|
+
- KunCard / KunModal now emit `backdrop-filter` only via the new opt-in
|
|
18
|
+
`kun-backdrop` utility, which is `none` by default (free — no layer, no blur pass).
|
|
19
|
+
- New token `--kun-backdrop-filter` (default `none`) **replaces `--kun-background-blur`**.
|
|
20
|
+
A glass site opts in for every raised surface at once:
|
|
21
|
+
`:root { --kun-surface-opacity: 0.7; --kun-backdrop-filter: blur(12px); }`
|
|
22
|
+
|
|
23
|
+
BREAKING (glass only): if you set `--kun-background-blur: 12px`, switch to
|
|
24
|
+
`--kun-backdrop-filter: blur(12px)`. Sites that never enabled glass are unaffected
|
|
25
|
+
(and get smoother scrolling for free).
|
|
26
|
+
|
|
3
27
|
## 1.9.2
|
|
4
28
|
|
|
5
29
|
### Patch Changes
|
package/package.json
CHANGED
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-
|
|
39
|
-
* (
|
|
40
|
-
*
|
|
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
|
|
44
|
-
*
|
|
45
|
-
*
|
|
46
|
-
*
|
|
47
|
-
|
|
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 {
|