mirror of
https://git.youjo.love/youjo/youjo-fe.git
synced 2024-11-20 05:49:54 +01:00
Merge branch 'develop' of https://git.youjo.love/fox/youjo-fe into develop
This commit is contained in:
commit
c8a9a48028
3 changed files with 17 additions and 8 deletions
|
@ -89,6 +89,10 @@
|
||||||
margin: 1em 1em 0;
|
margin: 1em 1em 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.presets {
|
||||||
|
text-align: center;
|
||||||
|
}
|
||||||
|
|
||||||
.tab-header {
|
.tab-header {
|
||||||
display: flex;
|
display: flex;
|
||||||
justify-content: space-between;
|
justify-content: space-between;
|
||||||
|
|
|
@ -43,7 +43,8 @@
|
||||||
padding: var(--status-margin, $status-margin);
|
padding: var(--status-margin, $status-margin);
|
||||||
|
|
||||||
.content {
|
.content {
|
||||||
overflow: visible;
|
overflow: clip;
|
||||||
|
overflow-clip-margin: 2em;
|
||||||
}
|
}
|
||||||
|
|
||||||
> * {
|
> * {
|
||||||
|
|
|
@ -7,14 +7,18 @@ export const applyTheme = (input) => {
|
||||||
const body = document.body
|
const body = document.body
|
||||||
body.classList.add('hidden')
|
body.classList.add('hidden')
|
||||||
|
|
||||||
const styleEl = document.getElementById('theme-holder')
|
/** @type {CSSStyleSheet} */
|
||||||
const styleSheet = styleEl.sheet
|
const styleSheet = document.getElementById('theme-holder').sheet
|
||||||
|
|
||||||
|
for (let i = styleSheet.cssRules.length; i--; ) {
|
||||||
|
styleSheet.deleteRule(0)
|
||||||
|
}
|
||||||
|
|
||||||
|
styleSheet.insertRule(
|
||||||
|
`:root { ${rules.radii}; ${rules.colors}; ${rules.shadows}; ${rules.fonts}; }`,
|
||||||
|
0
|
||||||
|
)
|
||||||
|
|
||||||
styleSheet.toString()
|
|
||||||
styleSheet.insertRule(`:root { ${rules.radii} }`, 'index-max')
|
|
||||||
styleSheet.insertRule(`:root { ${rules.colors} }`, 'index-max')
|
|
||||||
styleSheet.insertRule(`:root { ${rules.shadows} }`, 'index-max')
|
|
||||||
styleSheet.insertRule(`:root { ${rules.fonts} }`, 'index-max')
|
|
||||||
body.classList.remove('hidden')
|
body.classList.remove('hidden')
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue