added "keep opacity" option, fixed opacity loading, fixed missing shadows not

affecting the preview (i.e. previewing pleroma-dark when redmond is applied)
This commit is contained in:
Henry Jameson 2018-11-23 10:17:01 +03:00
parent 652b98b13c
commit 26b9f787bb
4 changed files with 36 additions and 7 deletions

View file

@ -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