@primer/brand-css 0.72.0 → 0.72.1-rc.8a8dc720

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,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@primer/brand-css",
3
- "version": "0.72.0",
3
+ "version": "0.72.1-rc.8a8dc720",
4
4
  "description": "CSS stylesheets for Primer Brand components",
5
5
  "keywords": [
6
6
  "primer",