@primer/brand-css 0.56.3 → 0.56.4-rc.2db7b07e
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/components/ActionMenu/ActionMenu.css +7 -0
- package/components/FAQ/FAQGroup.css +8 -0
- package/components/Pagination/Pagination.css +8 -0
- package/components/Prose/Prose.css +163 -0
- package/components/VideoPlayer/VideoPlayer.css +74 -4
- package/components/forms/Checkbox/Checkbox.css +15 -0
- package/components/forms/Radio/Radio.css +11 -0
- package/components/forms/Select/Select.css +7 -0
- package/components/forms/TextInput/TextInput.css +7 -0
- package/components/forms/Textarea/Textarea.css +7 -0
- package/package.json +1 -1
|
@@ -278,6 +278,13 @@
|
|
|
278
278
|
fill: var(--base-color-scale-gray-3);
|
|
279
279
|
}
|
|
280
280
|
|
|
281
|
+
@media (forced-colors: active) {
|
|
282
|
+
.ActionMenu__item:focus-visible {
|
|
283
|
+
outline: var(--brand-borderWidth-thick) solid Highlight;
|
|
284
|
+
outline-offset: var(--base-size-2);
|
|
285
|
+
}
|
|
286
|
+
}
|
|
287
|
+
|
|
281
288
|
/* Remove all animations, transitions and smooth scroll for people that prefer not to see them */
|
|
282
289
|
@media (prefers-reduced-motion: reduce) {
|
|
283
290
|
.ActionMenu,
|
|
@@ -50,3 +50,11 @@
|
|
|
50
50
|
font-size: var(--brand-text-size-200);
|
|
51
51
|
line-height: var(--brand-text-lineHeight-200);
|
|
52
52
|
}
|
|
53
|
+
|
|
54
|
+
@media (forced-colors: active) {
|
|
55
|
+
.FAQGroup__tablist-button[aria-selected='true'] {
|
|
56
|
+
border-color: Highlight;
|
|
57
|
+
border-width: var(--brand-borderWidth-thicker);
|
|
58
|
+
color: HighlightText;
|
|
59
|
+
}
|
|
60
|
+
}
|
|
@@ -117,6 +117,14 @@
|
|
|
117
117
|
}
|
|
118
118
|
}
|
|
119
119
|
|
|
120
|
+
@media (forced-colors: active) {
|
|
121
|
+
.Pagination__item[aria-current],
|
|
122
|
+
.Pagination__item[aria-current]:hover {
|
|
123
|
+
border-color: Highlight;
|
|
124
|
+
border-width: var(--brand-borderWidth-thicker);
|
|
125
|
+
}
|
|
126
|
+
}
|
|
127
|
+
|
|
120
128
|
/* Remove all animations, transitions and smooth scroll for people that prefer not to see them */
|
|
121
129
|
@media (prefers-reduced-motion: reduce) {
|
|
122
130
|
.Pagination,
|
|
@@ -352,3 +352,166 @@
|
|
|
352
352
|
transition: none !important;
|
|
353
353
|
}
|
|
354
354
|
}
|
|
355
|
+
|
|
356
|
+
/* Tables */
|
|
357
|
+
|
|
358
|
+
.Prose table {
|
|
359
|
+
--spacing: var(--base-size-32);
|
|
360
|
+
width: 100%;
|
|
361
|
+
border-collapse: collapse;
|
|
362
|
+
border-spacing: 0;
|
|
363
|
+
font-size: var(--brand-text-size-200);
|
|
364
|
+
line-height: var(--brand-text-lineHeight-200);
|
|
365
|
+
}
|
|
366
|
+
|
|
367
|
+
.Prose table caption {
|
|
368
|
+
text-align: left;
|
|
369
|
+
padding-block-end: var(--base-size-24);
|
|
370
|
+
font-size: var(--brand-text-size-100);
|
|
371
|
+
font-weight: var(--brand-text-weight-100);
|
|
372
|
+
line-height: var(--brand-text-lineHeight-100);
|
|
373
|
+
color: var(--brand-color-text-muted);
|
|
374
|
+
}
|
|
375
|
+
|
|
376
|
+
.Prose table th,
|
|
377
|
+
.Prose table td {
|
|
378
|
+
padding-block: var(--base-size-16);
|
|
379
|
+
padding-inline: var(--base-size-12);
|
|
380
|
+
text-align: left;
|
|
381
|
+
vertical-align: top;
|
|
382
|
+
border-bottom: var(--brand-borderWidth-thin) solid var(--brand-color-border-muted);
|
|
383
|
+
}
|
|
384
|
+
|
|
385
|
+
.Prose table th:first-child,
|
|
386
|
+
.Prose table td:first-child,
|
|
387
|
+
.Prose table th:last-child,
|
|
388
|
+
.Prose table td:last-child {
|
|
389
|
+
padding-inline: 0;
|
|
390
|
+
}
|
|
391
|
+
|
|
392
|
+
.Prose table th {
|
|
393
|
+
font-size: var(--brand-text-size-100);
|
|
394
|
+
font-weight: var(--brand-text-weight-400);
|
|
395
|
+
line-height: var(--brand-text-lineHeight-100);
|
|
396
|
+
color: var(--brand-color-text-muted);
|
|
397
|
+
}
|
|
398
|
+
|
|
399
|
+
.Prose table thead th {
|
|
400
|
+
border-bottom: var(--brand-borderWidth-thick) solid var(--brand-color-border-default);
|
|
401
|
+
}
|
|
402
|
+
|
|
403
|
+
.Prose table tbody tr:last-child td {
|
|
404
|
+
border-bottom: none;
|
|
405
|
+
}
|
|
406
|
+
|
|
407
|
+
.Prose--editorial table {
|
|
408
|
+
--spacing: var(--base-size-48);
|
|
409
|
+
}
|
|
410
|
+
|
|
411
|
+
.Prose td > ul:first-child,
|
|
412
|
+
.Prose td > ol:first-child {
|
|
413
|
+
margin-block-start: 0;
|
|
414
|
+
}
|
|
415
|
+
|
|
416
|
+
@media screen and (min-width: 48rem) {
|
|
417
|
+
.Prose table th,
|
|
418
|
+
.Prose table td {
|
|
419
|
+
padding: var(--base-size-16) var(--base-size-8);
|
|
420
|
+
}
|
|
421
|
+
|
|
422
|
+
.Prose table th:not(:first-child):not(:last-child),
|
|
423
|
+
.Prose table td:not(:first-child):not(:last-child) {
|
|
424
|
+
padding-inline: var(--base-size-16);
|
|
425
|
+
}
|
|
426
|
+
|
|
427
|
+
.Prose table th:first-child,
|
|
428
|
+
.Prose table td:first-child {
|
|
429
|
+
padding-inline-start: 0;
|
|
430
|
+
}
|
|
431
|
+
|
|
432
|
+
.Prose table th:last-child,
|
|
433
|
+
.Prose table td:last-child {
|
|
434
|
+
padding-inline-end: 0;
|
|
435
|
+
}
|
|
436
|
+
|
|
437
|
+
.Prose table tbody tr:hover {
|
|
438
|
+
background-color: var(--brand-color-canvas-subtle);
|
|
439
|
+
}
|
|
440
|
+
}
|
|
441
|
+
|
|
442
|
+
@media screen and (max-width: 47.99rem) {
|
|
443
|
+
.Prose table:has(td[data-label]) {
|
|
444
|
+
border-collapse: separate;
|
|
445
|
+
border-spacing: 0;
|
|
446
|
+
width: 100%;
|
|
447
|
+
background: none;
|
|
448
|
+
box-shadow: none;
|
|
449
|
+
font-size: var(--brand-text-size-200); /* inherit from Prose */
|
|
450
|
+
}
|
|
451
|
+
|
|
452
|
+
/* Visually hidden only */
|
|
453
|
+
.Prose table:has(td[data-label]) thead {
|
|
454
|
+
position: absolute;
|
|
455
|
+
left: -9999px;
|
|
456
|
+
width: 1px;
|
|
457
|
+
height: 1px;
|
|
458
|
+
overflow: hidden;
|
|
459
|
+
}
|
|
460
|
+
|
|
461
|
+
.Prose table:has(td[data-label]) tbody,
|
|
462
|
+
.Prose table:has(td[data-label]) tr {
|
|
463
|
+
display: block;
|
|
464
|
+
width: 100%;
|
|
465
|
+
}
|
|
466
|
+
|
|
467
|
+
.Prose table:has(td[data-label]) th:not(:first-child):not(:last-child),
|
|
468
|
+
.Prose table:has(td[data-label]) td:not(:first-child):not(:last-child) {
|
|
469
|
+
padding-inline: 0;
|
|
470
|
+
}
|
|
471
|
+
|
|
472
|
+
.Prose table:has(td[data-label]) tr {
|
|
473
|
+
border-block-start: var(--brand-borderWidth-thicker) solid var(--brand-color-border-muted);
|
|
474
|
+
padding-block-start: var(--base-size-20);
|
|
475
|
+
margin-block-end: var(--spacing);
|
|
476
|
+
}
|
|
477
|
+
|
|
478
|
+
.Prose td[data-label] {
|
|
479
|
+
display: flex;
|
|
480
|
+
flex-direction: column;
|
|
481
|
+
width: 100%;
|
|
482
|
+
padding: 0;
|
|
483
|
+
margin: 0 0 var(--base-size-16, 16px) 0;
|
|
484
|
+
border: none;
|
|
485
|
+
align-items: flex-start;
|
|
486
|
+
}
|
|
487
|
+
|
|
488
|
+
.Prose td[data-label]:not(:last-child) {
|
|
489
|
+
border-block-end: var(--brand-borderWidth-thin) solid var(--brand-color-border-muted);
|
|
490
|
+
padding-block-end: var(--base-size-20);
|
|
491
|
+
}
|
|
492
|
+
|
|
493
|
+
.Prose td[data-label]::before {
|
|
494
|
+
content: attr(data-label);
|
|
495
|
+
color: var(--brand-color-text-muted);
|
|
496
|
+
margin-block-end: var(--base-size-4);
|
|
497
|
+
text-align: left;
|
|
498
|
+
font-weight: var(--brand-text-weight-400);
|
|
499
|
+
}
|
|
500
|
+
|
|
501
|
+
.Prose table:has(td[data-label]) td:not([data-label]) {
|
|
502
|
+
display: block;
|
|
503
|
+
width: 100%;
|
|
504
|
+
padding: 0;
|
|
505
|
+
margin-block-end: var(--base-size-16);
|
|
506
|
+
border: none;
|
|
507
|
+
}
|
|
508
|
+
|
|
509
|
+
.Prose table:has(td[data-label]) td:not([data-label]):not(:last-child) {
|
|
510
|
+
border-block-end: var(--brand-borderWidth-thin) solid var(--brand-color-border-muted);
|
|
511
|
+
padding-block-end: var(--base-size-20);
|
|
512
|
+
}
|
|
513
|
+
|
|
514
|
+
.Prose td[data-label]:last-child {
|
|
515
|
+
margin-block-end: 0;
|
|
516
|
+
}
|
|
517
|
+
}
|
|
@@ -31,6 +31,12 @@
|
|
|
31
31
|
height: 100%;
|
|
32
32
|
}
|
|
33
33
|
|
|
34
|
+
@media (forced-colors: active) {
|
|
35
|
+
.VideoPlayer__container {
|
|
36
|
+
border: var(--brand-borderWidth-thin) solid ButtonBorder;
|
|
37
|
+
}
|
|
38
|
+
}
|
|
39
|
+
|
|
34
40
|
/* ---------------------------------------------------------- */
|
|
35
41
|
/* 2. Player */
|
|
36
42
|
/* ---------------------------------------------------------- */
|
|
@@ -87,6 +93,13 @@
|
|
|
87
93
|
color: var(--brand-videoPlayer-playButton-fgColor-rest);
|
|
88
94
|
}
|
|
89
95
|
|
|
96
|
+
@media (forced-colors: active) {
|
|
97
|
+
.VideoPlayer__playButton {
|
|
98
|
+
color: Highlight;
|
|
99
|
+
opacity: 1;
|
|
100
|
+
}
|
|
101
|
+
}
|
|
102
|
+
|
|
90
103
|
/* ---------------------------------------------------------- */
|
|
91
104
|
/* 4. Title */
|
|
92
105
|
/* ---------------------------------------------------------- */
|
|
@@ -114,6 +127,13 @@
|
|
|
114
127
|
visibility: hidden;
|
|
115
128
|
}
|
|
116
129
|
|
|
130
|
+
@media (forced-colors: active) {
|
|
131
|
+
.VideoPlayer__title {
|
|
132
|
+
background: Canvas;
|
|
133
|
+
color: CanvasText;
|
|
134
|
+
}
|
|
135
|
+
}
|
|
136
|
+
|
|
117
137
|
/* ---------------------------------------------------------- */
|
|
118
138
|
/* 5. Controls */
|
|
119
139
|
/* ---------------------------------------------------------- */
|
|
@@ -173,12 +193,15 @@
|
|
|
173
193
|
}
|
|
174
194
|
|
|
175
195
|
.VideoPlayer__iconControl:focus-visible {
|
|
176
|
-
|
|
177
|
-
outline:
|
|
178
|
-
box-shadow: 0 0 0 0.125rem var(--brand-color-focus);
|
|
196
|
+
outline: var(--brand-borderWidth-thick) solid var(--brand-color-focus);
|
|
197
|
+
outline-offset: var(--base-size-6);
|
|
179
198
|
opacity: 1;
|
|
180
199
|
}
|
|
181
200
|
|
|
201
|
+
.VideoPlayer__iconControl:not(.VideoPlayer__closedCaption):focus-visible {
|
|
202
|
+
border-radius: var(--brand-borderRadius-small);
|
|
203
|
+
}
|
|
204
|
+
|
|
182
205
|
.VideoPlayer__iconControl svg {
|
|
183
206
|
color: var(--brand-videoPlayer-controls-fgColor);
|
|
184
207
|
}
|
|
@@ -224,6 +247,30 @@
|
|
|
224
247
|
color: var(--brand-videoPlayer-closedCaption-fgColor-disabled);
|
|
225
248
|
}
|
|
226
249
|
|
|
250
|
+
@media (forced-colors: active) {
|
|
251
|
+
.VideoPlayer__iconControl svg {
|
|
252
|
+
color: ButtonText;
|
|
253
|
+
}
|
|
254
|
+
|
|
255
|
+
.VideoPlayer__iconControl:focus-visible {
|
|
256
|
+
outline-color: Highlight;
|
|
257
|
+
}
|
|
258
|
+
|
|
259
|
+
.VideoPlayer__closedCaption:focus-visible {
|
|
260
|
+
outline: none;
|
|
261
|
+
}
|
|
262
|
+
|
|
263
|
+
.VideoPlayer__closedCaption:not(.VideoPlayer__ccOff) {
|
|
264
|
+
background: Highlight;
|
|
265
|
+
border-color: Highlight;
|
|
266
|
+
}
|
|
267
|
+
|
|
268
|
+
.VideoPlayer__closedCaption:not(.VideoPlayer__ccOff) .VideoPlayer__ccText {
|
|
269
|
+
background-color: Highlight;
|
|
270
|
+
color: HighlightText;
|
|
271
|
+
}
|
|
272
|
+
}
|
|
273
|
+
|
|
227
274
|
/* ---------------------------------------------------------- */
|
|
228
275
|
/* 6. Range Element */
|
|
229
276
|
/* ---------------------------------------------------------- */
|
|
@@ -254,7 +301,8 @@
|
|
|
254
301
|
|
|
255
302
|
.VideoPlayer__rangeInput:focus-visible {
|
|
256
303
|
outline: var(--brand-borderWidth-thick) solid var(--brand-color-focus);
|
|
257
|
-
outline-offset: var(--base-size-
|
|
304
|
+
outline-offset: var(--base-size-8);
|
|
305
|
+
border-radius: var(--brand-borderRadius-small);
|
|
258
306
|
opacity: 1;
|
|
259
307
|
}
|
|
260
308
|
|
|
@@ -303,6 +351,28 @@
|
|
|
303
351
|
border: none;
|
|
304
352
|
}
|
|
305
353
|
|
|
354
|
+
@media (forced-colors: active) {
|
|
355
|
+
.VideoPlayer__rangeProgress::-webkit-progress-bar {
|
|
356
|
+
background-color: FieldText;
|
|
357
|
+
}
|
|
358
|
+
|
|
359
|
+
.VideoPlayer__rangeProgress::-webkit-progress-value {
|
|
360
|
+
background-color: Highlight;
|
|
361
|
+
}
|
|
362
|
+
|
|
363
|
+
.VideoPlayer__rangeProgress::-moz-progress-bar {
|
|
364
|
+
background: Highlight;
|
|
365
|
+
}
|
|
366
|
+
|
|
367
|
+
.VideoPlayer__rangeProgress::-ms-fill-lower {
|
|
368
|
+
background-color: Highlight;
|
|
369
|
+
}
|
|
370
|
+
|
|
371
|
+
.VideoPlayer__rangeProgress::-ms-fill-upper {
|
|
372
|
+
background-color: FieldText;
|
|
373
|
+
}
|
|
374
|
+
}
|
|
375
|
+
|
|
306
376
|
/* ---------------------------------------------------------- */
|
|
307
377
|
/* 7. Tooltip */
|
|
308
378
|
/* ---------------------------------------------------------- */
|
|
@@ -87,6 +87,21 @@
|
|
|
87
87
|
opacity: 1;
|
|
88
88
|
}
|
|
89
89
|
|
|
90
|
+
@media (forced-colors: active) {
|
|
91
|
+
.Checkbox-input:focus + .Checkbox {
|
|
92
|
+
outline: var(--brand-borderWidth-thick) solid Highlight;
|
|
93
|
+
outline-offset: var(--base-size-2);
|
|
94
|
+
}
|
|
95
|
+
|
|
96
|
+
.Checkbox-input:checked + .Checkbox .Checkbox-checkmark-path {
|
|
97
|
+
stroke: Highlight;
|
|
98
|
+
}
|
|
99
|
+
|
|
100
|
+
.Checkbox {
|
|
101
|
+
transition: none;
|
|
102
|
+
}
|
|
103
|
+
}
|
|
104
|
+
|
|
90
105
|
/* Remove all animations, transitions and smooth scroll for people that prefer not to see them */
|
|
91
106
|
@media (prefers-reduced-motion: reduce) {
|
|
92
107
|
.Checkbox,
|
|
@@ -110,6 +110,17 @@ Fixes safari bug where outline doesn't respect border-radius
|
|
|
110
110
|
opacity: 1;
|
|
111
111
|
}
|
|
112
112
|
|
|
113
|
+
@media (forced-colors: active) {
|
|
114
|
+
.Radio-input:focus + .Radio {
|
|
115
|
+
outline: var(--brand-borderWidth-thick) solid Highlight;
|
|
116
|
+
outline-offset: var(--base-size-4);
|
|
117
|
+
}
|
|
118
|
+
|
|
119
|
+
.Radio-input:checked + .Radio .Radio-dot {
|
|
120
|
+
background-color: Highlight;
|
|
121
|
+
}
|
|
122
|
+
}
|
|
123
|
+
|
|
113
124
|
/* Remove all animations, transitions and smooth scroll for people that prefer not to see them */
|
|
114
125
|
@media (prefers-reduced-motion: reduce) {
|
|
115
126
|
.Radio,
|
|
@@ -41,6 +41,13 @@
|
|
|
41
41
|
box-shadow: 0 0 0 2px var(--brand-color-focus);
|
|
42
42
|
}
|
|
43
43
|
|
|
44
|
+
@media (forced-colors: active) {
|
|
45
|
+
.Select:focus-visible {
|
|
46
|
+
outline: var(--brand-borderWidth-thick) solid Highlight;
|
|
47
|
+
outline-offset: var(--base-size-2);
|
|
48
|
+
}
|
|
49
|
+
}
|
|
50
|
+
|
|
44
51
|
.Select[disabled] {
|
|
45
52
|
-webkit-text-fill-color: var(--brand-control-color-fg-disabled);
|
|
46
53
|
color: var(--brand-control-color-fg-disabled);
|
|
@@ -107,6 +107,13 @@
|
|
|
107
107
|
outline: none;
|
|
108
108
|
}
|
|
109
109
|
|
|
110
|
+
@media (forced-colors: active) {
|
|
111
|
+
.TextInput-wrapper:focus-within {
|
|
112
|
+
outline: var(--brand-borderWidth-thick) solid Highlight;
|
|
113
|
+
outline-offset: var(--base-size-2);
|
|
114
|
+
}
|
|
115
|
+
}
|
|
116
|
+
|
|
110
117
|
/*
|
|
111
118
|
* Validation
|
|
112
119
|
*/
|
|
@@ -114,6 +114,13 @@
|
|
|
114
114
|
outline: none;
|
|
115
115
|
}
|
|
116
116
|
|
|
117
|
+
@media (forced-colors: active) {
|
|
118
|
+
.Textarea-wrapper:focus-within {
|
|
119
|
+
outline: var(--brand-borderWidth-thick) solid Highlight;
|
|
120
|
+
outline-offset: var(--base-size-2);
|
|
121
|
+
}
|
|
122
|
+
}
|
|
123
|
+
|
|
117
124
|
/*
|
|
118
125
|
* Validation
|
|
119
126
|
*/
|