File tree Expand file tree Collapse file tree 1 file changed +36
-31
lines changed
packages/ui-components/src/styles Expand file tree Collapse file tree 1 file changed +36
-31
lines changed Original file line number Diff line number Diff line change @@ -135,37 +135,7 @@ main {
135135 md:border
136136 dark:border-neutral-800;
137137
138- thead {
139- @apply max-sm:sr-only;
140- }
141-
142- tbody {
143- @apply max-sm:block
144- max-sm:space-y-4;
145- }
146-
147- tr {
148- @apply max-sm:rounded-xs
149- max-sm:block
150- max-sm:border
151- max-sm:border-neutral-200
152- max-sm:p-4
153- max-sm:before:content-[attr (data-label)]
154- max-sm:dark:border-neutral-800;
155- }
156-
157- td {
158- @apply border-b
159- max-sm:relative
160- max-sm:block
161- max-sm:py-2
162- max-sm:pl-[40% ]
163- max-sm:before:absolute
164- max-sm:before:left-0
165- max-sm:before:content-[attr (data-label)]
166- max-sm:last:border-0;
167- }
168-
138+ /* Common border and text styles */
169139 th ,
170140 td {
171141 @apply border-neutral-200
@@ -183,6 +153,41 @@ main {
183153 }
184154 }
185155
156+ /* Mobile-specific styles */
157+ @media (max-width : 40rem ) {
158+ thead {
159+ @apply sr-only;
160+ }
161+
162+ tbody {
163+ @apply block
164+ space-y-4;
165+ }
166+
167+ tr {
168+ @apply rounded-xs
169+ block
170+ border
171+ border-neutral-200
172+ p-4
173+ dark:border-neutral-800;
174+ }
175+
176+ td {
177+ @apply relative
178+ block
179+ border-b
180+ py-2
181+ pl-[50% ]
182+ before:absolute
183+ before:left-0
184+ before:top-1/2
185+ before:-translate-y-1/2
186+ before:content-[attr (data-label)]
187+ last:border-0;
188+ }
189+ }
190+
186191 th {
187192 @apply font-semibold;
188193 }
You can’t perform that action at this time.
0 commit comments