it works, now to clean it up

This commit is contained in:
Henry Jameson 2018-11-19 18:15:27 +03:00
parent a5b4f31c12
commit a8180d03be
6 changed files with 108 additions and 67 deletions

View file

@ -72,7 +72,7 @@ const getTextColor = function (bg, text, preserve) {
}
const setColors = (input, commit) => {
const { colorRules, radiiRules, theme } = generatePreset(input)
const { colorRules, radiiRules, shadowRules, theme } = generatePreset(input)
const head = document.head
const body = document.body
body.style.display = 'none'
@ -84,6 +84,7 @@ const setColors = (input, commit) => {
styleSheet.toString()
styleSheet.insertRule(`body { ${colorRules} }`, 'index-max')
styleSheet.insertRule(`body { ${radiiRules} }`, 'index-max')
styleSheet.insertRule(`body { ${shadowRules} }`, 'index-max')
body.style.display = 'initial'
// commit('setOption', { name: 'colors', value: htmlColors })