aboutsummaryrefslogtreecommitdiff
path: root/src/components/input.style.js
diff options
context:
space:
mode:
authorHenry Jameson <me@hjkos.com>2024-09-12 12:46:47 +0300
committerHenry Jameson <me@hjkos.com>2024-09-12 12:46:47 +0300
commita586b9f6d241c879f7081aa3e0116fd720d6e026 (patch)
tree20bbdd2f022efcffa67d3708e5a1cd1db8ec0a5f /src/components/input.style.js
parent30c6eec1a1dbd6e502ea9685fd916f44ee0bf1b7 (diff)
fix themes3 specificity sorting
Diffstat (limited to 'src/components/input.style.js')
-rw-r--r--src/components/input.style.js43
1 files changed, 36 insertions, 7 deletions
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'
+ }
}
]
}