Skip to content

Commit

Permalink
perf(form-builder): avoid the use of nested ::placeholder selector in…
Browse files Browse the repository at this point in the history
… TagInput
  • Loading branch information
bjoerge committed Apr 8, 2021
1 parent 03d4a03 commit ed14734
Showing 1 changed file with 5 additions and 8 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -94,23 +94,20 @@ const Input = styled.input(
paddingRight: rem(p),
paddingBottom: rem(p - size.descenderHeight),
paddingLeft: rem(p),
'&::placeholder': {
color: 'var(--input-placeholder-color)',
},

// enabled
'&:not(:invalid):not(:disabled)': {
color: color.default.enabled.fg,

'&::placeholder': {
color: color.default.enabled.placeholder,
},
'--input-placeholder-color': color.default.enabled.placeholder,
},

// disabled
'&:not(:invalid):disabled': {
color: color.default.disabled.fg,

'&::placeholder': {
color: color.default.disabled.placeholder,
},
'--input-placeholder-color': color.default.disabled.placeholder,
},
}
}
Expand Down

0 comments on commit ed14734

Please sign in to comment.