vunor 0.5.2 → 0.5.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 +6 -0
- package/dist/theme.mjs +5 -2
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,11 @@
|
|
|
1
1
|
# Changelog
|
|
2
2
|
|
|
3
|
+
## 0.5.3
|
|
4
|
+
|
|
5
|
+
### Fixed
|
|
6
|
+
|
|
7
|
+
- **A stacked state class wins over its base regardless of CSS order.** `class="c8-flat c8-flat-selected"` (and `c8-chrome c8-chrome-selected`, also on a shortcut that composes the base) now looks exactly like `class="c8-flat" aria-pressed="true"`, pressed and disabled included. Base and state class were one class each, so the order of their rules decided, and with an app's own shortcuts composing `c8-flat` the base's dark rule could come last: a selected item lost its scope colour in dark mode (white text and icon instead of `scope-color-400`). The attribute-driven states do not change. Each shortcut that composes `c8-flat` or `c8-chrome` adds two selectors to the CSS.
|
|
8
|
+
|
|
3
9
|
## 0.5.2
|
|
4
10
|
|
|
5
11
|
### Fixed
|
package/dist/theme.mjs
CHANGED
|
@@ -281,6 +281,7 @@ const btn = defineShortcuts({
|
|
|
281
281
|
});
|
|
282
282
|
//#endregion
|
|
283
283
|
//#region src/theme/shortcuts/c8.ts
|
|
284
|
+
const whenStacked = (stateClass) => `[&.${stateClass.replace("-", "\\-")}]:`;
|
|
284
285
|
const c8 = defineShortcuts({
|
|
285
286
|
"c8-filled": {
|
|
286
287
|
"": "current-bg-scope-color-600 rounded-r1 current-text-white current-icon-white icon-current/100 bg-current text-current",
|
|
@@ -308,7 +309,8 @@ const c8 = defineShortcuts({
|
|
|
308
309
|
"data-[selected=true]:": "c8-flat-selected",
|
|
309
310
|
"data-[on=true]:": "c8-flat-selected",
|
|
310
311
|
"aria-[selected=true]:": "c8-flat-selected",
|
|
311
|
-
"aria-[pressed=true]:": "c8-flat-selected"
|
|
312
|
+
"aria-[pressed=true]:": "c8-flat-selected",
|
|
313
|
+
[whenStacked("c8-flat-selected")]: "c8-flat-selected"
|
|
312
314
|
},
|
|
313
315
|
"c8-flat-hover": "bg-current/10",
|
|
314
316
|
"c8-flat-active": "bg-current/15",
|
|
@@ -341,7 +343,8 @@ const c8 = defineShortcuts({
|
|
|
341
343
|
"data-[selected=true]:": "c8-chrome-selected",
|
|
342
344
|
"data-[on=true]:": "c8-chrome-selected",
|
|
343
345
|
"aria-[selected=true]:": "c8-chrome-selected",
|
|
344
|
-
"aria-[pressed=true]:": "c8-chrome-selected"
|
|
346
|
+
"aria-[pressed=true]:": "c8-chrome-selected",
|
|
347
|
+
[whenStacked("c8-chrome-selected")]: "c8-chrome-selected"
|
|
345
348
|
},
|
|
346
349
|
"c8-chrome-hover": {
|
|
347
350
|
"": "current-bg-layer-light-1 bg-current",
|