@primer/css 20.6.1-rc.ff703ef2 → 20.6.1

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.
@@ -92,7 +92,7 @@
92
92
  opacity: 1;
93
93
  }
94
94
 
95
- [class*='color-text-'] {
95
+ [class*='color-fg-'] {
96
96
  color: inherit !important;
97
97
  }
98
98
 
@@ -50,7 +50,7 @@
50
50
  @mixin Field {
51
51
  color: var(--color-fg-default);
52
52
  background-color: var(--color-canvas-default);
53
- border: solid var(--primer-borderWidth-thin, 1px) var(--color-border-default);
53
+ border: var(--primer-borderWidth-thin, 1px) solid var(--color-border-default);
54
54
 
55
55
  &[disabled] {
56
56
  color: var(--color-primer-fg-disabled);
@@ -77,7 +77,7 @@
77
77
  }
78
78
 
79
79
  // default focus state
80
- &:focus-visible {
80
+ &:not([type='checkbox']):not([type='radio']):focus-visible {
81
81
  @include focusBoxShadowInset;
82
82
  }
83
83
  }
@@ -520,8 +520,7 @@
520
520
 
521
521
  // these selectors are temporary to override base.scss
522
522
  // once Field styles are widely adopted, we can adjust this and the global base styles
523
- input[type='checkbox'].FormControl-checkbox,
524
- input[type='radio'].FormControl-radio {
523
+ input[type='checkbox'].FormControl-checkbox {
525
524
  @include Field;
526
525
 
527
526
  position: relative;
@@ -531,7 +530,7 @@ input[type='radio'].FormControl-radio {
531
530
  margin: 0;
532
531
  margin-top: 0.125rem; // 2px to center align with label (20px line-height)
533
532
  cursor: pointer;
534
- border: solid var(--primer-borderWidth-thin, 1px) var(--color-border-default);
533
+ border-color: var(--color-neutral-emphasis);
535
534
  border-radius: var(--primer-borderRadius-small, 3px);
536
535
  transition: background-color, border-color 80ms cubic-bezier(0.33, 1, 0.68, 1); // checked -> unchecked - add 120ms delay to fully see animation-out
537
536
  appearance: none;
@@ -604,9 +603,8 @@ input[type='radio'].FormControl-radio {
604
603
  // stylelint-enable primer/colors
605
604
  }
606
605
 
607
- &:focus,
608
606
  &:focus-visible {
609
- outline-offset: 2px;
607
+ @include focusOutline(2px);
610
608
  }
611
609
 
612
610
  &:indeterminate {
@@ -618,31 +616,44 @@ input[type='radio'].FormControl-radio {
618
616
  }
619
617
 
620
618
  input[type='radio'].FormControl-radio {
621
- border-radius: var(--primer-borderRadius-full, 100vh);
619
+ @include Field;
622
620
 
623
- &::before {
624
- clip-path: circle(0%);
625
- mask-image: url('data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMTAiIGhlaWdodD0iMTAiIHZpZXdCb3g9IjAgMCAxMCAxMCIgZmlsbD0ibm9uZSIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIj4KPHBhdGggZD0iTTUgOS4zNzVDNy40MTYyMiA5LjM3NSA5LjM3NSA3LjQxNjIyIDkuMzc1IDVDOS4zNzUgMi41ODM3NiA3LjQxNjIyIDAuNjI1IDUgMC42MjVDMi41ODM3NiAwLjYyNSAwLjYyNSAyLjU4Mzc2IDAuNjI1IDVDMC42MjUgNy40MTYyMiAyLjU4Mzc2IDkuMzc1IDUgOS4zNzVaIiBmaWxsPSJ3aGl0ZSIvPgo8L3N2Zz4K'); // checked circle image
626
- mask-size: 65%;
621
+ position: relative;
622
+ width: var(--base-size-16, 16px);
623
+ height: var(--base-size-16, 16px);
624
+ margin: 0;
625
+ margin-top: 0.125rem; // 2px to center align with label (20px line-height)
626
+ cursor: pointer;
627
+ border-color: var(--color-neutral-emphasis);
628
+ border-radius: var(--primer-borderRadius-full, 100vh);
629
+ transition: background-color, border-color 80ms cubic-bezier(0.33, 1, 0.68, 1); // checked -> unchecked - add 120ms delay to fully see animation-out
630
+ appearance: none;
627
631
 
628
- @media screen and (prefers-reduced-motion: no-preference) {
629
- animation: radioOut 80ms cubic-bezier(0.65, 0, 0.35, 1) forwards; // slightly snappier animation out
630
- }
632
+ &::after {
633
+ @include minTouchTarget(var(--primer-control-medium-size, 32px), var(--primer-control-medium-size, 32px));
631
634
  }
632
635
 
633
636
  &:checked {
634
- &::before {
635
- @media screen and (prefers-reduced-motion: no-preference) {
636
- animation: radioIn 80ms cubic-bezier(0.65, 0, 0.35, 1) forwards 80ms;
637
- }
637
+ border-color: var(--color-accent-fg);
638
+ border-width: var(--base-size-4, 4px);
639
+
640
+ &:disabled {
641
+ cursor: not-allowed;
642
+ border-color: var(--color-primer-fg-disabled);
638
643
  }
639
644
  }
640
645
 
641
- &:indeterminate {
642
- &::before {
643
- visibility: hidden;
644
- }
646
+ &:focus-visible {
647
+ @include focusOutline(2px);
648
+ }
649
+
650
+ // Windows High Contrast mode
651
+ // stylelint-disable primer/colors
652
+ @media (forced-colors: active) {
653
+ background-color: CanvasText;
654
+ border-color: CanvasText;
645
655
  }
656
+ // stylelint-enable primer/colors
646
657
  }
647
658
 
648
659
  @keyframes checkmarkIn {
@@ -664,23 +675,3 @@ input[type='radio'].FormControl-radio {
664
675
  clip-path: inset(var(--base-size-16, 16px) 0 0 0);
665
676
  }
666
677
  }
667
-
668
- @keyframes radioIn {
669
- from {
670
- clip-path: circle(0%);
671
- }
672
-
673
- to {
674
- clip-path: circle(100%);
675
- }
676
- }
677
-
678
- @keyframes radioOut {
679
- from {
680
- clip-path: circle(100%);
681
- }
682
-
683
- to {
684
- clip-path: circle(0%);
685
- }
686
- }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@primer/css",
3
- "version": "20.6.1-rc.ff703ef2",
3
+ "version": "20.6.1",
4
4
  "description": "The CSS implementation of GitHub's Primer Design System",
5
5
  "homepage": "https://primer.style/css",
6
6
  "author": "GitHub, Inc.",