Compare commits

...

2 commits

Author SHA1 Message Date
Henry Jameson
1a306c2723 Merge branch 'themes-updates' into shigusegubu-themes3 2024-12-24 16:24:51 +02:00
Henry Jameson
6bf6d102ef Breezy theme update + proper iheritance of virtual directives 2024-12-24 16:24:13 +02:00
3 changed files with 36 additions and 11 deletions

View file

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

View file

@ -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] || {}

View file

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