@primer/css 20.0.0-rc.f8eae025 → 20.0.0

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.
Files changed (173) hide show
  1. package/CHANGELOG.md +166 -1
  2. package/CONTRIBUTING.md +6 -4
  3. package/DEVELOP.md +26 -21
  4. package/README.md +2 -2
  5. package/actionlist/action-list-item-divider.scss +8 -2
  6. package/actionlist/action-list-item.scss +213 -129
  7. package/actionlist/action-list-tree.scss +118 -0
  8. package/actionlist/action-list.scss +29 -0
  9. package/actionlist/index.scss +1 -0
  10. package/alerts/flash.scss +6 -2
  11. package/autocomplete/autocomplete.scss +58 -1
  12. package/avatars/avatar-stack.scss +1 -0
  13. package/base/base.scss +63 -3
  14. package/base/kbd.scss +0 -1
  15. package/base/normalize.scss +13 -53
  16. package/base/typography-base.scss +3 -2
  17. package/blankslate/blankslate.scss +20 -1
  18. package/box/box-overlay.scss +2 -0
  19. package/box/box.scss +0 -3
  20. package/branch-name/branch-name.scss +1 -0
  21. package/buttons/button.scss +55 -27
  22. package/buttons/misc.scss +25 -19
  23. package/color-modes/index.scss +2 -0
  24. package/color-modes/native.scss +11 -0
  25. package/color-modes/themes/dark_tritanopia.scss +6 -0
  26. package/color-modes/themes/light_tritanopia.scss +6 -0
  27. package/dist/actionlist.css +1 -1
  28. package/dist/actionlist.css.map +1 -1
  29. package/dist/alerts.css +1 -1
  30. package/dist/alerts.css.map +1 -1
  31. package/dist/autocomplete.css +1 -1
  32. package/dist/autocomplete.css.map +1 -1
  33. package/dist/avatars.css +1 -1
  34. package/dist/avatars.css.map +1 -1
  35. package/dist/base.css +1 -1
  36. package/dist/base.css.map +1 -1
  37. package/dist/blankslate.css +1 -1
  38. package/dist/blankslate.css.map +1 -1
  39. package/dist/box.css.map +1 -1
  40. package/dist/branch-name.css +1 -1
  41. package/dist/branch-name.css.map +1 -1
  42. package/dist/breadcrumb.css.map +1 -1
  43. package/dist/buttons.css +1 -1
  44. package/dist/buttons.css.map +1 -1
  45. package/dist/color-modes.css +1 -1
  46. package/dist/color-modes.css.map +1 -1
  47. package/dist/core.css +1 -1
  48. package/dist/core.css.map +1 -1
  49. package/dist/dropdown.css +1 -1
  50. package/dist/dropdown.css.map +1 -1
  51. package/dist/forms.css +1 -1
  52. package/dist/forms.css.map +1 -1
  53. package/dist/header.css.map +1 -1
  54. package/dist/labels.css +1 -1
  55. package/dist/labels.css.map +1 -1
  56. package/dist/layout.css +1 -1
  57. package/dist/layout.css.map +1 -1
  58. package/dist/links.css +1 -1
  59. package/dist/links.css.map +1 -1
  60. package/dist/loaders.css.map +1 -1
  61. package/dist/markdown.css +1 -1
  62. package/dist/markdown.css.map +1 -1
  63. package/dist/marketing-buttons.css +1 -1
  64. package/dist/marketing-buttons.css.map +1 -1
  65. package/dist/marketing-links.css +1 -1
  66. package/dist/marketing-links.css.map +1 -1
  67. package/dist/marketing-type.css.map +1 -1
  68. package/dist/marketing-utilities.css.map +1 -1
  69. package/dist/marketing.css +1 -1
  70. package/dist/marketing.css.map +1 -1
  71. package/dist/meta.json +104 -104
  72. package/dist/navigation.css +1 -1
  73. package/dist/navigation.css.map +1 -1
  74. package/dist/pagination.css +1 -1
  75. package/dist/pagination.css.map +1 -1
  76. package/dist/popover.css +1 -1
  77. package/dist/popover.css.map +1 -1
  78. package/dist/primer.css +4 -4
  79. package/dist/primer.css.map +1 -1
  80. package/dist/product.css +1 -1
  81. package/dist/product.css.map +1 -1
  82. package/dist/progress.css.map +1 -1
  83. package/dist/select-menu.css.map +1 -1
  84. package/dist/stats/actionlist.json +1 -1
  85. package/dist/stats/alerts.json +1 -1
  86. package/dist/stats/autocomplete.json +1 -1
  87. package/dist/stats/avatars.json +1 -1
  88. package/dist/stats/base.json +1 -1
  89. package/dist/stats/blankslate.json +1 -1
  90. package/dist/stats/branch-name.json +1 -1
  91. package/dist/stats/buttons.json +1 -1
  92. package/dist/stats/color-modes.json +1 -1
  93. package/dist/stats/core.json +1 -1
  94. package/dist/stats/dropdown.json +1 -1
  95. package/dist/stats/forms.json +1 -1
  96. package/dist/stats/labels.json +1 -1
  97. package/dist/stats/layout.json +1 -1
  98. package/dist/stats/links.json +1 -1
  99. package/dist/stats/markdown.json +1 -1
  100. package/dist/stats/marketing-buttons.json +1 -1
  101. package/dist/stats/marketing-links.json +1 -1
  102. package/dist/stats/marketing.json +1 -1
  103. package/dist/stats/navigation.json +1 -1
  104. package/dist/stats/pagination.json +1 -1
  105. package/dist/stats/popover.json +1 -1
  106. package/dist/stats/primer.json +1 -1
  107. package/dist/stats/product.json +1 -1
  108. package/dist/stats/subhead.json +1 -1
  109. package/dist/stats/toasts.json +1 -1
  110. package/dist/stats/tooltips.json +1 -1
  111. package/dist/stats/utilities.json +1 -1
  112. package/dist/subhead.css +1 -1
  113. package/dist/subhead.css.map +1 -1
  114. package/dist/table-object.css.map +1 -1
  115. package/dist/timeline.css.map +1 -1
  116. package/dist/toasts.css +1 -1
  117. package/dist/toasts.css.map +1 -1
  118. package/dist/tooltips.css +1 -1
  119. package/dist/tooltips.css.map +1 -1
  120. package/dist/truncate.css.map +1 -1
  121. package/dist/utilities.css +1 -1
  122. package/dist/utilities.css.map +1 -1
  123. package/dist/variables.json +34 -34
  124. package/dropdown/dropdown.scss +0 -2
  125. package/forms/form-control.scss +24 -5
  126. package/forms/form-group.scss +48 -13
  127. package/forms/form-validation.scss +15 -6
  128. package/forms/input-group.scss +18 -0
  129. package/labels/labels.scss +11 -1
  130. package/labels/mixins.scss +7 -2
  131. package/labels/states.scss +2 -2
  132. package/layout/grid-offset.scss +1 -0
  133. package/layout/grid.scss +1 -0
  134. package/layout/index.scss +1 -0
  135. package/layout/layout.scss +5 -4
  136. package/layout/mixins.scss +27 -1
  137. package/layout/page-layout.scss +384 -0
  138. package/links/link.scss +6 -1
  139. package/markdown/code.scss +5 -0
  140. package/markdown/footnotes.scss +38 -26
  141. package/markdown/headings.scss +22 -0
  142. package/markdown/images.scss +1 -1
  143. package/markdown/markdown-body.scss +0 -8
  144. package/marketing/buttons/button.scss +32 -26
  145. package/marketing/links/link.scss +5 -5
  146. package/marketing/type/typography.scss +18 -0
  147. package/marketing/utilities/layout.scss +1 -0
  148. package/navigation/filter-list.scss +18 -0
  149. package/navigation/menu.scss +6 -8
  150. package/navigation/sidenav.scss +1 -10
  151. package/navigation/subnav.scss +19 -0
  152. package/navigation/tabnav.scss +7 -2
  153. package/navigation/underline-nav.scss +23 -18
  154. package/package.json +32 -25
  155. package/pagination/pagination.scss +62 -4
  156. package/popover/popover.scss +2 -2
  157. package/select-menu/select-menu.scss +1 -1
  158. package/subhead/subhead.scss +3 -0
  159. package/support/mixins/color-modes.scss +2 -0
  160. package/support/mixins/layout.scss +1 -0
  161. package/support/mixins/misc.scss +28 -5
  162. package/support/variables/layout.scss +3 -3
  163. package/table-object/table-object.scss +3 -0
  164. package/timeline/timeline-item.scss +2 -1
  165. package/toasts/toasts.scss +7 -4
  166. package/tooltips/tooltips.scss +0 -7
  167. package/utilities/colors.scss +16 -0
  168. package/utilities/details.scss +81 -4
  169. package/utilities/layout.scss +1 -1
  170. package/utilities/margin.scss +4 -1
  171. package/utilities/padding.scss +3 -1
  172. package/utilities/visibility-display.scss +52 -3
  173. package/table-object/README.md +0 -25
@@ -4,7 +4,6 @@
4
4
  a,
5
5
  span,
6
6
  em {
7
- display: inline-block;
8
7
  min-width: 32px;
9
8
  // stylelint-disable-next-line primer/spacing
10
9
  padding: 5px 10px;
@@ -25,7 +24,6 @@
25
24
  &:focus {
26
25
  text-decoration: none;
27
26
  border-color: var(--color-border-default);
28
- outline: 0;
29
27
  transition-duration: 0.1s;
30
28
  }
31
29
 
@@ -75,13 +73,73 @@
75
73
  // chevron-left
76
74
  .previous_page::before {
77
75
  margin-right: $spacer-1;
78
- clip-path: polygon(9.8px 12.8px, 8.7px 12.8px, 4.5px 8.5px, 4.5px 7.5px, 8.7px 3.2px, 9.8px 4.3px, 6.1px 8px, 9.8px 11.7px, 9.8px 12.8px);
76
+ clip-path:
77
+ polygon(
78
+ 9.8px 12.8px,
79
+ 8.7px 12.8px,
80
+ 4.5px 8.5px,
81
+ 4.5px 7.5px,
82
+ 8.7px 3.2px,
83
+ 9.8px 4.3px,
84
+ 6.1px 8px,
85
+ 9.8px 11.7px,
86
+ 9.8px 12.8px
87
+ );
79
88
  }
80
89
 
81
90
  // chevron-right
82
91
  .next_page::after {
83
92
  margin-left: $spacer-1;
84
- clip-path: polygon(6.2px 3.2px, 7.3px 3.2px, 11.5px 7.5px, 11.5px 8.5px, 7.3px 12.8px, 6.2px 11.7px, 9.9px 8px, 6.2px 4.3px, 6.2px 3.2px);
93
+ clip-path:
94
+ polygon(
95
+ 6.2px 3.2px,
96
+ 7.3px 3.2px,
97
+ 11.5px 7.5px,
98
+ 11.5px 8.5px,
99
+ 7.3px 12.8px,
100
+ 6.2px 11.7px,
101
+ 9.9px 8px,
102
+ 6.2px 4.3px,
103
+ 6.2px 3.2px
104
+ );
105
+ }
106
+ }
107
+
108
+ // Responsive
109
+
110
+ // Hide everything by default
111
+ > * {
112
+ display: none;
113
+ }
114
+
115
+ // 0 -> sm
116
+ // Only show [Previous] [Next]
117
+
118
+ > :first-child,
119
+ > :last-child,
120
+ > .previous_page,
121
+ > .next_page {
122
+ display: inline-block;
123
+ }
124
+
125
+ // sm -> md
126
+ // Also show [first] [last] [current number] and [...]
127
+
128
+ @include breakpoint(sm) {
129
+ > :nth-child(2),
130
+ > :nth-last-child(2),
131
+ > .current,
132
+ > .gap {
133
+ display: inline-block;
134
+ }
135
+ }
136
+
137
+ // md -> or more
138
+ // Show everything
139
+
140
+ @include breakpoint(md) {
141
+ > * {
142
+ display: inline-block;
85
143
  }
86
144
  }
87
145
  }
@@ -122,7 +122,7 @@
122
122
  }
123
123
 
124
124
  &::before {
125
- // stylelint-disable-next-line primer/spacing
125
+ // stylelint-disable-next-line function-no-unknown
126
126
  margin-top: -($spacer-2 + 1);
127
127
  }
128
128
 
@@ -196,7 +196,7 @@
196
196
  // Responsive Popover
197
197
  // For < md it will show full-width anchored to the bottom
198
198
 
199
- @media (max-width: ($width-md - 1px)) {
199
+ @media (max-width: ($width-md - 0.02px)) {
200
200
  .Popover {
201
201
  position: fixed;
202
202
  top: auto !important;
@@ -31,7 +31,7 @@ $SelectMenu-max-height: 480px !default;
31
31
 
32
32
  // Backdrop
33
33
  //
34
- // Adds a dark, semi transparent "cover" underneat the modal. Only visible for xs.
34
+ // Adds a dark, semi transparent "cover" underneath the modal. Only visible for xs.
35
35
 
36
36
  .SelectMenu::before {
37
37
  position: absolute;
@@ -18,6 +18,7 @@
18
18
  font-size: $h2-size;
19
19
  font-weight: $font-weight-normal;
20
20
  flex: 1 1 auto;
21
+ order: 0;
21
22
  }
22
23
 
23
24
  // Make the text bold and red for dangerous content
@@ -31,6 +32,7 @@
31
32
  font-size: $body-font-size;
32
33
  color: var(--color-fg-muted);
33
34
  flex: 1 100%;
35
+ order: 2;
34
36
  }
35
37
 
36
38
  // Add 1 or 2 buttons to the right of the heading
@@ -38,6 +40,7 @@
38
40
  margin: $spacer-1 0 $spacer-1 $spacer-1;
39
41
  align-self: center;
40
42
  justify-content: flex-end;
43
+ order: 1;
41
44
 
42
45
  + .Subhead-description {
43
46
  margin-top: $spacer-1;
@@ -84,10 +84,12 @@
84
84
  @each $name, $value in $color-map {
85
85
  @each $type, $color in $value {
86
86
  @if $type == dark {
87
+ // stylelint-disable-next-line function-no-unknown
87
88
  $dark-colors: append($dark-colors, (--color-#{$name}, #{$color}));
88
89
  }
89
90
 
90
91
  @else {
92
+ // stylelint-disable-next-line function-no-unknown
91
93
  $light-colors: append($light-colors, (--color-#{$name}, #{$color}));
92
94
  }
93
95
  }
@@ -7,6 +7,7 @@
7
7
 
8
8
  @else {
9
9
  // Retrieves the value from the key
10
+ // stylelint-disable-next-line function-no-unknown
10
11
  $value: map-get($breakpoints, $breakpoint);
11
12
 
12
13
  // If the key exists in the map
@@ -15,7 +15,8 @@
15
15
  }
16
16
 
17
17
  &::after {
18
- margin-left: 1px;
18
+ // stylelint-disable-next-line primer/spacing
19
+ margin-left: 2px;
19
20
  background-color: var(--color-canvas-default);
20
21
  background-image: linear-gradient($background, $background);
21
22
  }
@@ -27,10 +28,32 @@
27
28
 
28
29
  // global focus styles
29
30
 
30
- @mixin focusOutline {
31
- z-index: 1;
32
- outline: 2px solid var(--color-accent-fg);
33
- outline-offset: 2px;
31
+ // inset box-shadow for form controls
32
+ @mixin focusBoxShadowInset($outlineWidth: 1px, $outlineColor: var(--color-accent-fg)) {
33
+ border-color: var(--color-accent-fg);
34
+ outline: none;
35
+ box-shadow: inset 0 0 0 $outlineWidth $outlineColor;
36
+ }
37
+
38
+ // box-shadow for :target styles (no inset)
39
+ // !important to override PCSS utilities
40
+ @mixin targetBoxShadow($outlineWidth: 2px, $outlineColor: var(--color-accent-fg)) {
41
+ outline: none !important;
42
+ box-shadow: 0 0 0 $outlineWidth $outlineColor !important;
43
+ }
44
+
45
+ // outline
46
+ @mixin focusOutline($outlineOffset: -2px, $outlineColor: var(--color-accent-fg)) {
47
+ outline: 2px solid $outlineColor;
48
+ outline-offset: $outlineOffset;
49
+ box-shadow: none;
50
+ }
51
+
52
+ // outline with fg box-shadow for buttons
53
+ @mixin focusOutlineOnEmphasis($outlineOffset: -2px, $outlineColor: var(--color-accent-fg)) {
54
+ outline: 2px solid $outlineColor;
55
+ outline-offset: $outlineOffset;
56
+ box-shadow: inset 0 0 0 3px var(--color-fg-on-emphasis);
34
57
  }
35
58
 
36
59
  // if min-width is undefined, return only min-height
@@ -82,6 +82,7 @@ $spacers-large: (
82
82
  12: $spacer-12,
83
83
  ) !default;
84
84
 
85
+ // stylelint-disable-next-line function-no-unknown
85
86
  $spacer-map-extended: map-merge(
86
87
  (
87
88
  0: 0,
@@ -157,7 +158,7 @@ $responsive-variants: (
157
158
  xl: '-xl',
158
159
  ) !default;
159
160
 
160
- // responive utility position values
161
+ // responsive utility position values
161
162
  $responsive-positions: (
162
163
  static,
163
164
  relative,
@@ -178,9 +179,8 @@ $sidebar-narrow-width: (
178
179
  ) !default;
179
180
 
180
181
  $sidebar-wide-width: (
181
- md: 296px,
182
182
  lg: 320px,
183
- xl: 344px
183
+ xl: 336px
184
184
  ) !default;
185
185
 
186
186
  $gutter: (
@@ -1,3 +1,6 @@
1
+ // Deprecated
2
+ // TODO: Replace TableObject with flexbox or a new Table component
3
+
1
4
  // TableObject is a module for creating dynamically resizable elements that
2
5
  // always sit on the same horizontal line (e.g., they never wrap). Using
3
6
  // tables means it's cross browser friendly.
@@ -57,6 +57,7 @@
57
57
 
58
58
  .TimelineItem-avatar {
59
59
  position: absolute;
60
+ // stylelint-disable-next-line function-no-unknown
60
61
  left: -($spacer-6 + $spacer-5);
61
62
  z-index: 1;
62
63
  }
@@ -67,7 +68,7 @@
67
68
  height: $spacer-4;
68
69
  margin: 0;
69
70
  margin-bottom: -$spacer-3;
70
- // stylelint-disable-next-line primer/spacing
71
+ // stylelint-disable-next-line function-no-unknown
71
72
  margin-left: -($spacer-6 + $spacer-3);
72
73
  background-color: var(--color-canvas-default);
73
74
  border: 0;
@@ -40,9 +40,7 @@
40
40
  background-color: transparent;
41
41
  border: 0;
42
42
 
43
- &:focus,
44
43
  &:hover {
45
- outline: none;
46
44
  opacity: 0.7;
47
45
  }
48
46
 
@@ -119,6 +117,11 @@
119
117
  }
120
118
 
121
119
  @keyframes Toast--spinner {
122
- from { transform: rotate(0deg); }
123
- to { transform: rotate(360deg); }
120
+ from {
121
+ transform: rotate(0deg);
122
+ }
123
+
124
+ to {
125
+ transform: rotate(360deg);
126
+ }
124
127
  }
@@ -264,13 +264,6 @@
264
264
  }
265
265
  }
266
266
 
267
- @media screen and (min-width: 0\0) {
268
- // IE11
269
- .tooltipped-multiline::after {
270
- width: $tooltip-max-width;
271
- }
272
- }
273
-
274
267
  // Sticky tooltips
275
268
  //
276
269
  // Always show the tooltip.
@@ -11,6 +11,8 @@
11
11
  .color-fg-attention { color: var(--color-attention-fg) !important; }
12
12
  .color-fg-severe { color: var(--color-severe-fg) !important; }
13
13
  .color-fg-danger { color: var(--color-danger-fg) !important; }
14
+ .color-fg-open { color: var(--color-open-fg) !important; }
15
+ .color-fg-closed { color: var(--color-closed-fg) !important; }
14
16
  .color-fg-done { color: var(--color-done-fg) !important; }
15
17
  .color-fg-sponsors { color: var(--color-sponsors-fg) !important; }
16
18
 
@@ -39,12 +41,20 @@
39
41
  .color-bg-danger { background-color: var(--color-danger-subtle) !important; }
40
42
  .color-bg-danger-emphasis { background-color: var(--color-danger-emphasis) !important; }
41
43
 
44
+ .color-bg-open { background-color: var(--color-open-subtle) !important; }
45
+ .color-bg-open-emphasis { background-color: var(--color-open-emphasis) !important; }
46
+
47
+ .color-bg-closed { background-color: var(--color-closed-subtle) !important; }
48
+ .color-bg-closed-emphasis { background-color: var(--color-closed-emphasis) !important; }
49
+
42
50
  .color-bg-done { background-color: var(--color-done-subtle) !important; }
43
51
  .color-bg-done-emphasis { background-color: var(--color-done-emphasis) !important; }
44
52
 
45
53
  .color-bg-sponsors { background-color: var(--color-sponsors-subtle) !important; }
46
54
  .color-bg-sponsors-emphasis { background-color: var(--color-sponsors-emphasis) !important; }
47
55
 
56
+ .color-bg-transparent { background-color: transparent !important; }
57
+
48
58
  // Border
49
59
 
50
60
  .color-border-default { border-color: var(--color-border-default) !important; }
@@ -66,6 +76,12 @@
66
76
  .color-border-danger { border-color: var(--color-danger-muted) !important; }
67
77
  .color-border-danger-emphasis { border-color: var(--color-danger-emphasis) !important; }
68
78
 
79
+ .color-border-open { border-color: var(--color-open-muted) !important; }
80
+ .color-border-open-emphasis { border-color: var(--color-open-emphasis) !important; }
81
+
82
+ .color-border-closed { border-color: var(--color-closed-muted) !important; }
83
+ .color-border-closed-emphasis { border-color: var(--color-closed-emphasis) !important; }
84
+
69
85
  .color-border-done { border-color: var(--color-done-muted) !important; }
70
86
  .color-border-done-emphasis { border-color: var(--color-done-emphasis) !important; }
71
87
 
@@ -1,4 +1,4 @@
1
- // stylelint-disable selector-max-type
1
+ // stylelint-disable selector-max-type, selector-max-specificity, max-nesting-depth, selector-no-qualifying-type
2
2
 
3
3
  .details-overlay[open] > summary::before {
4
4
  position: fixed;
@@ -20,9 +20,86 @@
20
20
 
21
21
  .details-reset {
22
22
  // Remove marker added by the display: list-item browser default
23
- > summary { list-style: none; }
23
+ > summary {
24
+ list-style: none;
25
+ transition: 80ms cubic-bezier(0.33, 1, 0.68, 1);
26
+ transition-property: color, background-color, box-shadow, border-color;
27
+ // fallback :focus state
28
+ &:focus {
29
+ @include focusOutline;
30
+
31
+ // remove fallback :focus if :focus-visible is supported
32
+ &:not(:focus-visible) {
33
+ outline: solid 1px transparent;
34
+ }
35
+ }
36
+
37
+ // default focus state
38
+ &:focus-visible {
39
+ @include focusOutline;
40
+ }
41
+
42
+ &.btn-primary {
43
+ // fallback :focus state
44
+ &:focus {
45
+ @include focusOutlineOnEmphasis;
46
+
47
+ // remove fallback :focus if :focus-visible is supported
48
+ &:not(:focus-visible) {
49
+ outline: solid 1px transparent;
50
+ box-shadow: none;
51
+ }
52
+ }
53
+
54
+ // default focus state
55
+ &:focus-visible {
56
+ @include focusOutlineOnEmphasis;
57
+ }
58
+ }
59
+ }
24
60
  // Remove marker added by details polyfill
25
- > summary::before { display: none; }
61
+ > summary::before {
62
+ display: none;
63
+ }
26
64
  // Remove marker added by Chrome
27
- > summary::-webkit-details-marker { display: none; }
65
+ > summary::-webkit-details-marker {
66
+ display: none;
67
+ }
68
+ }
69
+
70
+ .details-overlay > summary {
71
+ transition: 80ms cubic-bezier(0.33, 1, 0.68, 1);
72
+ transition-property: color, background-color, box-shadow, border-color;
73
+ // fallback :focus state
74
+ &:focus {
75
+ @include focusOutline;
76
+
77
+ // remove fallback :focus if :focus-visible is supported
78
+ &:not(:focus-visible) {
79
+ outline: solid 1px transparent;
80
+ }
81
+ }
82
+
83
+ // default focus state
84
+ &:focus-visible {
85
+ @include focusOutline;
86
+ }
87
+
88
+ &.btn-primary {
89
+ // fallback :focus state
90
+ &:focus {
91
+ @include focusOutlineOnEmphasis;
92
+
93
+ // remove fallback :focus if :focus-visible is supported
94
+ &:not(:focus-visible) {
95
+ outline: solid 1px transparent;
96
+ box-shadow: none;
97
+ }
98
+ }
99
+
100
+ // default focus state
101
+ &:focus-visible {
102
+ @include focusOutlineOnEmphasis;
103
+ }
104
+ }
28
105
  }
@@ -85,7 +85,7 @@
85
85
  @each $breakpoint, $variant in $responsive-variants {
86
86
  @include breakpoint($breakpoint) {
87
87
 
88
- // Auto varients
88
+ // Auto variants
89
89
  .width#{$variant}-auto { width: auto !important; }
90
90
 
91
91
  /* Set the direction to rtl */
@@ -1,5 +1,8 @@
1
1
  // Margin spacer utilities
2
- // stylelint-disable block-opening-brace-space-before, declaration-colon-space-before, comment-empty-line-before
2
+ // stylelint-disable block-opening-brace-space-before
3
+ // stylelint-disable declaration-colon-space-before
4
+ // stylelint-disable comment-empty-line-before
5
+ // stylelint-disable primer/spacing
3
6
 
4
7
  // Loop through the breakpoint values
5
8
  @each $breakpoint, $variant in $responsive-variants {
@@ -1,5 +1,7 @@
1
1
  // Padding spacer utilities
2
- // stylelint-disable block-opening-brace-space-before, comment-empty-line-before
2
+ // stylelint-disable block-opening-brace-space-before
3
+ // stylelint-disable comment-empty-line-before
4
+ // stylelint-disable primer/spacing
3
5
 
4
6
  // Responsive padding spacer utilities
5
7
  @each $breakpoint, $variant in $responsive-variants {
@@ -14,19 +14,19 @@
14
14
 
15
15
  // Hide utilities for each breakpoint
16
16
  // Each hide utility only applies to one breakpoint range.
17
- @media (max-width: $width-sm - 1px) {
17
+ @media (max-width: $width-sm - 0.02px) {
18
18
  .hide-sm {
19
19
  display: none !important;
20
20
  }
21
21
  }
22
22
 
23
- @media (min-width: $width-sm) and (max-width: $width-md - 1px) {
23
+ @media (min-width: $width-sm) and (max-width: $width-md - 0.02px) {
24
24
  .hide-md {
25
25
  display: none !important;
26
26
  }
27
27
  }
28
28
 
29
- @media (min-width: $width-md) and (max-width: $width-lg - 1px) {
29
+ @media (min-width: $width-md) and (max-width: $width-lg - 0.02px) {
30
30
  .hide-lg {
31
31
  display: none !important;
32
32
  }
@@ -38,6 +38,55 @@
38
38
  }
39
39
  }
40
40
 
41
+ // Show/Hide Viewport range utilities
42
+
43
+ .show-whenNarrow,
44
+ .show-whenRegular,
45
+ .show-whenWide,
46
+ .show-whenRegular.hide-whenWide {
47
+ display: none !important;
48
+ }
49
+
50
+ .hide-whenNarrow,
51
+ .hide-whenRegular,
52
+ .hide-whenWide {
53
+ display: block !important;
54
+ }
55
+
56
+ @media (max-width: $width-md - 0.02px) {
57
+ .show-whenNarrow {
58
+ display: block !important;
59
+ }
60
+
61
+ .hide-whenNarrow {
62
+ display: none !important;
63
+ }
64
+ }
65
+
66
+ @media (min-width: $width-md) {
67
+ .show-whenRegular,
68
+ .show-whenRegular.hide-whenWide {
69
+ display: block !important;
70
+ }
71
+
72
+ .hide-whenRegular {
73
+ display: none !important;
74
+ }
75
+ }
76
+
77
+ // The width of a `wide` viewport range may change as we're finalizing
78
+ // the Primer primitives viewport ranges proposal
79
+ @media (min-width: $width-xl) {
80
+ .show-whenWide {
81
+ display: block !important;
82
+ }
83
+
84
+ .hide-whenWide,
85
+ .show-whenRegular.hide-whenWide {
86
+ display: none !important;
87
+ }
88
+ }
89
+
41
90
  /* Set the table-layout to fixed */
42
91
  .table-fixed { table-layout: fixed !important; }
43
92
 
@@ -1,25 +0,0 @@
1
- ---
2
- bundle: "table-object"
3
- generated: true
4
- ---
5
-
6
- # Primer CSS: `table-object` bundle
7
-
8
- ## Usage
9
-
10
- Primer CSS source files are written in [SCSS]. To include this Primer CSS module in your own build, ensure that your `node_modules` directory is listed in your Sass include paths, then import it with:
11
-
12
- ```scss
13
- @import "@primer/css/table-object/index.scss";
14
- ```
15
-
16
- ## Build
17
-
18
- The `@primer/css` npm package includes a standalone CSS build of this module in `dist/table-object.css`.
19
-
20
- ## License
21
-
22
- [MIT](https://github.com/primer/css/blob/main/LICENSE) &copy; [GitHub](https://github.com/)
23
-
24
-
25
- [scss]: https://sass-lang.com/documentation/syntax#scss