diff options
| author | Henry Jameson <me@hjkos.com> | 2018-11-23 10:17:01 +0300 |
|---|---|---|
| committer | Henry Jameson <me@hjkos.com> | 2018-11-23 10:17:01 +0300 |
| commit | 26b9f787bb01551f991f9e79aa8c0fc59313b95e (patch) | |
| tree | b5e77ae353c71dce23ad98fd609b2ae5ade6ba96 /src/services/style_setter/style_setter.js | |
| parent | 652b98b13c573f4c8d84f2e55251b2244b243afc (diff) | |
added "keep opacity" option, fixed opacity loading, fixed missing shadows not
affecting the preview (i.e. previewing pleroma-dark when redmond is applied)
Diffstat (limited to 'src/services/style_setter/style_setter.js')
| -rw-r--r-- | src/services/style_setter/style_setter.js | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/src/services/style_setter/style_setter.js b/src/services/style_setter/style_setter.js index d7487eed..60531f28 100644 --- a/src/services/style_setter/style_setter.js +++ b/src/services/style_setter/style_setter.js @@ -94,7 +94,10 @@ const setColors = (input, commit) => { } const getCssShadow = (input) => { - // >shad + if (input.length === 0) { + return 'none' + } + return input.map((shad) => [ shad.x, shad.y, @@ -340,9 +343,10 @@ const generateShadows = (input) => { ...(input.shadows || {}) } + console.log(Object.entries(shadows).map(([k, v]) => `--${k}Shadow: ${getCssShadow(v)}`).join(';')) return { rules: { - shadows: Object.entries(shadows).filter(([k, v]) => v).map(([k, v]) => `--${k}Shadow: ${getCssShadow(v)}`).join(';') + shadows: Object.entries(shadows).map(([k, v]) => `--${k}Shadow: ${getCssShadow(v)}`).join(';') }, theme: { shadows |
