@uniweb/theming 0.1.7 → 0.1.8
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 +1 -1
- package/src/index.js +1 -0
- package/src/processor.js +4 -3
package/package.json
CHANGED
package/src/index.js
CHANGED
package/src/processor.js
CHANGED
|
@@ -83,10 +83,11 @@ const NON_FAMILY_FONT_VARS = new Set([
|
|
|
83
83
|
|
|
84
84
|
/**
|
|
85
85
|
* A foundation var is a themeable typeface (font role) when it declares
|
|
86
|
-
* `type: 'font'
|
|
87
|
-
*
|
|
86
|
+
* `type: 'font'`, or — the inferred case — its name is `font-*` and not a known
|
|
87
|
+
* CSS longhand. Exported so the build can persist the inferred `type: 'font'`
|
|
88
|
+
* into schema.json (the runtime relies on the same predicate).
|
|
88
89
|
*/
|
|
89
|
-
function isFontVar(name, config) {
|
|
90
|
+
export function isFontVar(name, config) {
|
|
90
91
|
const type = typeof config === 'object' ? config?.type : undefined
|
|
91
92
|
if (type === 'font') return true
|
|
92
93
|
return name.startsWith('font-') && !NON_FAMILY_FONT_VARS.has(name)
|