File tree Expand file tree Collapse file tree 3 files changed +42
-28
lines changed
components/EOL/VulnerabilityChips
packages/ui-components/src/styles Expand file tree Collapse file tree 3 files changed +42
-28
lines changed Original file line number Diff line number Diff line change @@ -23,7 +23,7 @@ const VulnerabilityChips: FC<VulnerabilityChipsProps> = ({
23
23
) ;
24
24
25
25
return (
26
- < div className = "flex flex-row flex-wrap gap-2 max-sm:justify-end" >
26
+ < div className = "flex flex-row flex-wrap gap-1 max-sm:justify-end" >
27
27
{ SEVERITY_ORDER . filter ( severity => groupedBySeverity [ severity ] > 0 ) . map (
28
28
severity => (
29
29
< VulnerabilityChip
Original file line number Diff line number Diff line change @@ -14,6 +14,14 @@ export default function remarkTableTitles() {
14
14
15
15
const [ headerRow , ...dataRows ] = table . children ;
16
16
17
+ if ( headerRow . children . length <= 1 ) {
18
+ table . data ??= { } ;
19
+
20
+ table . data . hProperties = {
21
+ 'data-cards' : 'false' ,
22
+ } ;
23
+ }
24
+
17
25
// Extract header labels from the first row
18
26
const headerLabels = headerRow . children . map ( headerCell =>
19
27
toString ( headerCell . children )
Original file line number Diff line number Diff line change @@ -128,23 +128,22 @@ main {
128
128
w-full
129
129
border-separate
130
130
border-spacing-0
131
+ border
131
132
border-neutral-200
132
133
text-left
133
134
text-sm
134
- max-sm:block
135
- md:border
136
135
dark:border-neutral-800;
137
136
138
137
/* Common border and text styles */
139
138
th ,
140
139
td {
141
- @apply border-neutral-200
140
+ @apply border
141
+ border-r-0
142
+ border-t-0
143
+ border-neutral-200
144
+ px-4
145
+ py-2
142
146
text-neutral-900
143
- md:border
144
- md:border-r-0
145
- md:border-t-0
146
- md:px-4
147
- md:py-2
148
147
dark:border-neutral-800
149
148
dark:text-white;
150
149
@@ -153,8 +152,30 @@ main {
153
152
}
154
153
}
155
154
156
- /* Mobile-specific styles */
157
- @media (max-width : 40rem ) {
155
+ th {
156
+ @apply font-semibold;
157
+ }
158
+
159
+ tr : last-child > td {
160
+ @apply sm:border-b-0;
161
+
162
+ & : last-child {
163
+ @apply max-xs:border-b-0;
164
+ }
165
+ }
166
+
167
+ td : first-child ,
168
+ th : first-child {
169
+ @apply sm:border-l-0;
170
+ }
171
+ }
172
+
173
+ /* Mobile-specific styles */
174
+ @media (max-width : 40rem ) {
175
+ table : not ([data-cards='false']) {
176
+ @apply block
177
+ border-0;
178
+
158
179
thead {
159
180
@apply sr-only;
160
181
}
@@ -182,7 +203,9 @@ main {
182
203
td {
183
204
@apply relative
184
205
block
206
+ border-0
185
207
border-b
208
+ px-0
186
209
py-2
187
210
pl-[33% ]
188
211
text-right
@@ -203,22 +226,5 @@ main {
203
226
dark:before:text-neutral-200;
204
227
}
205
228
}
206
-
207
- th {
208
- @apply font-semibold;
209
- }
210
-
211
- tr : last-child > td {
212
- @apply sm:border-b-0;
213
-
214
- & : last-child {
215
- @apply max-xs:border-b-0;
216
- }
217
- }
218
-
219
- td : first-child ,
220
- th : first-child {
221
- @apply sm:border-l-0;
222
- }
223
229
}
224
230
}
You can’t perform that action at this time.
0 commit comments