commit: ab63ec1471964aaf8ffc3d65412b54b173fc5b9e
parent 3b520a98ad3e393e8cf7f1d288d295f13ebc83e0
Author: Henry Jameson <me@hjkos.com>
Date: Mon, 19 Feb 2024 00:25:28 +0200
make dynamic directives have a type
Diffstat:
2 files changed, 8 insertions(+), 2 deletions(-)
diff --git a/src/components/user_card/user_card.style.js b/src/components/user_card/user_card.style.js
@@ -24,7 +24,7 @@ export default {
color: '#000000',
alpha: 0.6
}],
- '--profileTint': '$alpha(--background, 0.5)'
+ '--profileTint': 'color | $alpha(--background, 0.5)'
}
},
{
diff --git a/src/services/theme_data/theme_data_3.service.js b/src/services/theme_data/theme_data_3.service.js
@@ -661,7 +661,13 @@ export const init = (extraRuleset, palette) => {
}
default:
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 ''
}