diff options
author | (quasar) nebula <qznebula@protonmail.com> | 2025-05-27 18:45:52 -0300 |
---|---|---|
committer | (quasar) nebula <qznebula@protonmail.com> | 2025-05-27 18:45:52 -0300 |
commit | a70dcd3a002131668a5d5eed8774930ef606d129 (patch) | |
tree | e0a1d4029dd636a6ea55d6b11b11f518e5f4818e /src/content/dependencies/generateColorStyleVariables.js | |
parent | e5410e230d966bb041d5f92407fbc879fb8ac1ef (diff) |
content: generateColorStyleTag: use generateStyleTag
also change property-list -> declarations
Diffstat (limited to 'src/content/dependencies/generateColorStyleVariables.js')
-rw-r--r-- | src/content/dependencies/generateColorStyleVariables.js | 18 |
1 files changed, 9 insertions, 9 deletions
diff --git a/src/content/dependencies/generateColorStyleVariables.js b/src/content/dependencies/generateColorStyleVariables.js index 5270dbe4..c872d0b6 100644 --- a/src/content/dependencies/generateColorStyleVariables.js +++ b/src/content/dependencies/generateColorStyleVariables.js @@ -18,7 +18,7 @@ export default { }, mode: { - validate: v => v.is('style', 'property-list'), + validate: v => v.is('style', 'declarations'), default: 'style', }, }, @@ -50,15 +50,15 @@ export default { `--shadow-color: ${shadow}`, ]; - let selectedProperties; + let selectedDeclarations; switch (slots.context) { case 'any-content': - selectedProperties = anyContent; + selectedDeclarations = anyContent; break; case 'image-box': - selectedProperties = [ + selectedDeclarations = [ `--primary-color: ${primary}`, `--dim-color: ${dim}`, `--deep-color: ${deep}`, @@ -67,14 +67,14 @@ export default { break; case 'page-root': - selectedProperties = [ + selectedDeclarations = [ ...anyContent, `--page-primary-color: ${primary}`, ]; break; case 'primary-only': - selectedProperties = [ + selectedDeclarations = [ `--primary-color: ${primary}`, ]; break; @@ -82,10 +82,10 @@ export default { switch (slots.mode) { case 'style': - return selectedProperties.join('; '); + return selectedDeclarations.join('; '); - case 'property-list': - return selectedProperties; + case 'declarations': + return selectedDeclarations.map(declaration => declaration + ';'); } }, }; |