aboutsummaryrefslogtreecommitdiff
path: root/src/services/style_setter
diff options
context:
space:
mode:
authorHenry Jameson <me@hjkos.com>2024-02-19 18:48:49 +0200
committerHenry Jameson <me@hjkos.com>2024-02-19 18:48:49 +0200
commit34aa9136dba6b0e1d54f657e24ea4ae77f6c406e (patch)
tree417982d616809b79da2fd7244e150513d9cfdde5 /src/services/style_setter
parent11fd220734ae697e8157d25fbf4cdfc250fe2df7 (diff)
refactored most of the CSS stuff into separate file, refactored color
functions and added shadow functions, replaced JS functions in button with PISS functions
Diffstat (limited to 'src/services/style_setter')
-rw-r--r--src/services/style_setter/style_setter.js6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/services/style_setter/style_setter.js b/src/services/style_setter/style_setter.js
index afc968c7..3c2a2763 100644
--- a/src/services/style_setter/style_setter.js
+++ b/src/services/style_setter/style_setter.js
@@ -1,7 +1,7 @@
import { convert } from 'chromatism'
import { rgb2hex, hex2rgb, rgba2css, getCssColor, relativeLuminance } from '../color_convert/color_convert.js'
import { getColors, computeDynamicColor, getOpacitySlot } from '../theme_data/theme_data.service.js'
-import { init } from '../theme_data/theme_data_3.service.js'
+import { init, getCssRules } from '../theme_data/theme_data_3.service.js'
import {
sampleRules
} from 'src/services/theme_data/pleromafe.t3.js'
@@ -25,7 +25,7 @@ export const applyTheme = (input) => {
styleSheet.toString()
styleSheet.insertRule(`:root { ${rules.fonts} }`, 'index-max')
- themes3.css(themes3.eager).forEach(rule => {
+ getCssRules(themes3.eager, t3b).forEach(rule => {
// Hack to support multiple selectors on same component
if (rule.match(/::-webkit-scrollbar-button/)) {
const parts = rule.split(/[{}]/g)
@@ -44,7 +44,7 @@ export const applyTheme = (input) => {
})
body.classList.remove('hidden')
themes3.lazy.then(lazyRules => {
- themes3.css(lazyRules).forEach(rule => {
+ getCssRules(lazyRules, t3b).forEach(rule => {
styleSheet.insertRule(rule, 'index-max')
})
const t3 = performance.now()