@primer/brand-css 0.72.1-rc.c5f3a3b5 → 0.73.0-rc.dc32d936

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.
@@ -5,8 +5,7 @@
5
5
  text-decoration: none;
6
6
  color: var(--brand-color-text-default);
7
7
 
8
- transition: transform var(--brand-Card-animation-duration) var(--brand-Card-animation-easing);
9
- padding: var(--base-size-32);
8
+ padding: var(--brand-Card-padding-block) var(--brand-Card-padding-inline);
10
9
  display: grid;
11
10
  grid-template-columns: 1fr 1fr;
12
11
  grid-template-areas:
@@ -25,14 +24,22 @@
25
24
  border-radius: var(--brand-borderRadius-medium);
26
25
  }
27
26
 
27
+ @media screen and (min-width: 64rem) {
28
+ .Card {
29
+ --brand-Card-padding-inline: var(--base-size-32);
30
+ }
31
+ }
32
+
28
33
  .Card--align-center .Card {
34
+ --brand-Card-padding-block: var(--base-size-64);
35
+ --brand-Card-padding-inline: var(--base-size-40);
36
+
29
37
  text-align: center;
30
- padding: var(--base-size-64) var(--base-size-40);
31
38
  }
32
39
 
33
40
  @media screen and (min-width: 64rem) {
34
41
  .Card--align-center .Card {
35
- padding: var(--base-size-64) var(--base-size-80);
42
+ --brand-Card-padding-inline: var(--base-size-80);
36
43
  }
37
44
  }
38
45
 
@@ -145,7 +152,8 @@
145
152
  }
146
153
 
147
154
  .Card--hasLeadingVisual {
148
- padding: var(--base-size-64) var(--base-size-40);
155
+ --brand-Card-padding-block: var(--base-size-64);
156
+ --brand-Card-padding-inline: var(--base-size-40);
149
157
  }
150
158
 
151
159
  .Card--imagePos-block-end .Card__image {
@@ -244,10 +252,6 @@
244
252
  ); /* This value is adjusted so that, when combined with the container's border radius, the total border radius equals `var(--brand-borderRadius-medium)` */
245
253
  }
246
254
 
247
- .Card:not(.Card--disableAnimation):hover {
248
- transform: scale3d(1.025, 1.025, 1);
249
- }
250
-
251
255
  .Card__image {
252
256
  margin-block-end: var(--base-size-28);
253
257
  border-radius: var(--brand-borderRadius-medium);
@@ -255,6 +259,41 @@
255
259
  grid-area: image;
256
260
  }
257
261
 
262
+ .Card__image--padding-none {
263
+ margin-inline: calc(var(--brand-Card-padding-inline) * -1);
264
+ }
265
+
266
+ .Card__image--position-block-start.Card__image--padding-none {
267
+ margin-block-start: calc(var(--brand-Card-padding-block) * -1);
268
+ }
269
+
270
+ .Card__image--position-block-end.Card__image--padding-none {
271
+ margin-block-end: calc(var(--brand-Card-padding-block) * -1);
272
+ }
273
+
274
+ .Card--border .Card__image--position-block-start.Card__image--padding-none {
275
+ border-end-start-radius: 0;
276
+ border-end-end-radius: 0;
277
+ }
278
+
279
+ .Card--border .Card__image--position-block-end.Card__image--padding-none {
280
+ border-block-start: var(--brand-borderWidth-thin) solid var(--brand-color-border-muted);
281
+ border-start-start-radius: 0;
282
+ border-start-end-radius: 0;
283
+ }
284
+
285
+ .Card--variant-minimal .Card__image--padding-none {
286
+ margin-inline: 0;
287
+ }
288
+
289
+ .Card--variant-minimal .Card__image--position-block-start.Card__image--padding-none {
290
+ margin-block-start: 0;
291
+ }
292
+
293
+ .Card--variant-minimal .Card__image--position-block-end.Card__image--padding-none {
294
+ margin-block-end: 0;
295
+ }
296
+
258
297
  .Card__image img,
259
298
  .Card__image picture,
260
299
  .Card__image span {
@@ -338,9 +377,9 @@
338
377
  .Card__actionLabel {
339
378
  display: block;
340
379
  min-inline-size: 0;
341
- overflow: hidden;
342
- text-overflow: ellipsis;
343
- white-space: nowrap;
380
+ overflow: visible;
381
+ text-overflow: clip;
382
+ white-space: normal;
344
383
  }
345
384
 
346
385
  .Card:not(.Card--ctaVariant-arrow) .Card__action {
@@ -364,20 +403,7 @@
364
403
  }
365
404
 
366
405
  .Card__actionLabelClip {
367
- --actionLabelClip-duration: 400ms;
368
- display: inline-flex;
369
- flex: 1 1 auto;
370
- align-items: center;
371
- align-self: stretch;
372
- min-inline-size: 0;
373
- overflow: hidden;
374
- max-inline-size: 0;
375
- background-color: transparent;
376
- opacity: 0;
377
- transform: translateX(calc(var(--base-size-12) * -1));
378
- transition: max-inline-size var(--actionLabelClip-duration) var(--brand-Card-animation-easing),
379
- opacity var(--actionLabelClip-duration) ease-out, transform var(--actionLabelClip-duration) ease-out,
380
- margin-inline var(--actionLabelClip-duration) ease-out, padding-inline var(--actionLabelClip-duration) ease-out;
406
+ display: contents;
381
407
  }
382
408
 
383
409
  .Card--tokensPosition-block-end .Card__action {
@@ -393,19 +419,16 @@
393
419
  min-inline-size: 0;
394
420
  max-inline-size: calc(100% - var(--Card-arrowAction-endInset));
395
421
  justify-content: flex-start;
396
- -moz-column-gap: 0;
397
- column-gap: 0;
422
+ -moz-column-gap: var(--base-size-8);
423
+ column-gap: var(--base-size-8);
398
424
  padding-block: var(--base-size-4);
399
- padding-inline: 0;
400
- border: var(--brand-borderWidth-thin) solid transparent;
425
+ padding-inline-start: var(--base-size-12);
426
+ padding-inline-end: var(--base-size-4);
427
+ border: var(--brand-borderWidth-thin) solid var(--brand-color-border-default);
401
428
  border-radius: var(--brand-borderRadius-full);
402
- background-color: transparent;
429
+ background-color: var(--brand-Card-background-overlay);
403
430
  flex-shrink: 0;
404
431
  overflow: hidden;
405
- transition: border-color var(--actionArrow-duration) ease-out, background-color var(--actionArrow-duration) ease-out,
406
- column-gap var(--actionArrow-duration) ease-out, padding-inline var(--actionArrow-duration) ease-out;
407
- transition: border-color var(--actionArrow-duration) ease-out, background-color var(--actionArrow-duration) ease-out,
408
- column-gap var(--actionArrow-duration) ease-out, padding-inline var(--actionArrow-duration) ease-out, -moz-column-gap var(--actionArrow-duration) ease-out;
409
432
  }
410
433
 
411
434
  .Card__actionIcon--arrowOnly {
@@ -483,15 +506,51 @@
483
506
  margin-bottom: var(--base-size-12);
484
507
  }
485
508
 
486
- .Card--ctaVariant-arrow:not(.Card--disableAnimation):hover {
487
- transform: none;
488
- }
489
-
490
509
  .Card--ctaVariant-arrow .Card__action {
491
510
  min-inline-size: 0;
492
511
  justify-self: start;
493
512
  }
494
513
 
514
+ @media (hover: hover) {
515
+ .Card__action--arrowOnly {
516
+ -moz-column-gap: 0;
517
+ column-gap: 0;
518
+ padding-inline: 0;
519
+ border-color: transparent;
520
+ background-color: transparent;
521
+ transition: border-color var(--actionArrow-duration) ease-out, background-color var(--actionArrow-duration) ease-out,
522
+ column-gap var(--actionArrow-duration) ease-out, padding-inline var(--actionArrow-duration) ease-out;
523
+ transition: border-color var(--actionArrow-duration) ease-out, background-color var(--actionArrow-duration) ease-out,
524
+ column-gap var(--actionArrow-duration) ease-out, padding-inline var(--actionArrow-duration) ease-out, -moz-column-gap var(--actionArrow-duration) ease-out;
525
+ }
526
+
527
+ .Card__actionLabelClip {
528
+ --actionLabelClip-duration: 400ms;
529
+
530
+ display: inline-flex;
531
+ flex: 1 1 auto;
532
+ align-items: center;
533
+ align-self: stretch;
534
+ min-inline-size: 0;
535
+ overflow: hidden;
536
+ max-inline-size: 0;
537
+ background-color: transparent;
538
+ opacity: 0;
539
+ transform: translateX(calc(var(--base-size-12) * -1));
540
+ margin-inline: 0;
541
+ padding-inline: 0;
542
+ transition: max-inline-size var(--actionLabelClip-duration) var(--brand-Card-animation-easing),
543
+ opacity var(--actionLabelClip-duration) ease-out, transform var(--actionLabelClip-duration) ease-out,
544
+ margin-inline var(--actionLabelClip-duration) ease-out, padding-inline var(--actionLabelClip-duration) ease-out;
545
+ }
546
+
547
+ .Card--ctaVariant-arrow .Card__actionLabel {
548
+ overflow: hidden;
549
+ text-overflow: ellipsis;
550
+ white-space: nowrap;
551
+ }
552
+ }
553
+
495
554
  .Card--align-center .Card--ctaVariant-arrow .Card__action {
496
555
  justify-self: center;
497
556
  }
@@ -523,6 +582,12 @@
523
582
  stroke-dashoffset: 20;
524
583
  }
525
584
 
585
+ .Card--disableAnimation,
586
+ .Card--disableAnimation * {
587
+ animation: none;
588
+ transition: none;
589
+ }
590
+
526
591
  /* Remove all animations, transitions and smooth scroll for people that prefer not to see them */
527
592
  @media (prefers-reduced-motion: reduce) {
528
593
  .Card,
@@ -10,11 +10,13 @@
10
10
  }
11
11
 
12
12
  .FAQ__content-wrapper--gridline {
13
+ padding-inline: var(--base-size-20);
13
14
  max-width: var(--brand-FAQ-maxWidth-list);
14
15
  margin: 0 auto;
15
16
  }
16
17
 
17
18
  .FAQ__heading-wrapper--gridline {
19
+ padding-inline: var(--base-size-20);
18
20
  border-block-end: var(--brand-color-border-muted) var(--brand-borderWidth-thin) solid;
19
21
  margin-block-end: var(--base-size-40);
20
22
  }
@@ -69,7 +71,19 @@
69
71
  margin: 0;
70
72
  }
71
73
 
74
+ @media screen and (min-width: 48rem) {
75
+ .FAQ__content-wrapper--gridline,
76
+ .FAQ__heading-wrapper--gridline {
77
+ padding-inline: var(--base-size-36);
78
+ }
79
+ }
80
+
72
81
  @media screen and (min-width: 63.25rem) {
82
+ .FAQ__content-wrapper--gridline,
83
+ .FAQ__heading-wrapper--gridline {
84
+ padding-inline: 0;
85
+ }
86
+
73
87
  .FAQ__heading-wrapper--gridline {
74
88
  margin-block-end: var(--base-size-48);
75
89
  }
@@ -0,0 +1,52 @@
1
+ .MinimalVideoPlayer {
2
+ position: relative;
3
+ width: 100%;
4
+ }
5
+
6
+ .MinimalVideoPlayer__video {
7
+ display: block;
8
+ width: 100%;
9
+ }
10
+
11
+ .MinimalVideoPlayer__control {
12
+ position: absolute;
13
+ right: var(--base-size-24);
14
+ bottom: var(--base-size-24);
15
+ display: flex;
16
+ align-items: center;
17
+ justify-content: center;
18
+ width: var(--base-size-36);
19
+ height: var(--base-size-36);
20
+ padding: 0;
21
+ color: var(--brand-color-text-muted);
22
+ cursor: pointer;
23
+ background-color: var(--brand-color-canvas-muted);
24
+ border: var(--brand-borderWidth-thin) solid var(--brand-color-border-subtle);
25
+ border-radius: var(--brand-borderRadius-full);
26
+ }
27
+
28
+ .MinimalVideoPlayer__control:focus-visible {
29
+ outline: var(--brand-borderWidth-thick) solid var(--brand-color-focus);
30
+ outline-offset: var(--base-size-2);
31
+ }
32
+
33
+ /* Progressive enhancement that hides the custom control when native controls are visible. */
34
+ .MinimalVideoPlayer__video[controls] + .MinimalVideoPlayer__control {
35
+ display: none;
36
+ }
37
+
38
+ @media (forced-colors: active) {
39
+ .MinimalVideoPlayer {
40
+ border: var(--brand-borderWidth-thin) solid CanvasText;
41
+ }
42
+
43
+ .MinimalVideoPlayer__control {
44
+ color: ButtonText;
45
+ background-color: ButtonFace;
46
+ border-color: ButtonText;
47
+ }
48
+
49
+ .MinimalVideoPlayer__control:focus-visible {
50
+ outline-color: Highlight;
51
+ }
52
+ }
@@ -162,67 +162,79 @@
162
162
  .Testimonial--variant-expressive {
163
163
  display: flex;
164
164
  flex-direction: column;
165
- gap: var(--base-size-48);
166
- }
167
-
168
- @media screen and (min-width: 48rem) {
169
- .Testimonial--variant-expressive {
170
- flex-direction: row;
171
- align-items: flex-end;
172
- gap: var(--base-size-96);
173
- }
165
+ gap: var(--base-size-36);
166
+ width: 100%;
167
+ max-width: 1176px;
168
+ padding-inline: var(--base-size-20);
169
+ padding-block: var(--base-size-40);
174
170
  }
175
171
 
176
172
  .Testimonial--variant-expressive .Testimonial__quoteWrapper {
177
173
  display: flex;
178
174
  flex-direction: column;
179
175
  align-items: flex-start;
180
- gap: var(--base-size-24);
181
- flex: 1 1 0;
176
+ gap: var(--base-size-36);
182
177
  min-width: 0;
183
178
  }
184
179
 
185
180
  .Testimonial--variant-expressive .Testimonial__media {
186
181
  flex-direction: column;
187
182
  align-items: flex-start;
188
- gap: var(--base-size-24);
183
+ gap: var(--base-size-28);
189
184
  margin-block-start: 0;
190
- flex: 0 0 auto;
185
+ width: 100%;
186
+ }
187
+
188
+ .Testimonial--variant-expressive .Testimonial-avatar {
189
+ width: var(--base-size-40);
190
+ height: var(--base-size-40);
191
191
  }
192
192
 
193
193
  .Testimonial--variant-expressive .Testimonial-caption {
194
194
  border-block-start: var(--brand-borderWidth-thin) solid var(--brand-color-border-default);
195
- padding-block-start: var(--base-size-24);
195
+ padding-block-start: var(--base-size-20);
196
196
  width: 100%;
197
- gap: var(--base-size-8);
197
+ gap: var(--base-size-6);
198
198
  }
199
199
 
200
200
  @media screen and (min-width: 48rem) {
201
+ .Testimonial--variant-expressive .Testimonial__quoteWrapper {
202
+ gap: var(--base-size-40);
203
+ }
204
+
201
205
  .Testimonial--variant-expressive .Testimonial__media {
202
- min-width: 240px;
203
- max-width: 320px;
206
+ width: 356px;
204
207
  }
205
208
  }
206
209
 
207
210
  .Testimonial--variant-expressive .Testimonial-from {
208
211
  display: flex;
209
212
  align-items: center;
210
- gap: var(--base-size-8);
213
+ gap: calc(var(--base-size-8) + var(--base-size-2));
211
214
  font-family: var(--brand-fontStack-monospace);
212
- font-weight: var(--base-text-weight-medium);
215
+ font-size: var(--brand-text-size-100);
216
+ font-weight: var(--brand-heading-weight-500);
217
+ line-height: var(--brand-text-lineHeight-100);
213
218
  text-transform: uppercase;
214
- letter-spacing: 0.01em;
219
+ letter-spacing: 0.0107em;
215
220
  }
216
221
 
217
222
  .Testimonial--variant-expressive .Testimonial-from::before {
218
223
  content: '';
219
224
  display: inline-block;
220
- width: 9px;
221
- height: 14px;
222
- background-color: var(--testimonial-accent-color, var(--brand-Testimonial-quoteMarkColor-default));
225
+ width: 0.5625rem;
226
+ height: 0.875rem;
227
+ background-color: var(--brand-color-text-emphasized);
223
228
  flex-shrink: 0;
224
229
  }
225
230
 
231
+ .Testimonial--variant-expressive .Testimonial-position {
232
+ font-size: var(--brand-text-size-200);
233
+ font-weight: var(--base-text-weight-normal);
234
+ line-height: 1.6;
235
+ letter-spacing: 0.01em;
236
+ }
237
+
226
238
  .Testimonial--variant-expressive .Testimonial__quoteMark {
227
239
  font-family: var(--brand-fontStack-monospace);
228
240
  font-weight: var(--brand-fontWeight-300);
@@ -238,14 +250,97 @@
238
250
 
239
251
  .Testimonial--variant-expressive .Testimonial-quote {
240
252
  font-family: var(--brand-fontStack-monospace);
241
- line-height: var(--brand-text-lineHeight-400);
242
- font-weight: var(--base-text-weight-normal);
253
+ font-size: 1.5rem;
254
+ font-weight: 425;
255
+ letter-spacing: -0.01em;
256
+ line-height: var(--brand-text-lineHeight-100);
257
+ -webkit-font-smoothing: antialiased;
258
+ -moz-osx-font-smoothing: grayscale;
259
+ }
260
+
261
+ @media screen and (min-width: 48rem) {
262
+ .Testimonial--variant-expressive {
263
+ max-width: 618px;
264
+ margin-inline: auto;
265
+ padding-inline: var(--base-size-36);
266
+ padding-block: var(--base-size-44);
267
+ }
268
+ .Testimonial--variant-expressive .Testimonial-quote {
269
+ font-size: 1.625rem;
270
+ letter-spacing: -0.02em;
271
+ }
272
+ }
273
+
274
+ @media screen and (min-width: 63.25rem) {
275
+ .Testimonial--variant-expressive {
276
+ display: grid;
277
+ grid-template-columns: minmax(0, 744px) 312px;
278
+ -moz-column-gap: calc(var(--base-size-96) + var(--base-size-24));
279
+ column-gap: calc(var(--base-size-96) + var(--base-size-24));
280
+ align-items: end;
281
+ max-width: 1176px;
282
+ margin-inline: auto;
283
+ padding-inline: var(--base-size-48);
284
+ padding-block: var(--base-size-88);
285
+ }
286
+
287
+ .Testimonial--variant-expressive.Testimonial--hasLink {
288
+ row-gap: var(--base-size-48);
289
+ }
290
+
291
+ .Testimonial--variant-expressive .Testimonial__quoteWrapper {
292
+ grid-column: 1;
293
+ grid-row: 1;
294
+ gap: var(--base-size-48);
295
+ }
296
+
297
+ .Testimonial--variant-expressive .Testimonial__media {
298
+ grid-column: 2;
299
+ grid-row: 1;
300
+ width: 312px;
301
+ gap: var(--base-size-32);
302
+ }
303
+
304
+ .Testimonial--variant-expressive.Testimonial--hasLink .Testimonial__media {
305
+ grid-row: 1 / span 2;
306
+ }
307
+
308
+ .Testimonial--variant-expressive .Testimonial-caption {
309
+ padding-block-start: var(--base-size-24);
310
+ }
311
+
312
+ .Testimonial--variant-expressive .Testimonial-quote {
313
+ font-size: var(--base-size-32);
314
+ }
315
+
316
+ .Testimonial--variant-expressive .Testimonial-link {
317
+ grid-column: 1;
318
+ grid-row: 2;
319
+ }
320
+ }
321
+
322
+ @media screen and (min-width: 80rem) {
323
+ .Testimonial--variant-expressive {
324
+ padding-inline: 0;
325
+ }
326
+
327
+ .Testimonial--variant-expressive .Testimonial-avatar {
328
+ width: var(--base-size-48);
329
+ height: var(--base-size-48);
330
+ }
243
331
  }
244
332
 
245
333
  .Testimonial-link {
246
334
  margin-top: var(--base-size-8);
247
335
  }
248
336
 
337
+ .Testimonial--variant-expressive .Testimonial-link {
338
+ align-self: flex-start;
339
+ width: -moz-fit-content;
340
+ width: fit-content;
341
+ margin-top: 0;
342
+ }
343
+
249
344
  .Testimonial__quoteMark--default {
250
345
  --brand-Testimonial-quoteMarkColor: var(--brand-Testimonial-quoteMarkColor-default);
251
346
  --brand-Testimonial-quoteMarkBackground: var(--brand-Testimonial-quoteMarkBackground-default);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@primer/brand-css",
3
- "version": "0.72.1-rc.c5f3a3b5",
3
+ "version": "0.73.0-rc.dc32d936",
4
4
  "description": "CSS stylesheets for Primer Brand components",
5
5
  "keywords": [
6
6
  "primer",