Compare commits
2 commits
2d459df039
...
1a306c2723
Author | SHA1 | Date | |
---|---|---|---|
|
1a306c2723 | ||
|
6bf6d102ef |
3 changed files with 36 additions and 11 deletions
|
@ -3,6 +3,11 @@ export default {
|
||||||
selector: ':root',
|
selector: ':root',
|
||||||
notEditable: true,
|
notEditable: true,
|
||||||
validInnerComponents: [
|
validInnerComponents: [
|
||||||
|
// These are purely for --parent--text et such to work
|
||||||
|
'Text',
|
||||||
|
'Link',
|
||||||
|
'Border',
|
||||||
|
|
||||||
'Underlay',
|
'Underlay',
|
||||||
'Modals',
|
'Modals',
|
||||||
'Popover',
|
'Popover',
|
||||||
|
|
|
@ -264,6 +264,7 @@ export const init = ({
|
||||||
const lowerLevelVirtualDirectivesRaw = computed[lowerLevelSelector]?.virtualDirectivesRaw
|
const lowerLevelVirtualDirectivesRaw = computed[lowerLevelSelector]?.virtualDirectivesRaw
|
||||||
|
|
||||||
const dynamicVars = computed[selector] || {
|
const dynamicVars = computed[selector] || {
|
||||||
|
lowerLevelSelector,
|
||||||
lowerLevelBackground,
|
lowerLevelBackground,
|
||||||
lowerLevelVirtualDirectives,
|
lowerLevelVirtualDirectives,
|
||||||
lowerLevelVirtualDirectivesRaw
|
lowerLevelVirtualDirectivesRaw
|
||||||
|
@ -283,6 +284,8 @@ export const init = ({
|
||||||
computed[selector] = computed[selector] || {}
|
computed[selector] = computed[selector] || {}
|
||||||
computed[selector].computedRule = computedRule
|
computed[selector].computedRule = computedRule
|
||||||
computed[selector].dynamicVars = dynamicVars
|
computed[selector].dynamicVars = dynamicVars
|
||||||
|
computed[selector].virtualDirectives = computed[lowerLevelSelector]?.virtualDirectives || {}
|
||||||
|
computed[selector].virtualDirectivesRaw = computed[lowerLevelSelector]?.virtualDirectivesRaw || {}
|
||||||
|
|
||||||
if (virtualComponents.has(combination.component)) {
|
if (virtualComponents.has(combination.component)) {
|
||||||
const virtualName = [
|
const virtualName = [
|
||||||
|
@ -330,8 +333,8 @@ export const init = ({
|
||||||
intendedTextColor,
|
intendedTextColor,
|
||||||
newTextRule.directives.textAuto === 'preserve'
|
newTextRule.directives.textAuto === 'preserve'
|
||||||
)
|
)
|
||||||
const virtualDirectives = computed[lowerLevelSelector].virtualDirectives || {}
|
const virtualDirectives = { ...(computed[lowerLevelSelector].virtualDirectives || {}) }
|
||||||
const virtualDirectivesRaw = computed[lowerLevelSelector].virtualDirectivesRaw || {}
|
const virtualDirectivesRaw = { ...(computed[lowerLevelSelector].virtualDirectivesRaw || {}) }
|
||||||
|
|
||||||
// Storing color data in lower layer to use as custom css properties
|
// Storing color data in lower layer to use as custom css properties
|
||||||
virtualDirectives[virtualName] = getTextColorAlpha(newTextRule.directives, textColor, dynamicVars)
|
virtualDirectives[virtualName] = getTextColorAlpha(newTextRule.directives, textColor, dynamicVars)
|
||||||
|
@ -345,12 +348,8 @@ export const init = ({
|
||||||
selector: cssSelector.split(/ /g).slice(0, -1).join(' '),
|
selector: cssSelector.split(/ /g).slice(0, -1).join(' '),
|
||||||
...combination,
|
...combination,
|
||||||
directives: {},
|
directives: {},
|
||||||
virtualDirectives: {
|
virtualDirectives,
|
||||||
[virtualName]: getTextColorAlpha(newTextRule.directives, textColor, dynamicVars)
|
virtualDirectivesRaw
|
||||||
},
|
|
||||||
virtualDirectivesRaw: {
|
|
||||||
[virtualName]: textColor
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
computed[selector] = computed[selector] || {}
|
computed[selector] = computed[selector] || {}
|
||||||
|
|
|
@ -31,14 +31,26 @@
|
||||||
link: #1CA4F3;
|
link: #1CA4F3;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@palette.Panda {
|
||||||
|
bg: #EFF0F2;
|
||||||
|
fg: #292C32;
|
||||||
|
text: #1B1F22;
|
||||||
|
link: #1CA4F3;
|
||||||
|
accent: #1CA4F3;
|
||||||
|
cRed: #f41a51;
|
||||||
|
cBlue: #1CA4F3;
|
||||||
|
cGreen: #1af46e;
|
||||||
|
cOrange: #f4af1a;
|
||||||
|
}
|
||||||
|
|
||||||
Root {
|
Root {
|
||||||
--badgeNotification: color | --cRed;
|
--badgeNotification: color | --cRed;
|
||||||
--buttonDefaultHoverGlow: shadow | inset 0 0 0 1 --accent / 1;
|
--buttonDefaultHoverGlow: shadow | inset 0 0 0 1 --accent / 1;
|
||||||
--buttonDefaultFocusGlow: shadow | inset 0 0 0 1 --accent / 1;
|
--buttonDefaultFocusGlow: shadow | inset 0 0 0 1 --accent / 1;
|
||||||
--buttonDefaultShadow: shadow | inset 0 0 0 1 --text / 0.35, 0 5 5 -5 #000000 / 0.35;
|
--buttonDefaultShadow: shadow | inset 0 0 0 1 --parent--text / 0.35, 0 5 5 -5 #000000 / 0.35;
|
||||||
--buttonDefaultBevel: shadow | inset 0 14 14 -14 #FFFFFF / 0.1;
|
--buttonDefaultBevel: shadow | inset 0 14 14 -14 #FFFFFF / 0.1;
|
||||||
--buttonPressedBevel: shadow | inset 0 -20 20 -20 #000000 / 0.05;
|
--buttonPressedBevel: shadow | inset 0 -20 20 -20 #000000 / 0.05;
|
||||||
--defaultInputBevel: shadow | inset 0 0 0 1 --text / 0.35;
|
--defaultInputBevel: shadow | inset 0 0 0 1 --parent--text / 0.35;
|
||||||
--defaultInputHoverGlow: shadow | 0 0 0 1 --accent / 1;
|
--defaultInputHoverGlow: shadow | 0 0 0 1 --accent / 1;
|
||||||
--defaultInputFocusGlow: shadow | 0 0 0 1 --link / 1;
|
--defaultInputFocusGlow: shadow | 0 0 0 1 --link / 1;
|
||||||
}
|
}
|
||||||
|
@ -67,8 +79,13 @@ Button:toggled:hover {
|
||||||
background: $blend(--bg 0.3 --accent)
|
background: $blend(--bg 0.3 --accent)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Button {
|
||||||
|
background: --parent;
|
||||||
|
}
|
||||||
|
|
||||||
Input {
|
Input {
|
||||||
shadow: --defaultInputBevel
|
shadow: --defaultInputBevel;
|
||||||
|
background: --parent;
|
||||||
}
|
}
|
||||||
|
|
||||||
PanelHeader {
|
PanelHeader {
|
||||||
|
@ -78,3 +95,7 @@ PanelHeader {
|
||||||
Tab:hover {
|
Tab:hover {
|
||||||
shadow: --buttonDefaultHoverGlow, --buttonDefaultBevel, --buttonDefaultShadow
|
shadow: --buttonDefaultHoverGlow, --buttonDefaultBevel, --buttonDefaultShadow
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Tab {
|
||||||
|
background: --parent;
|
||||||
|
}
|
||||||
|
|
Loading…
Add table
Reference in a new issue