Skip to content

Commit 6c61f5b

Browse files
authored
Docs css fixes (#5374)
1 parent b90cbf1 commit 6c61f5b

File tree

5 files changed

+26
-17
lines changed

5 files changed

+26
-17
lines changed

packages/react-aria-components/docs/ComboBox.mdx

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -126,6 +126,10 @@ import {ComboBox, Label, Input, Button, Popover, ListBox, ListBoxItem} from 'rea
126126
max-height: inherit;
127127
min-height: unset;
128128
border: none;
129+
130+
.react-aria-Header {
131+
padding-left: 1.571rem;
132+
}
129133
}
130134

131135
.react-aria-ListBoxItem {

packages/react-aria-components/docs/Group.mdx

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -94,6 +94,7 @@ import {TextField, Label, Group, Input, Button} from 'react-aria-components';
9494

9595
&::placeholder {
9696
color: var(--spectrum-gray-600);
97+
opacity: 1;
9798
}
9899
}
99100

packages/react-aria-components/docs/Modal.mdx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -104,7 +104,7 @@ import {DialogTrigger, Modal, Dialog, Button, Heading, TextField, Label, Input}
104104
background: var(--page-background);
105105
border: 1px solid var(--spectrum-global-color-gray-300);
106106
outline: none;
107-
max-width: 250px;
107+
max-width: 300px;
108108

109109
&[data-entering] {
110110
animation: modal-zoom 300ms cubic-bezier(0.175, 0.885, 0.32, 1.275);

packages/react-aria-components/docs/Select.mdx

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -137,6 +137,10 @@ import {Select, SelectValue, Label, Button, Popover, ListBox, ListBoxItem} from
137137
max-height: inherit;
138138
min-height: unset;
139139
border: none;
140+
141+
.react-aria-Header {
142+
padding-left: 1.571rem;
143+
}
140144
}
141145

142146
.react-aria-ListBoxItem {

packages/react-aria-components/docs/Table.mdx

Lines changed: 16 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -136,7 +136,11 @@ import {Table, TableHeader, TableBody, Column, Row, Cell} from 'react-aria-compo
136136
}
137137

138138
.react-aria-Row {
139-
border-radius: 6px;
139+
--radius-top: 6px;
140+
--radius-bottom: 6px;
141+
--radius: var(--radius-top) var(--radius-top) var(--radius-bottom) var(--radius-bottom);
142+
border-radius: var(--radius);
143+
clip-path: inset(0 round var(--radius)); /* firefox */
140144
outline: none;
141145
cursor: default;
142146
color: var(--text-color);
@@ -149,15 +153,13 @@ import {Table, TableHeader, TableBody, Column, Row, Cell} from 'react-aria-compo
149153
outline-offset: -2px;
150154
}
151155

152-
&[data-pressed] .react-aria-Cell {
156+
&[data-pressed] {
153157
background: var(--spectrum-global-color-gray-200);
154158
}
155159

156160
&[data-selected] {
157-
.react-aria-Cell {
158-
background: var(--highlight-background);
159-
color: var(--highlight-foreground);
160-
}
161+
background: var(--highlight-background);
162+
color: var(--highlight-foreground);
161163

162164
&[data-focus-visible],
163165
.react-aria-Cell[data-focus-visible] {
@@ -187,26 +189,24 @@ import {Table, TableHeader, TableBody, Column, Row, Cell} from 'react-aria-compo
187189
transform: translateZ(0);
188190

189191
&:first-child {
190-
border-radius: 6px 0 0 6px;
192+
border-radius: var(--radius-top) 0 0 var(--radius-bottom);
191193
}
192194

193195
&:last-child {
194-
border-radius: 0 6px 6px 0;
196+
border-radius: 0 var(--radius-top) var(--radius-bottom) 0;
195197
}
196198
}
197199

198200
/* join selected items if :has selector is supported */
199201
@supports selector(:has(.foo)) {
200-
.react-aria-Row[data-selected]:has(+ [data-selected]) .react-aria-Cell,
201-
.react-aria-Row[data-selected]:has(+ .react-aria-DropIndicator + [data-selected]) .react-aria-Cell {
202-
border-end-start-radius: 0;
203-
border-end-end-radius: 0;
202+
.react-aria-Row[data-selected]:has(+ [data-selected]),
203+
.react-aria-Row[data-selected]:has(+ .react-aria-DropIndicator + [data-selected]) {
204+
--radius-bottom: 0px;
204205
}
205206

206-
.react-aria-Row[data-selected] + [data-selected] .react-aria-Cell,
207-
.react-aria-Row[data-selected] + .react-aria-DropIndicator + [data-selected] .react-aria-Cell {
208-
border-start-start-radius: 0;
209-
border-start-end-radius: 0;
207+
.react-aria-Row[data-selected] + [data-selected],
208+
.react-aria-Row[data-selected] + .react-aria-DropIndicator + [data-selected]{
209+
--radius-top: 0px;
210210
}
211211
}
212212
}

0 commit comments

Comments
 (0)