make dynamic directives have a type
This commit is contained in:
parent
3b520a98ad
commit
ab63ec1471
@ -24,7 +24,7 @@ export default {
|
|||||||
color: '#000000',
|
color: '#000000',
|
||||||
alpha: 0.6
|
alpha: 0.6
|
||||||
}],
|
}],
|
||||||
'--profileTint': '$alpha(--background, 0.5)'
|
'--profileTint': 'color | $alpha(--background, 0.5)'
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
|
@ -661,7 +661,13 @@ export const init = (extraRuleset, palette) => {
|
|||||||
}
|
}
|
||||||
default:
|
default:
|
||||||
if (k.startsWith('--')) {
|
if (k.startsWith('--')) {
|
||||||
return k + ': ' + rgba2css(findColor(v, computed[selector].dynamicVars))
|
const [type, value] = v.split('|').map(x => x.trim()) // woah, Extreme!
|
||||||
|
switch (type) {
|
||||||
|
case 'color':
|
||||||
|
return k + ': ' + rgba2css(findColor(value, computed[selector].dynamicVars))
|
||||||
|
default:
|
||||||
|
return ''
|
||||||
|
}
|
||||||
}
|
}
|
||||||
return ''
|
return ''
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user