fix redmond theme inputs being black on selected statuses
This commit is contained in:
parent
d0228728f4
commit
3cab1faaf4
2 changed files with 20 additions and 2 deletions
|
@ -81,9 +81,27 @@ export const colorFunctions = {
|
||||||
return alphaBlend(background, amount, foreground)
|
return alphaBlend(background, amount, foreground)
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
boost: {
|
||||||
|
argsNeeded: 2,
|
||||||
|
documentation: 'If given color is dark makes it darker, if color is light - makes it lighter',
|
||||||
|
args: [
|
||||||
|
'color: source color',
|
||||||
|
'amount: how much darken/brighten the color'
|
||||||
|
],
|
||||||
|
exec: (args, { findColor }, { dynamicVars, staticVars }) => {
|
||||||
|
const [colorArg, amountArg] = args
|
||||||
|
|
||||||
|
const color = convert(findColor(colorArg, { dynamicVars, staticVars })).rgb
|
||||||
|
const amount = Number(amountArg)
|
||||||
|
|
||||||
|
const isLight = relativeLuminance(color) < 0.5
|
||||||
|
const mod = isLight ? -1 : 1
|
||||||
|
return brightness(amount * mod, color).rgb
|
||||||
|
}
|
||||||
|
},
|
||||||
mod: {
|
mod: {
|
||||||
argsNeeded: 2,
|
argsNeeded: 2,
|
||||||
documentation: 'Old function that increases or decreases brightness depending if color is dark or light. Advised against using it as it might give unexpected results.',
|
documentation: 'Old function that increases or decreases brightness depending if background color is dark or light. Advised against using it as it might give unexpected results.',
|
||||||
args: [
|
args: [
|
||||||
'color: source color',
|
'color: source color',
|
||||||
'amount: how much darken/brighten the color'
|
'amount: how much darken/brighten the color'
|
||||||
|
|
|
@ -94,7 +94,7 @@ Button:toggled:pressed {
|
||||||
}
|
}
|
||||||
|
|
||||||
Input {
|
Input {
|
||||||
background: $mod(--bg -80);
|
background: $boost(--bg 20);
|
||||||
shadow: --defaultInputBevel;
|
shadow: --defaultInputBevel;
|
||||||
roundness: 0
|
roundness: 0
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Reference in a new issue