diff options
| author | Henry Jameson <me@hjkos.com> | 2024-09-12 12:46:47 +0300 |
|---|---|---|
| committer | Henry Jameson <me@hjkos.com> | 2024-09-12 12:46:47 +0300 |
| commit | a586b9f6d241c879f7081aa3e0116fd720d6e026 (patch) | |
| tree | 20bbdd2f022efcffa67d3708e5a1cd1db8ec0a5f /src/components | |
| parent | 30c6eec1a1dbd6e502ea9685fd916f44ee0bf1b7 (diff) | |
fix themes3 specificity sorting
Diffstat (limited to 'src/components')
| -rw-r--r-- | src/components/button.style.js | 11 | ||||
| -rw-r--r-- | src/components/input.style.js | 43 |
2 files changed, 47 insertions, 7 deletions
diff --git a/src/components/button.style.js b/src/components/button.style.js index 6fec67a0..c31b0a3e 100644 --- a/src/components/button.style.js +++ b/src/components/button.style.js @@ -96,6 +96,17 @@ export default { textOpacity: 0.25, textOpacityMode: 'blend' } + }, + { + component: 'Icon', + parent: { + component: 'Button', + state: ['disabled'] + }, + directives: { + textOpacity: 0.25, + textOpacityMode: 'blend' + } } ] } diff --git a/src/components/input.style.js b/src/components/input.style.js index 139a0034..fb89414a 100644 --- a/src/components/input.style.js +++ b/src/components/input.style.js @@ -10,17 +10,18 @@ const hoverGlow = { export default { name: 'Input', selector: '.input', - variant: { + states: { + hover: ':hover:not(.disabled)', + focused: ':focus-within', + disabled: '.disabled' + }, + variants: { checkbox: '.-checkbox', radio: '.-radio' }, - states: { - disabled: ':disabled', - hover: ':hover:not(:disabled)', - focused: ':focus-within' - }, validInnerComponents: [ - 'Text' + 'Text', + 'Icon' ], defaultRules: [ { @@ -55,6 +56,34 @@ export default { directives: { shadow: [hoverGlow, '--defaultInputBevel'] } + }, + { + state: ['disabled'], + directives: { + background: '$blend(--inheritedBackground, 0.25, --parent)' + } + }, + { + component: 'Text', + parent: { + component: 'Input', + state: ['disabled'] + }, + directives: { + textOpacity: 0.25, + textOpacityMode: 'blend' + } + }, + { + component: 'Icon', + parent: { + component: 'Input', + state: ['disabled'] + }, + directives: { + textOpacity: 0.25, + textOpacityMode: 'blend' + } } ] } |
