diff options
| author | Henry Jameson <me@hjkos.com> | 2024-02-19 00:25:28 +0200 |
|---|---|---|
| committer | Henry Jameson <me@hjkos.com> | 2024-02-19 00:25:28 +0200 |
| commit | ab63ec1471964aaf8ffc3d65412b54b173fc5b9e (patch) | |
| tree | a04155d145e179b513d393bf143767553974caa8 /src | |
| parent | 3b520a98ad3e393e8cf7f1d288d295f13ebc83e0 (diff) | |
make dynamic directives have a type
Diffstat (limited to 'src')
| -rw-r--r-- | src/components/user_card/user_card.style.js | 2 | ||||
| -rw-r--r-- | src/services/theme_data/theme_data_3.service.js | 8 |
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 index 1a8c179d..a6190f59 100644 --- 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 index d916f97d..a73d4cb5 100644 --- 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 '' } |
