@@ -10,8 +10,12 @@ export const item = stylex.create({
1010 // `interactive` rather than gaining a hover branch here: StyleX resolves a property to the
1111 // last style that declares it, so the two can't merge.
1212 '--_cl-icon-color' : colorVars [ '--cl-color-foreground-secondary' ] ,
13+ padding : space [ '3' ] ,
14+ borderColor : colorVars [ '--cl-color-border-subtle' ] ,
1315 borderRadius : radiusVars [ '--cl-radius-lg' ] ,
14- paddingInline : space [ '1.5' ] ,
16+ borderStyle : 'solid' ,
17+ borderWidth : '1px' ,
18+ gap : space [ '3' ] ,
1519 alignItems : 'center' ,
1620 color : colorVars [ '--cl-color-foreground-secondary' ] ,
1721 display : 'flex' ,
@@ -22,69 +26,56 @@ export const item = stylex.create({
2226 width : '100%' ,
2327 } ,
2428
25- // interactive rows (rendered as a link/button via `render`) gain hover + cursor. Only these
26- // promote on hover: a static row is not pointing at anything, so its icon and label hold.
27- // A row that is standing down while another action runs keeps its look rather than dimming, so
28- // it holds its opacity where `Button` drops to 0.5. The pointer still reaches it, which is what
29- // shows `not-allowed`, so every hover branch has to exclude a standing-down row itself. Both
30- // spellings count: a row that has to stay focusable while it waits carries `aria-disabled`
31- // instead of the native attribute.
29+ // interactive rows (rendered as a link, button or radio card via `render`) gain hover + cursor.
30+ // Only these promote on hover: a static row is not pointing at anything, so its icon and label
31+ // hold. A row that is standing down while another action runs keeps its look rather than
32+ // dimming, so it holds its opacity where `Button` drops to 0.5. The pointer still reaches it,
33+ // which is what shows `not-allowed`, so every hover branch has to exclude a standing-down row
34+ // itself. Both spellings count: a row that has to stay focusable while it waits carries
35+ // `aria-disabled` instead of the native attribute. A radio card reflects its own state as
36+ // `data-checked` and `data-disabled`; only a `data-disabled` row dims.
3237 interactive : {
3338 '--_cl-icon-color' : {
3439 default : colorVars [ '--cl-color-foreground-secondary' ] ,
3540 '@media (hover: hover)' : {
3641 default : null ,
37- ':hover:not(:disabled, [aria-disabled="true"])' : colorVars [ '--cl-color-neutral' ] ,
42+ ':hover:not(:disabled, [aria-disabled="true"], [data-disabled])' : colorVars [ '--cl-color-neutral' ] ,
43+ } ,
44+ } ,
45+ borderColor : {
46+ default : colorVars [ '--cl-color-border-subtle' ] ,
47+ ':where([data-checked])' : colorVars [ '--cl-color-foreground' ] ,
48+ '@media (hover: hover)' : {
49+ default : null ,
50+ ':hover:not(:disabled, [aria-disabled="true"], [data-disabled], [data-checked])' :
51+ colorVars [ '--cl-color-border' ] ,
3852 } ,
3953 } ,
4054 backgroundColor : {
4155 default : null ,
42- ':active:not(:disabled, [aria-disabled="true"])' : colorVars [ '--cl-color-neutral-alpha-200' ] ,
56+ ':active:not(:disabled, [aria-disabled="true"], [data-disabled])' : colorVars [ '--cl-color-neutral-alpha-200' ] ,
57+ ':where([data-checked])' : colorVars [ '--cl-color-neutral-alpha-100' ] ,
4358 '@media (hover: hover)' : {
44- ':hover:not(:disabled, [aria-disabled="true"])' : colorVars [ '--cl-color-neutral-alpha-100' ] ,
59+ ':hover:not(:disabled, [aria-disabled="true"], [data-disabled], [data-checked])' :
60+ colorVars [ '--cl-color-neutral-alpha-100' ] ,
4561 } ,
4662 } ,
4763 color : {
4864 default : colorVars [ '--cl-color-foreground-secondary' ] ,
4965 '@media (hover: hover)' : {
5066 default : null ,
51- ':hover:not(:disabled, [aria-disabled="true"])' : colorVars [ '--cl-color-foreground' ] ,
67+ ':hover:not(:disabled, [aria-disabled="true"], [data-disabled] )' : colorVars [ '--cl-color-foreground' ] ,
5268 } ,
5369 } ,
5470 cursor : {
5571 default : 'pointer' ,
56- ':is(:disabled, [aria-disabled="true"])' : 'not-allowed' ,
72+ ':is(:disabled, [aria-disabled="true"], [data-disabled] )' : 'not-allowed' ,
5773 } ,
58- } ,
59-
60- outline : {
61- borderColor : colorVars [ '--cl-color-border-subtle' ] ,
62- borderStyle : 'solid' ,
63- borderWidth : '1px' ,
64- } ,
65-
66- interactiveOutline : {
67- borderColor : {
74+ opacity : {
6875 default : null ,
69- '@media (hover: hover)' : {
70- default : null ,
71- ':hover:not(:disabled, [aria-disabled="true"])' : colorVars [ '--cl-color-border' ] ,
72- } ,
76+ ':where([data-disabled])' : 0.5 ,
7377 } ,
74- } ,
75-
76- xs : {
77- gap : space [ '1.5' ] ,
78- height : space [ '8' ] ,
79- } ,
80- md : {
81- gap : space [ '3' ] ,
82- height : space [ '13' ] ,
83- } ,
84- lg : {
85- gap : space [ '3' ] ,
86- paddingInline : space [ '3' ] ,
87- height : space [ '16' ] ,
78+ position : 'relative' ,
8879 } ,
8980} ) ;
9081
@@ -95,11 +86,8 @@ export const media = stylex.create({
9586 display : 'flex' ,
9687 flexShrink : 0 ,
9788 justifyContent : 'center' ,
89+ width : space [ '10' ] ,
9890 } ,
99-
100- xs : { width : space [ '5' ] } ,
101- md : { width : space [ '10' ] } ,
102- lg : { width : space [ '10' ] } ,
10391} ) ;
10492
10593export const content = stylex . create ( {
@@ -149,28 +137,9 @@ export const actions = stylex.create({
149137
150138export const group = stylex . create ( {
151139 base : {
152- width : '100%' ,
153- } ,
154-
155- // The gutter belongs to the variant rather than `base`: `outline` has none, and holding it here
156- // keeps the two from overriding each other.
157- default : {
158- padding : space [ '1.5' ] ,
159- } ,
160- // Bordered rows read as separate cards, so the group drops its gutter and spaces them instead.
161- outline : {
162140 gap : space [ '2' ] ,
163141 display : 'flex' ,
164142 flexDirection : 'column' ,
165- } ,
166- } ) ;
167-
168- export const separator = stylex . create ( {
169- base : {
170- borderStyle : 'none' ,
171- backgroundColor : colorVars [ '--cl-color-border-subtle' ] ,
172- flexShrink : 0 ,
173- height : '1px' ,
174143 width : '100%' ,
175144 } ,
176145} ) ;
0 commit comments