Skip to content

Commit eb9e860

Browse files
authored
fix: unit input style (#5689)
1 parent afe67bf commit eb9e860

File tree

2 files changed

+14
-10
lines changed

2 files changed

+14
-10
lines changed

.changeset/fine-gifts-film.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
---
2+
"@ultraviolet/ui": minor
3+
---
4+
5+
`UnitInput`: remove `&&` in style, since it is not needed anymore and replace id use with vanilla-extract class

packages/ui/src/components/UnitInput/styles.css.ts

Lines changed: 9 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@ import {
55
style,
66
styleVariants,
77
} from '@vanilla-extract/css'
8+
import { selectBarBase } from '../SelectInput/components/selectBar.css'
89

910
export const widthSelectInput = createVar()
1011

@@ -173,21 +174,19 @@ export const unitInputSize = styleVariants({
173174
})
174175

175176
export const unitInputUnitWidth = style({
176-
/** TODO remove selector when selectInput uses vanilla extract */
177-
selectors: {
178-
'&&': {
179-
width: widthSelectInput,
180-
},
181-
},
177+
width: widthSelectInput,
182178
})
183179

184180
export const unitInputUnit = style({})
185181

186-
globalStyle(`${unitInputUnit} #unit`, {
182+
globalStyle(`${unitInputUnit} ${selectBarBase}`, {
187183
border: 'none',
188184
background: 'transparent',
189185
})
190186

191-
globalStyle(`${unitInputUnit} #unit:focus, ${unitInputUnit} #unit:active, `, {
192-
boxShadow: 'none',
193-
})
187+
globalStyle(
188+
`${unitInputUnit} ${selectBarBase}:focus, ${unitInputUnit} ${selectBarBase}:active, `,
189+
{
190+
boxShadow: 'none',
191+
},
192+
)

0 commit comments

Comments
 (0)