@primer/css 20.6.1-rc.8a4d334f → 20.6.1-rc.d22a9416

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.
@@ -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;
@@ -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,43 @@ 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-radius: var(--primer-borderRadius-full, 100vh);
628
+ transition: background-color, border-color 80ms cubic-bezier(0.33, 1, 0.68, 1); // checked -> unchecked - add 120ms delay to fully see animation-out
629
+ appearance: none;
627
630
 
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
- }
631
+ &::after {
632
+ @include minTouchTarget(var(--primer-control-medium-size, 32px), var(--primer-control-medium-size, 32px));
631
633
  }
632
634
 
633
635
  &: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
- }
636
+ border-color: var(--color-accent-fg);
637
+ border-width: var(--base-size-4, 4px);
638
+
639
+ &:disabled {
640
+ cursor: not-allowed;
641
+ border-color: var(--color-primer-fg-disabled);
638
642
  }
639
643
  }
640
644
 
641
- &:indeterminate {
642
- &::before {
643
- visibility: hidden;
644
- }
645
+ &:focus-visible {
646
+ @include focusOutline(2px);
647
+ }
648
+
649
+ // Windows High Contrast mode
650
+ // stylelint-disable primer/colors
651
+ @media (forced-colors: active) {
652
+ background-color: CanvasText;
653
+ border-color: CanvasText;
645
654
  }
655
+ // stylelint-enable primer/colors
646
656
  }
647
657
 
648
658
  @keyframes checkmarkIn {
@@ -664,23 +674,3 @@ input[type='radio'].FormControl-radio {
664
674
  clip-path: inset(var(--base-size-16, 16px) 0 0 0);
665
675
  }
666
676
  }
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
- }
@@ -14,18 +14,26 @@
14
14
  }
15
15
  }
16
16
 
17
- ol[type='1'] {
18
- list-style-type: decimal;
19
- }
20
-
21
17
  ol[type='a'] {
22
18
  list-style-type: lower-alpha;
23
19
  }
24
20
 
21
+ ol[type='A'] {
22
+ list-style-type: upper-alpha;
23
+ }
24
+
25
25
  ol[type='i'] {
26
26
  list-style-type: lower-roman;
27
27
  }
28
28
 
29
+ ol[type='I'] {
30
+ list-style-type: upper-roman;
31
+ }
32
+
33
+ ol[type='1'] {
34
+ list-style-type: decimal;
35
+ }
36
+
29
37
  // Reset <ol> style to decimal (HTML default) specifically for AsciiDoc
30
38
  // <div><ol> construction (doesn't affect MarkDown)
31
39
  div > ol:not([type]) {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@primer/css",
3
- "version": "20.6.1-rc.8a4d334f",
3
+ "version": "20.6.1-rc.d22a9416",
4
4
  "description": "The CSS implementation of GitHub's Primer Design System",
5
5
  "homepage": "https://primer.style/css",
6
6
  "author": "GitHub, Inc.",