@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.
- package/CHANGELOG.md +166 -1
- package/CONTRIBUTING.md +6 -4
- package/DEVELOP.md +26 -21
- package/README.md +2 -2
- package/actionlist/action-list-item-divider.scss +8 -2
- package/actionlist/action-list-item.scss +213 -129
- package/actionlist/action-list-tree.scss +118 -0
- package/actionlist/action-list.scss +29 -0
- package/actionlist/index.scss +1 -0
- package/alerts/flash.scss +6 -2
- package/autocomplete/autocomplete.scss +58 -1
- package/avatars/avatar-stack.scss +1 -0
- package/base/base.scss +63 -3
- package/base/kbd.scss +0 -1
- package/base/normalize.scss +13 -53
- package/base/typography-base.scss +3 -2
- package/blankslate/blankslate.scss +20 -1
- package/box/box-overlay.scss +2 -0
- package/box/box.scss +0 -3
- package/branch-name/branch-name.scss +1 -0
- package/buttons/button.scss +55 -27
- package/buttons/misc.scss +25 -19
- package/color-modes/index.scss +2 -0
- package/color-modes/native.scss +11 -0
- package/color-modes/themes/dark_tritanopia.scss +6 -0
- package/color-modes/themes/light_tritanopia.scss +6 -0
- package/dist/actionlist.css +1 -1
- package/dist/actionlist.css.map +1 -1
- package/dist/alerts.css +1 -1
- package/dist/alerts.css.map +1 -1
- package/dist/autocomplete.css +1 -1
- package/dist/autocomplete.css.map +1 -1
- package/dist/avatars.css +1 -1
- package/dist/avatars.css.map +1 -1
- package/dist/base.css +1 -1
- package/dist/base.css.map +1 -1
- package/dist/blankslate.css +1 -1
- package/dist/blankslate.css.map +1 -1
- package/dist/box.css.map +1 -1
- package/dist/branch-name.css +1 -1
- package/dist/branch-name.css.map +1 -1
- package/dist/breadcrumb.css.map +1 -1
- package/dist/buttons.css +1 -1
- package/dist/buttons.css.map +1 -1
- package/dist/color-modes.css +1 -1
- package/dist/color-modes.css.map +1 -1
- package/dist/core.css +1 -1
- package/dist/core.css.map +1 -1
- package/dist/dropdown.css +1 -1
- package/dist/dropdown.css.map +1 -1
- package/dist/forms.css +1 -1
- package/dist/forms.css.map +1 -1
- package/dist/header.css.map +1 -1
- package/dist/labels.css +1 -1
- package/dist/labels.css.map +1 -1
- package/dist/layout.css +1 -1
- package/dist/layout.css.map +1 -1
- package/dist/links.css +1 -1
- package/dist/links.css.map +1 -1
- package/dist/loaders.css.map +1 -1
- package/dist/markdown.css +1 -1
- package/dist/markdown.css.map +1 -1
- package/dist/marketing-buttons.css +1 -1
- package/dist/marketing-buttons.css.map +1 -1
- package/dist/marketing-links.css +1 -1
- package/dist/marketing-links.css.map +1 -1
- package/dist/marketing-type.css.map +1 -1
- package/dist/marketing-utilities.css.map +1 -1
- package/dist/marketing.css +1 -1
- package/dist/marketing.css.map +1 -1
- package/dist/meta.json +104 -104
- package/dist/navigation.css +1 -1
- package/dist/navigation.css.map +1 -1
- package/dist/pagination.css +1 -1
- package/dist/pagination.css.map +1 -1
- package/dist/popover.css +1 -1
- package/dist/popover.css.map +1 -1
- package/dist/primer.css +4 -4
- package/dist/primer.css.map +1 -1
- package/dist/product.css +1 -1
- package/dist/product.css.map +1 -1
- package/dist/progress.css.map +1 -1
- package/dist/select-menu.css.map +1 -1
- package/dist/stats/actionlist.json +1 -1
- package/dist/stats/alerts.json +1 -1
- package/dist/stats/autocomplete.json +1 -1
- package/dist/stats/avatars.json +1 -1
- package/dist/stats/base.json +1 -1
- package/dist/stats/blankslate.json +1 -1
- package/dist/stats/branch-name.json +1 -1
- package/dist/stats/buttons.json +1 -1
- package/dist/stats/color-modes.json +1 -1
- package/dist/stats/core.json +1 -1
- package/dist/stats/dropdown.json +1 -1
- package/dist/stats/forms.json +1 -1
- package/dist/stats/labels.json +1 -1
- package/dist/stats/layout.json +1 -1
- package/dist/stats/links.json +1 -1
- package/dist/stats/markdown.json +1 -1
- package/dist/stats/marketing-buttons.json +1 -1
- package/dist/stats/marketing-links.json +1 -1
- package/dist/stats/marketing.json +1 -1
- package/dist/stats/navigation.json +1 -1
- package/dist/stats/pagination.json +1 -1
- package/dist/stats/popover.json +1 -1
- package/dist/stats/primer.json +1 -1
- package/dist/stats/product.json +1 -1
- package/dist/stats/subhead.json +1 -1
- package/dist/stats/toasts.json +1 -1
- package/dist/stats/tooltips.json +1 -1
- package/dist/stats/utilities.json +1 -1
- package/dist/subhead.css +1 -1
- package/dist/subhead.css.map +1 -1
- package/dist/table-object.css.map +1 -1
- package/dist/timeline.css.map +1 -1
- package/dist/toasts.css +1 -1
- package/dist/toasts.css.map +1 -1
- package/dist/tooltips.css +1 -1
- package/dist/tooltips.css.map +1 -1
- package/dist/truncate.css.map +1 -1
- package/dist/utilities.css +1 -1
- package/dist/utilities.css.map +1 -1
- package/dist/variables.json +34 -34
- package/dropdown/dropdown.scss +0 -2
- package/forms/form-control.scss +24 -5
- package/forms/form-group.scss +48 -13
- package/forms/form-validation.scss +15 -6
- package/forms/input-group.scss +18 -0
- package/labels/labels.scss +11 -1
- package/labels/mixins.scss +7 -2
- package/labels/states.scss +2 -2
- package/layout/grid-offset.scss +1 -0
- package/layout/grid.scss +1 -0
- package/layout/index.scss +1 -0
- package/layout/layout.scss +5 -4
- package/layout/mixins.scss +27 -1
- package/layout/page-layout.scss +384 -0
- package/links/link.scss +6 -1
- package/markdown/code.scss +5 -0
- package/markdown/footnotes.scss +38 -26
- package/markdown/headings.scss +22 -0
- package/markdown/images.scss +1 -1
- package/markdown/markdown-body.scss +0 -8
- package/marketing/buttons/button.scss +32 -26
- package/marketing/links/link.scss +5 -5
- package/marketing/type/typography.scss +18 -0
- package/marketing/utilities/layout.scss +1 -0
- package/navigation/filter-list.scss +18 -0
- package/navigation/menu.scss +6 -8
- package/navigation/sidenav.scss +1 -10
- package/navigation/subnav.scss +19 -0
- package/navigation/tabnav.scss +7 -2
- package/navigation/underline-nav.scss +23 -18
- package/package.json +32 -25
- package/pagination/pagination.scss +62 -4
- package/popover/popover.scss +2 -2
- package/select-menu/select-menu.scss +1 -1
- package/subhead/subhead.scss +3 -0
- package/support/mixins/color-modes.scss +2 -0
- package/support/mixins/layout.scss +1 -0
- package/support/mixins/misc.scss +28 -5
- package/support/variables/layout.scss +3 -3
- package/table-object/table-object.scss +3 -0
- package/timeline/timeline-item.scss +2 -1
- package/toasts/toasts.scss +7 -4
- package/tooltips/tooltips.scss +0 -7
- package/utilities/colors.scss +16 -0
- package/utilities/details.scss +81 -4
- package/utilities/layout.scss +1 -1
- package/utilities/margin.scss +4 -1
- package/utilities/padding.scss +3 -1
- package/utilities/visibility-display.scss +52 -3
- 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:
|
|
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:
|
|
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
|
}
|
package/popover/popover.scss
CHANGED
|
@@ -122,7 +122,7 @@
|
|
|
122
122
|
}
|
|
123
123
|
|
|
124
124
|
&::before {
|
|
125
|
-
// stylelint-disable-next-line
|
|
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 -
|
|
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"
|
|
34
|
+
// Adds a dark, semi transparent "cover" underneath the modal. Only visible for xs.
|
|
35
35
|
|
|
36
36
|
.SelectMenu::before {
|
|
37
37
|
position: absolute;
|
package/subhead/subhead.scss
CHANGED
|
@@ -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
|
}
|
package/support/mixins/misc.scss
CHANGED
|
@@ -15,7 +15,8 @@
|
|
|
15
15
|
}
|
|
16
16
|
|
|
17
17
|
&::after {
|
|
18
|
-
|
|
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
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
outline
|
|
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
|
-
//
|
|
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:
|
|
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
|
|
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;
|
package/toasts/toasts.scss
CHANGED
|
@@ -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 {
|
|
123
|
-
|
|
120
|
+
from {
|
|
121
|
+
transform: rotate(0deg);
|
|
122
|
+
}
|
|
123
|
+
|
|
124
|
+
to {
|
|
125
|
+
transform: rotate(360deg);
|
|
126
|
+
}
|
|
124
127
|
}
|
package/tooltips/tooltips.scss
CHANGED
package/utilities/colors.scss
CHANGED
|
@@ -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
|
|
package/utilities/details.scss
CHANGED
|
@@ -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 {
|
|
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 {
|
|
61
|
+
> summary::before {
|
|
62
|
+
display: none;
|
|
63
|
+
}
|
|
26
64
|
// Remove marker added by Chrome
|
|
27
|
-
> summary::-webkit-details-marker {
|
|
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
|
}
|
package/utilities/layout.scss
CHANGED
package/utilities/margin.scss
CHANGED
|
@@ -1,5 +1,8 @@
|
|
|
1
1
|
// Margin spacer utilities
|
|
2
|
-
// stylelint-disable block-opening-brace-space-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 {
|
package/utilities/padding.scss
CHANGED
|
@@ -1,5 +1,7 @@
|
|
|
1
1
|
// Padding spacer utilities
|
|
2
|
-
// stylelint-disable block-opening-brace-space-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 -
|
|
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 -
|
|
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 -
|
|
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
|
|
package/table-object/README.md
DELETED
|
@@ -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) © [GitHub](https://github.com/)
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
[scss]: https://sass-lang.com/documentation/syntax#scss
|