@rokkit/core 1.11.0 → 1.11.1
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/package.json +2 -2
- package/src/theme.ts +4 -0
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@rokkit/core",
|
|
3
|
-
"version": "1.11.
|
|
3
|
+
"version": "1.11.1",
|
|
4
4
|
"description": "Contains core utility functions and classes that can be used in various components.",
|
|
5
5
|
"repository": {
|
|
6
6
|
"type": "git",
|
|
@@ -47,6 +47,6 @@
|
|
|
47
47
|
"ramda": "^0.32.0"
|
|
48
48
|
},
|
|
49
49
|
"devDependencies": {
|
|
50
|
-
"@rokkit/icons": "1.11.
|
|
50
|
+
"@rokkit/icons": "1.11.1"
|
|
51
51
|
}
|
|
52
52
|
}
|
package/src/theme.ts
CHANGED
|
@@ -107,8 +107,12 @@ export function themeRules(
|
|
|
107
107
|
*/
|
|
108
108
|
export function contrastShortcuts(name: string, onColor = '#fafafa') {
|
|
109
109
|
const color = `var(--on-${name},${onColor})`
|
|
110
|
+
// An app's UnoCSS scans this file; without the skip it extracts the template below as a
|
|
111
|
+
// class and emits its placeholder text as CSS, which postcss rejects (scanned-sources.spec).
|
|
112
|
+
// @unocss-skip-start
|
|
110
113
|
const text = ([, end]: string[]) =>
|
|
111
114
|
end ? `text-[color-mix(in_srgb,${color}_${end.slice(1)}%,transparent)]` : `text-[${color}]`
|
|
115
|
+
// @unocss-skip-end
|
|
112
116
|
return [
|
|
113
117
|
[new RegExp(`^text-on-${name}(\\/\\d+)?$`), text],
|
|
114
118
|
[new RegExp(`^text-on-${name}-muted(\\/\\d+)?$`), text]
|