@primer/brand-css 0.72.0 → 0.72.1-rc.c3699332

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(--base-size-32) var(--base-size-20);
10
9
  display: grid;
11
10
  grid-template-columns: 1fr 1fr;
12
11
  grid-template-areas:
@@ -25,6 +24,12 @@
25
24
  border-radius: var(--brand-borderRadius-medium);
26
25
  }
27
26
 
27
+ @media screen and (min-width: 64rem) {
28
+ .Card {
29
+ padding-inline: var(--base-size-32);
30
+ }
31
+ }
32
+
28
33
  .Card--align-center .Card {
29
34
  text-align: center;
30
35
  padding: var(--base-size-64) var(--base-size-40);
@@ -244,10 +249,6 @@
244
249
  ); /* This value is adjusted so that, when combined with the container's border radius, the total border radius equals `var(--brand-borderRadius-medium)` */
245
250
  }
246
251
 
247
- .Card:not(.Card--disableAnimation):hover {
248
- transform: scale3d(1.025, 1.025, 1);
249
- }
250
-
251
252
  .Card__image {
252
253
  margin-block-end: var(--base-size-28);
253
254
  border-radius: var(--brand-borderRadius-medium);
@@ -338,9 +339,9 @@
338
339
  .Card__actionLabel {
339
340
  display: block;
340
341
  min-inline-size: 0;
341
- overflow: hidden;
342
- text-overflow: ellipsis;
343
- white-space: nowrap;
342
+ overflow: visible;
343
+ text-overflow: clip;
344
+ white-space: normal;
344
345
  }
345
346
 
346
347
  .Card:not(.Card--ctaVariant-arrow) .Card__action {
@@ -364,20 +365,7 @@
364
365
  }
365
366
 
366
367
  .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;
368
+ display: contents;
381
369
  }
382
370
 
383
371
  .Card--tokensPosition-block-end .Card__action {
@@ -393,19 +381,16 @@
393
381
  min-inline-size: 0;
394
382
  max-inline-size: calc(100% - var(--Card-arrowAction-endInset));
395
383
  justify-content: flex-start;
396
- -moz-column-gap: 0;
397
- column-gap: 0;
384
+ -moz-column-gap: var(--base-size-8);
385
+ column-gap: var(--base-size-8);
398
386
  padding-block: var(--base-size-4);
399
- padding-inline: 0;
400
- border: var(--brand-borderWidth-thin) solid transparent;
387
+ padding-inline-start: var(--base-size-12);
388
+ padding-inline-end: var(--base-size-4);
389
+ border: var(--brand-borderWidth-thin) solid var(--brand-color-border-default);
401
390
  border-radius: var(--brand-borderRadius-full);
402
- background-color: transparent;
391
+ background-color: var(--brand-Card-background-overlay);
403
392
  flex-shrink: 0;
404
393
  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
394
  }
410
395
 
411
396
  .Card__actionIcon--arrowOnly {
@@ -483,15 +468,51 @@
483
468
  margin-bottom: var(--base-size-12);
484
469
  }
485
470
 
486
- .Card--ctaVariant-arrow:not(.Card--disableAnimation):hover {
487
- transform: none;
488
- }
489
-
490
471
  .Card--ctaVariant-arrow .Card__action {
491
472
  min-inline-size: 0;
492
473
  justify-self: start;
493
474
  }
494
475
 
476
+ @media (hover: hover) {
477
+ .Card__action--arrowOnly {
478
+ -moz-column-gap: 0;
479
+ column-gap: 0;
480
+ padding-inline: 0;
481
+ border-color: transparent;
482
+ background-color: transparent;
483
+ transition: border-color var(--actionArrow-duration) ease-out, background-color var(--actionArrow-duration) ease-out,
484
+ column-gap var(--actionArrow-duration) ease-out, padding-inline var(--actionArrow-duration) ease-out;
485
+ transition: border-color var(--actionArrow-duration) ease-out, background-color var(--actionArrow-duration) ease-out,
486
+ column-gap var(--actionArrow-duration) ease-out, padding-inline var(--actionArrow-duration) ease-out, -moz-column-gap var(--actionArrow-duration) ease-out;
487
+ }
488
+
489
+ .Card__actionLabelClip {
490
+ --actionLabelClip-duration: 400ms;
491
+
492
+ display: inline-flex;
493
+ flex: 1 1 auto;
494
+ align-items: center;
495
+ align-self: stretch;
496
+ min-inline-size: 0;
497
+ overflow: hidden;
498
+ max-inline-size: 0;
499
+ background-color: transparent;
500
+ opacity: 0;
501
+ transform: translateX(calc(var(--base-size-12) * -1));
502
+ margin-inline: 0;
503
+ padding-inline: 0;
504
+ transition: max-inline-size var(--actionLabelClip-duration) var(--brand-Card-animation-easing),
505
+ opacity var(--actionLabelClip-duration) ease-out, transform var(--actionLabelClip-duration) ease-out,
506
+ margin-inline var(--actionLabelClip-duration) ease-out, padding-inline var(--actionLabelClip-duration) ease-out;
507
+ }
508
+
509
+ .Card--ctaVariant-arrow .Card__actionLabel {
510
+ overflow: hidden;
511
+ text-overflow: ellipsis;
512
+ white-space: nowrap;
513
+ }
514
+ }
515
+
495
516
  .Card--align-center .Card--ctaVariant-arrow .Card__action {
496
517
  justify-self: center;
497
518
  }
@@ -523,6 +544,12 @@
523
544
  stroke-dashoffset: 20;
524
545
  }
525
546
 
547
+ .Card--disableAnimation,
548
+ .Card--disableAnimation * {
549
+ animation: none;
550
+ transition: none;
551
+ }
552
+
526
553
  /* Remove all animations, transitions and smooth scroll for people that prefer not to see them */
527
554
  @media (prefers-reduced-motion: reduce) {
528
555
  .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.c3699332",
4
4
  "description": "CSS stylesheets for Primer Brand components",
5
5
  "keywords": [
6
6
  "primer",