@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
|
@@ -235,15 +235,20 @@ dl.form-group > dd, // TODO: Deprecate
|
|
|
235
235
|
}
|
|
236
236
|
|
|
237
237
|
&.focused {
|
|
238
|
+
border-color: var(--color-accent-fg);
|
|
238
239
|
border-radius: $border-radius;
|
|
239
|
-
|
|
240
|
+
outline: none;
|
|
241
|
+
// stylelint-disable-next-line primer/box-shadow
|
|
242
|
+
box-shadow: 0 0 0 2px var(--color-accent-fg);
|
|
240
243
|
|
|
241
244
|
.form-control {
|
|
245
|
+
border-color: transparent;
|
|
246
|
+
border-bottom-color: var(--color-accent-fg);
|
|
242
247
|
box-shadow: none;
|
|
243
248
|
}
|
|
244
249
|
|
|
245
250
|
.drag-and-drop {
|
|
246
|
-
border-color:
|
|
251
|
+
border-color: transparent;
|
|
247
252
|
}
|
|
248
253
|
}
|
|
249
254
|
}
|
|
@@ -272,7 +277,9 @@ dl.form-group > dd, // TODO: Deprecate
|
|
|
272
277
|
border: $border-width $border-style var(--color-border-default);
|
|
273
278
|
}
|
|
274
279
|
|
|
275
|
-
.comment-form-error {
|
|
280
|
+
.comment-form-error {
|
|
281
|
+
margin-bottom: $spacer-2;
|
|
282
|
+
}
|
|
276
283
|
|
|
277
284
|
.write-content,
|
|
278
285
|
.preview-content {
|
|
@@ -295,7 +302,7 @@ dl.form-group > dd, // TODO: Deprecate
|
|
|
295
302
|
}
|
|
296
303
|
}
|
|
297
304
|
|
|
298
|
-
// Used in our boxed-group-less form styles. Give the
|
|
305
|
+
// Used in our boxed-group-less form styles. Give the submit button enough space
|
|
299
306
|
// to breathe without the need for the extra hr.
|
|
300
307
|
.form-action-spacious {
|
|
301
308
|
// stylelint-disable-next-line primer/spacing
|
|
@@ -317,8 +324,10 @@ div.composer {
|
|
|
317
324
|
min-height: 200px;
|
|
318
325
|
}
|
|
319
326
|
|
|
320
|
-
|
|
321
|
-
|
|
327
|
+
.composer .tabnav {
|
|
328
|
+
// stylelint-disable-next-line primer/spacing
|
|
329
|
+
margin: 0 0 10px;
|
|
330
|
+
}
|
|
322
331
|
|
|
323
332
|
// Misc CSS
|
|
324
333
|
//
|
package/forms/input-group.scss
CHANGED
|
@@ -18,6 +18,20 @@
|
|
|
18
18
|
&.inline {
|
|
19
19
|
display: inline-table;
|
|
20
20
|
}
|
|
21
|
+
|
|
22
|
+
// within input group, if button exists change focus styles to match input (no offset)
|
|
23
|
+
&:focus-within {
|
|
24
|
+
// stylelint-disable-next-line selector-max-type
|
|
25
|
+
button {
|
|
26
|
+
outline-offset: 0;
|
|
27
|
+
}
|
|
28
|
+
}
|
|
29
|
+
|
|
30
|
+
// Autocomplete with embedded icon
|
|
31
|
+
.form-control.autocomplete-embedded-icon-wrap {
|
|
32
|
+
display: inline-flex;
|
|
33
|
+
padding: $spacer-1 * 1.25 $spacer-2;
|
|
34
|
+
}
|
|
21
35
|
}
|
|
22
36
|
|
|
23
37
|
.input-group .form-control,
|
|
@@ -30,6 +44,10 @@
|
|
|
30
44
|
vertical-align: middle; // Match the inputs
|
|
31
45
|
}
|
|
32
46
|
|
|
47
|
+
.input-group-button--autocomplete-embedded-icon {
|
|
48
|
+
vertical-align: bottom;
|
|
49
|
+
}
|
|
50
|
+
|
|
33
51
|
.input-group .form-control:first-child,
|
|
34
52
|
.input-group-button:first-child .btn {
|
|
35
53
|
border-top-right-radius: 0;
|
package/labels/labels.scss
CHANGED
|
@@ -7,7 +7,7 @@
|
|
|
7
7
|
|
|
8
8
|
// Default label
|
|
9
9
|
|
|
10
|
-
.label, // TODO:
|
|
10
|
+
.label, // TODO: Deprecate
|
|
11
11
|
.Label {
|
|
12
12
|
@include labels-base;
|
|
13
13
|
|
|
@@ -71,6 +71,16 @@
|
|
|
71
71
|
border-color: var(--color-danger-emphasis);
|
|
72
72
|
}
|
|
73
73
|
|
|
74
|
+
.Label--open {
|
|
75
|
+
color: var(--color-open-fg);
|
|
76
|
+
border-color: var(--color-open-emphasis);
|
|
77
|
+
}
|
|
78
|
+
|
|
79
|
+
.Label--closed {
|
|
80
|
+
color: var(--color-closed-fg);
|
|
81
|
+
border-color: var(--color-closed-emphasis);
|
|
82
|
+
}
|
|
83
|
+
|
|
74
84
|
.Label--done {
|
|
75
85
|
color: var(--color-done-fg);
|
|
76
86
|
border-color: var(--color-done-emphasis);
|
package/labels/mixins.scss
CHANGED
|
@@ -6,16 +6,20 @@
|
|
|
6
6
|
|
|
7
7
|
@mixin labels-base {
|
|
8
8
|
display: inline-block;
|
|
9
|
+
// stylelint-disable-next-line primer/spacing
|
|
9
10
|
padding: 0 7px;
|
|
10
11
|
font-size: $font-size-small;
|
|
11
12
|
font-weight: $font-weight-semibold;
|
|
12
13
|
line-height: 18px;
|
|
14
|
+
white-space: nowrap;
|
|
13
15
|
border: $border-width $border-style transparent;
|
|
14
16
|
border-radius: 2em;
|
|
15
17
|
}
|
|
16
18
|
|
|
17
19
|
@mixin labels-large {
|
|
20
|
+
// stylelint-disable-next-line primer/spacing
|
|
18
21
|
padding-right: 10px;
|
|
22
|
+
// stylelint-disable-next-line primer/spacing
|
|
19
23
|
padding-left: 10px;
|
|
20
24
|
line-height: 22px;
|
|
21
25
|
}
|
|
@@ -27,6 +31,7 @@
|
|
|
27
31
|
|
|
28
32
|
@mixin labels--inline {
|
|
29
33
|
display: inline;
|
|
30
|
-
|
|
31
|
-
|
|
34
|
+
// stylelint-disable-next-line primer/spacing
|
|
35
|
+
padding: 0.12em $em-spacer-5;
|
|
36
|
+
font-size: 85%;
|
|
32
37
|
}
|
package/labels/states.scss
CHANGED
|
@@ -28,7 +28,7 @@
|
|
|
28
28
|
|
|
29
29
|
.State--open {
|
|
30
30
|
color: var(--color-fg-on-emphasis);
|
|
31
|
-
background-color: var(--color-
|
|
31
|
+
background-color: var(--color-open-emphasis);
|
|
32
32
|
}
|
|
33
33
|
|
|
34
34
|
.State--merged {
|
|
@@ -38,7 +38,7 @@
|
|
|
38
38
|
|
|
39
39
|
.State--closed {
|
|
40
40
|
color: var(--color-fg-on-emphasis);
|
|
41
|
-
background-color: var(--color-
|
|
41
|
+
background-color: var(--color-closed-emphasis);
|
|
42
42
|
}
|
|
43
43
|
|
|
44
44
|
// Small
|
package/layout/grid-offset.scss
CHANGED
package/layout/grid.scss
CHANGED
package/layout/index.scss
CHANGED
package/layout/layout.scss
CHANGED
|
@@ -6,18 +6,18 @@
|
|
|
6
6
|
--Layout-sidebar-width: #{map-get($sidebar-width, 'sm')};
|
|
7
7
|
--Layout-gutter: 16px;
|
|
8
8
|
|
|
9
|
-
@media (max-width: calc(#{$width-sm} -
|
|
9
|
+
@media (max-width: calc(#{$width-sm} - 0.02px)) {
|
|
10
10
|
@include flow-as-row;
|
|
11
11
|
}
|
|
12
12
|
|
|
13
13
|
&.Layout--flowRow-until-md {
|
|
14
|
-
@media (max-width: calc(#{$width-md} -
|
|
14
|
+
@media (max-width: calc(#{$width-md} - 0.02px)) {
|
|
15
15
|
@include flow-as-row;
|
|
16
16
|
}
|
|
17
17
|
}
|
|
18
18
|
|
|
19
19
|
&.Layout--flowRow-until-lg {
|
|
20
|
-
@media (max-width: calc(#{$width-lg} -
|
|
20
|
+
@media (max-width: calc(#{$width-lg} - 0.02px)) {
|
|
21
21
|
@include flow-as-row;
|
|
22
22
|
}
|
|
23
23
|
}
|
|
@@ -47,7 +47,8 @@
|
|
|
47
47
|
}
|
|
48
48
|
|
|
49
49
|
&.Layout--gutter-none {
|
|
50
|
-
|
|
50
|
+
// stylelint-disable-next-line length-zero-no-unit
|
|
51
|
+
--Layout-gutter: 0px;
|
|
51
52
|
}
|
|
52
53
|
|
|
53
54
|
&.Layout--gutter-condensed {
|
package/layout/mixins.scss
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
// Layout mixins
|
|
1
|
+
// Layout alpha mixins
|
|
2
2
|
|
|
3
3
|
@mixin flow-as-row {
|
|
4
4
|
grid-auto-flow: row;
|
|
@@ -77,3 +77,29 @@
|
|
|
77
77
|
}
|
|
78
78
|
}
|
|
79
79
|
}
|
|
80
|
+
|
|
81
|
+
// Layout beta mixins
|
|
82
|
+
|
|
83
|
+
// responsive region dividers
|
|
84
|
+
|
|
85
|
+
@mixin Layout-line-divider {
|
|
86
|
+
position: absolute;
|
|
87
|
+
left: calc(var(--Layout-outer-spacing-x) * -1);
|
|
88
|
+
display: block;
|
|
89
|
+
width: calc(100% + (var(--Layout-outer-spacing-x) * 2));
|
|
90
|
+
height: 1px;
|
|
91
|
+
content: '';
|
|
92
|
+
background-color: $Layout-divider-color;
|
|
93
|
+
}
|
|
94
|
+
|
|
95
|
+
@mixin Layout-filled-divider {
|
|
96
|
+
position: absolute;
|
|
97
|
+
bottom: calc(#{$spacer-2} * -1); // -8px
|
|
98
|
+
left: calc(var(--Layout-outer-spacing-x) * -1);
|
|
99
|
+
display: block;
|
|
100
|
+
width: calc(100% + (var(--Layout-outer-spacing-x) * 2));
|
|
101
|
+
height: #{$spacer-2}; // 8px
|
|
102
|
+
content: '';
|
|
103
|
+
background-color: var(--color-canvas-inset);
|
|
104
|
+
box-shadow: inset 0 1px $Layout-divider-color, inset 0 -1px $Layout-divider-color;
|
|
105
|
+
}
|
|
@@ -0,0 +1,384 @@
|
|
|
1
|
+
// stylelint-disable max-nesting-depth
|
|
2
|
+
// stylelint-disable selector-max-specificity
|
|
3
|
+
// stylelint-disable no-duplicate-selectors
|
|
4
|
+
|
|
5
|
+
$Layout-divider-color: var(--color-border-default) !default;
|
|
6
|
+
$Layout-responsive-variant-max-breakpoint: 'md' !default;
|
|
7
|
+
|
|
8
|
+
:root {
|
|
9
|
+
--Layout-pane-width: #{map-get($sidebar-width, 'sm')};
|
|
10
|
+
--Layout-content-width: 100%;
|
|
11
|
+
--Layout-template-columns: 1fr var(--Layout-pane-width);
|
|
12
|
+
--Layout-template-areas: 'content pane';
|
|
13
|
+
--Layout-column-gap: #{$spacer-3};
|
|
14
|
+
--Layout-row-gap: #{$spacer-3};
|
|
15
|
+
|
|
16
|
+
// the `px` unit is mandatory for `calc()` execution. See https://stackoverflow.com/a/32518348
|
|
17
|
+
// stylelint-disable length-zero-no-unit
|
|
18
|
+
--Layout-outer-spacing-x: 0px; // wrapper margin x
|
|
19
|
+
--Layout-outer-spacing-y: 0px; // wrapper margin y
|
|
20
|
+
--Layout-inner-spacing-min: 0px; // default region padding
|
|
21
|
+
--Layout-inner-spacing-max: 0px; // relaxed content horizontal padding
|
|
22
|
+
// stylelint-enable length-zero-no-unit
|
|
23
|
+
}
|
|
24
|
+
|
|
25
|
+
.PageLayout {
|
|
26
|
+
display: block;
|
|
27
|
+
// stylelint-disable-next-line primer/spacing
|
|
28
|
+
margin: var(--Layout-outer-spacing-y) var(--Layout-outer-spacing-x);
|
|
29
|
+
|
|
30
|
+
// multi-column desktop-friendly layout
|
|
31
|
+
|
|
32
|
+
@include breakpoint($Layout-responsive-variant-max-breakpoint) {
|
|
33
|
+
|
|
34
|
+
// Set a `content` region width, to work with loading states when
|
|
35
|
+
// `pane` is not yet loaded. See https://github.com/primer/css/pull/1818
|
|
36
|
+
$Layout-content-full-width: minmax(0, calc(100% - var(--Layout-pane-width) - var(--Layout-column-gap)));
|
|
37
|
+
|
|
38
|
+
&.PageLayout--panePos-start {
|
|
39
|
+
--Layout-template-columns: var(--Layout-pane-width) #{$Layout-content-full-width};
|
|
40
|
+
--Layout-template-areas: 'pane content';
|
|
41
|
+
}
|
|
42
|
+
|
|
43
|
+
&.PageLayout--panePos-end {
|
|
44
|
+
--Layout-template-columns: #{$Layout-content-full-width} var(--Layout-pane-width);
|
|
45
|
+
--Layout-template-areas: 'content pane';
|
|
46
|
+
}
|
|
47
|
+
|
|
48
|
+
// header divider
|
|
49
|
+
|
|
50
|
+
.PageLayout-header--hasDivider {
|
|
51
|
+
// stylelint-disable-next-line primer/spacing
|
|
52
|
+
padding-bottom: max(var(--Layout-row-gap), var(--Layout-inner-spacing-min));
|
|
53
|
+
// stylelint-disable-next-line primer/borders
|
|
54
|
+
border-bottom: $border-width solid $Layout-divider-color;
|
|
55
|
+
}
|
|
56
|
+
|
|
57
|
+
// footer divider
|
|
58
|
+
|
|
59
|
+
.PageLayout-footer--hasDivider {
|
|
60
|
+
// stylelint-disable-next-line primer/spacing
|
|
61
|
+
padding-top: max(var(--Layout-row-gap), var(--Layout-inner-spacing-min));
|
|
62
|
+
// stylelint-disable-next-line primer/borders
|
|
63
|
+
border-top: $border-width solid $Layout-divider-color;
|
|
64
|
+
}
|
|
65
|
+
|
|
66
|
+
// pane divider
|
|
67
|
+
|
|
68
|
+
&.PageLayout--hasPaneDivider {
|
|
69
|
+
&.PageLayout--panePos-start {
|
|
70
|
+
.PageLayout-pane {
|
|
71
|
+
// stylelint-disable-next-line primer/borders
|
|
72
|
+
border-right: $border-width solid $Layout-divider-color;
|
|
73
|
+
}
|
|
74
|
+
|
|
75
|
+
&:not(.PageLayout--columnGap-none) {
|
|
76
|
+
.PageLayout-pane {
|
|
77
|
+
// stylelint-disable-next-line primer/spacing
|
|
78
|
+
padding-right: calc(var(--Layout-column-gap) - #{$border-width});
|
|
79
|
+
// stylelint-disable-next-line primer/spacing
|
|
80
|
+
margin-right: calc(var(--Layout-column-gap) * -1);
|
|
81
|
+
}
|
|
82
|
+
|
|
83
|
+
.PageLayout-content {
|
|
84
|
+
// stylelint-disable-next-line primer/spacing
|
|
85
|
+
margin-left: var(--Layout-column-gap);
|
|
86
|
+
}
|
|
87
|
+
}
|
|
88
|
+
}
|
|
89
|
+
|
|
90
|
+
&.PageLayout--panePos-end {
|
|
91
|
+
.PageLayout-pane {
|
|
92
|
+
// stylelint-disable-next-line primer/borders
|
|
93
|
+
border-left: $border-width solid $Layout-divider-color;
|
|
94
|
+
}
|
|
95
|
+
|
|
96
|
+
&:not(.PageLayout--columnGap-none) {
|
|
97
|
+
.PageLayout-pane {
|
|
98
|
+
// stylelint-disable-next-line primer/spacing
|
|
99
|
+
padding-left: calc(var(--Layout-column-gap) - #{$border-width});
|
|
100
|
+
// stylelint-disable-next-line primer/spacing
|
|
101
|
+
margin-left: calc(var(--Layout-column-gap) * -1);
|
|
102
|
+
}
|
|
103
|
+
|
|
104
|
+
.PageLayout-content {
|
|
105
|
+
// stylelint-disable-next-line primer/spacing
|
|
106
|
+
margin-right: var(--Layout-column-gap);
|
|
107
|
+
}
|
|
108
|
+
}
|
|
109
|
+
}
|
|
110
|
+
}
|
|
111
|
+
|
|
112
|
+
// sticky pane
|
|
113
|
+
|
|
114
|
+
&.PageLayout--isPaneSticky {
|
|
115
|
+
.PageLayout-pane {
|
|
116
|
+
position: sticky;
|
|
117
|
+
top: 0;
|
|
118
|
+
max-height: 100vh;
|
|
119
|
+
overflow: auto;
|
|
120
|
+
}
|
|
121
|
+
}
|
|
122
|
+
|
|
123
|
+
// content width
|
|
124
|
+
|
|
125
|
+
[class^='PageLayout-content-centered-'] {
|
|
126
|
+
max-width: calc(var(--Layout-content-width) + var(--Layout-pane-width) + var(--Layout-column-gap));
|
|
127
|
+
margin-right: auto;
|
|
128
|
+
margin-left: auto;
|
|
129
|
+
}
|
|
130
|
+
|
|
131
|
+
&.PageLayout--hasPaneDivider {
|
|
132
|
+
[class^='PageLayout-content-centered-'] {
|
|
133
|
+
max-width: calc(var(--Layout-content-width) + var(--Layout-pane-width) + (var(--Layout-column-gap) * 2));
|
|
134
|
+
}
|
|
135
|
+
}
|
|
136
|
+
|
|
137
|
+
&.PageLayout--panePos-start {
|
|
138
|
+
[class^='PageLayout-content-centered-'] > [class^='container-'] {
|
|
139
|
+
margin-left: 0;
|
|
140
|
+
}
|
|
141
|
+
}
|
|
142
|
+
|
|
143
|
+
&.PageLayout--panePos-end {
|
|
144
|
+
[class^='PageLayout-content-centered-'] > [class^='container-'] {
|
|
145
|
+
margin-right: 0;
|
|
146
|
+
}
|
|
147
|
+
}
|
|
148
|
+
|
|
149
|
+
@each $breakpoint in map-keys($breakpoints) {
|
|
150
|
+
.PageLayout-content-centered-#{$breakpoint} {
|
|
151
|
+
--Layout-content-width: #{map-get($breakpoints, $breakpoint)};
|
|
152
|
+
}
|
|
153
|
+
}
|
|
154
|
+
|
|
155
|
+
// pane width
|
|
156
|
+
|
|
157
|
+
@each $breakpoint in map-keys($sidebar-width) {
|
|
158
|
+
@include breakpoint($breakpoint) {
|
|
159
|
+
--Layout-pane-width: #{map-get($sidebar-width, $breakpoint)};
|
|
160
|
+
}
|
|
161
|
+
}
|
|
162
|
+
|
|
163
|
+
&.PageLayout--paneWidth-narrow {
|
|
164
|
+
@each $breakpoint in map-keys($sidebar-narrow-width) {
|
|
165
|
+
@include breakpoint($breakpoint) {
|
|
166
|
+
--Layout-pane-width: #{map-get($sidebar-narrow-width, $breakpoint)};
|
|
167
|
+
}
|
|
168
|
+
}
|
|
169
|
+
}
|
|
170
|
+
|
|
171
|
+
&.PageLayout--paneWidth-wide {
|
|
172
|
+
@each $breakpoint in map-keys($sidebar-wide-width) {
|
|
173
|
+
@include breakpoint($breakpoint) {
|
|
174
|
+
--Layout-pane-width: #{map-get($sidebar-wide-width, $breakpoint)};
|
|
175
|
+
}
|
|
176
|
+
}
|
|
177
|
+
}
|
|
178
|
+
}
|
|
179
|
+
|
|
180
|
+
// responsive behaviors on narrow viewports
|
|
181
|
+
|
|
182
|
+
@media (max-width: #{map-get($breakpoints, $Layout-responsive-variant-max-breakpoint) - 0.02px}) {
|
|
183
|
+
|
|
184
|
+
// variant: stackRegions
|
|
185
|
+
|
|
186
|
+
&.PageLayout--responsive-stackRegions {
|
|
187
|
+
--Layout-template-columns: 1fr;
|
|
188
|
+
|
|
189
|
+
// responsive-panePos: end (default)
|
|
190
|
+
--Layout-template-areas: 'content' 'pane';
|
|
191
|
+
|
|
192
|
+
// responsive-panePos: start
|
|
193
|
+
&.PageLayout--responsive-panePos-start {
|
|
194
|
+
--Layout-template-areas: 'pane' 'content';
|
|
195
|
+
}
|
|
196
|
+
}
|
|
197
|
+
|
|
198
|
+
// variant: separateRegions
|
|
199
|
+
|
|
200
|
+
&.PageLayout--responsive-separateRegions {
|
|
201
|
+
--Layout-template-columns: 1fr;
|
|
202
|
+
--Layout-template-areas: 'content';
|
|
203
|
+
|
|
204
|
+
&.PageLayout--responsive-primary-content {
|
|
205
|
+
--Layout-template-areas: 'content';
|
|
206
|
+
|
|
207
|
+
.PageLayout-pane {
|
|
208
|
+
display: none;
|
|
209
|
+
}
|
|
210
|
+
}
|
|
211
|
+
|
|
212
|
+
&.PageLayout--responsive-primary-pane {
|
|
213
|
+
--Layout-template-areas: 'pane';
|
|
214
|
+
|
|
215
|
+
.PageLayout-content {
|
|
216
|
+
display: none;
|
|
217
|
+
}
|
|
218
|
+
}
|
|
219
|
+
}
|
|
220
|
+
|
|
221
|
+
// region dividers on narrow viewports
|
|
222
|
+
|
|
223
|
+
.PageLayout-region--dividerNarrow-line-before {
|
|
224
|
+
position: relative;
|
|
225
|
+
// stylelint-disable-next-line primer/spacing
|
|
226
|
+
margin-top: var(--Layout-row-gap);
|
|
227
|
+
|
|
228
|
+
&::before {
|
|
229
|
+
@include Layout-line-divider;
|
|
230
|
+
|
|
231
|
+
top: calc(#{$border-width * -1} - var(--Layout-row-gap));
|
|
232
|
+
}
|
|
233
|
+
}
|
|
234
|
+
|
|
235
|
+
.PageLayout-region--dividerNarrow-line-after {
|
|
236
|
+
position: relative;
|
|
237
|
+
// stylelint-disable-next-line primer/spacing
|
|
238
|
+
margin-bottom: var(--Layout-row-gap);
|
|
239
|
+
|
|
240
|
+
&::after {
|
|
241
|
+
@include Layout-line-divider;
|
|
242
|
+
|
|
243
|
+
bottom: calc(#{$border-width * -1} - var(--Layout-row-gap));
|
|
244
|
+
}
|
|
245
|
+
}
|
|
246
|
+
|
|
247
|
+
.PageLayout-region--dividerNarrow-filled-before {
|
|
248
|
+
position: relative;
|
|
249
|
+
// stylelint-disable-next-line primer/spacing
|
|
250
|
+
margin-top: calc(#{$spacer-2} + var(--Layout-row-gap));
|
|
251
|
+
|
|
252
|
+
&::after {
|
|
253
|
+
@include Layout-filled-divider;
|
|
254
|
+
|
|
255
|
+
top: calc(#{$spacer-2 * -1} - var(--Layout-row-gap));
|
|
256
|
+
}
|
|
257
|
+
}
|
|
258
|
+
|
|
259
|
+
.PageLayout-region--dividerNarrow-filled-after {
|
|
260
|
+
position: relative;
|
|
261
|
+
// stylelint-disable-next-line primer/spacing
|
|
262
|
+
margin-bottom: calc(#{$spacer-2} + var(--Layout-row-gap));
|
|
263
|
+
|
|
264
|
+
&::before {
|
|
265
|
+
@include Layout-filled-divider;
|
|
266
|
+
|
|
267
|
+
bottom: calc(#{$spacer-2 * -1} - var(--Layout-row-gap));
|
|
268
|
+
}
|
|
269
|
+
}
|
|
270
|
+
}
|
|
271
|
+
}
|
|
272
|
+
|
|
273
|
+
// PageLayout-wrapper bundles header, footer, pane, and content regions
|
|
274
|
+
.PageLayout-wrapper {
|
|
275
|
+
display: grid;
|
|
276
|
+
grid: auto-flow / 1fr;
|
|
277
|
+
row-gap: var(--Layout-row-gap);
|
|
278
|
+
}
|
|
279
|
+
|
|
280
|
+
// PageLayout-columns wrap pane and content regions
|
|
281
|
+
// If layout has no pane, PageLayout-columns is not present
|
|
282
|
+
.PageLayout-columns {
|
|
283
|
+
display: grid;
|
|
284
|
+
column-gap: var(--Layout-column-gap);
|
|
285
|
+
row-gap: var(--Layout-row-gap);
|
|
286
|
+
grid-template-columns: var(--Layout-template-columns);
|
|
287
|
+
grid-template-rows: 1fr;
|
|
288
|
+
grid-template-areas: var(--Layout-template-areas);
|
|
289
|
+
|
|
290
|
+
.PageLayout-content {
|
|
291
|
+
// stylelint-disable-next-line primer/spacing
|
|
292
|
+
padding-right: var(--Layout-inner-spacing-max);
|
|
293
|
+
// stylelint-disable-next-line primer/spacing
|
|
294
|
+
padding-left: var(--Layout-inner-spacing-max);
|
|
295
|
+
grid-area: content;
|
|
296
|
+
}
|
|
297
|
+
|
|
298
|
+
.PageLayout-pane {
|
|
299
|
+
grid-area: pane;
|
|
300
|
+
}
|
|
301
|
+
}
|
|
302
|
+
|
|
303
|
+
// outer spacing
|
|
304
|
+
|
|
305
|
+
.PageLayout--outerSpacing-normal {
|
|
306
|
+
--Layout-outer-spacing-x: #{$spacer-3};
|
|
307
|
+
--Layout-outer-spacing-y: #{$spacer-3};
|
|
308
|
+
|
|
309
|
+
@include breakpoint(lg) {
|
|
310
|
+
--Layout-outer-spacing-x: #{$spacer-4};
|
|
311
|
+
--Layout-outer-spacing-y: #{$spacer-4};
|
|
312
|
+
}
|
|
313
|
+
}
|
|
314
|
+
|
|
315
|
+
.PageLayout--outerSpacing-condensed {
|
|
316
|
+
--Layout-outer-spacing-x: #{$spacer-3};
|
|
317
|
+
--Layout-outer-spacing-y: #{$spacer-3};
|
|
318
|
+
}
|
|
319
|
+
|
|
320
|
+
// inner spacing
|
|
321
|
+
|
|
322
|
+
.PageLayout--innerSpacing-normal {
|
|
323
|
+
--Layout-inner-spacing-min: #{$spacer-3};
|
|
324
|
+
--Layout-inner-spacing-max: #{$spacer-3};
|
|
325
|
+
|
|
326
|
+
@include breakpoint(lg) {
|
|
327
|
+
--Layout-inner-spacing-max: #{$spacer-4};
|
|
328
|
+
}
|
|
329
|
+
}
|
|
330
|
+
|
|
331
|
+
.PageLayout--innerSpacing-condensed {
|
|
332
|
+
--Layout-inner-spacing-min: #{$spacer-3};
|
|
333
|
+
--Layout-inner-spacing-max: #{$spacer-3};
|
|
334
|
+
}
|
|
335
|
+
|
|
336
|
+
// column gap
|
|
337
|
+
|
|
338
|
+
.PageLayout--columnGap-normal {
|
|
339
|
+
--Layout-column-gap: #{$spacer-3};
|
|
340
|
+
|
|
341
|
+
@include breakpoint(lg) {
|
|
342
|
+
--Layout-column-gap: #{$spacer-4};
|
|
343
|
+
}
|
|
344
|
+
}
|
|
345
|
+
|
|
346
|
+
.PageLayout--columnGap-condensed {
|
|
347
|
+
--Layout-column-gap: #{$spacer-3};
|
|
348
|
+
}
|
|
349
|
+
|
|
350
|
+
.PageLayout--columnGap-none {
|
|
351
|
+
// the `px` unit is mandatory for `calc()` execution. See https://stackoverflow.com/a/32518348
|
|
352
|
+
// stylelint-disable-next-line length-zero-no-unit
|
|
353
|
+
--Layout-column-gap: 0px;
|
|
354
|
+
}
|
|
355
|
+
|
|
356
|
+
// row gap
|
|
357
|
+
|
|
358
|
+
.PageLayout--rowGap-normal {
|
|
359
|
+
--Layout-row-gap: #{$spacer-3};
|
|
360
|
+
|
|
361
|
+
@include breakpoint(lg) {
|
|
362
|
+
--Layout-row-gap: #{$spacer-4};
|
|
363
|
+
}
|
|
364
|
+
}
|
|
365
|
+
|
|
366
|
+
.PageLayout--rowGap-none {
|
|
367
|
+
// the `px` unit is mandatory for `calc()` execution. See https://stackoverflow.com/a/32518348
|
|
368
|
+
// stylelint-disable length-zero-no-unit
|
|
369
|
+
--Layout-row-gap: 0px;
|
|
370
|
+
}
|
|
371
|
+
|
|
372
|
+
.PageLayout--rowGap-condensed {
|
|
373
|
+
--Layout-row-gap: #{$spacer-3};
|
|
374
|
+
}
|
|
375
|
+
|
|
376
|
+
// regions
|
|
377
|
+
|
|
378
|
+
.PageLayout-header,
|
|
379
|
+
.PageLayout-content,
|
|
380
|
+
.PageLayout-pane,
|
|
381
|
+
.PageLayout-footer {
|
|
382
|
+
// stylelint-disable-next-line primer/spacing
|
|
383
|
+
padding: var(--Layout-inner-spacing-min);
|
|
384
|
+
}
|
package/links/link.scss
CHANGED
|
@@ -7,6 +7,11 @@
|
|
|
7
7
|
text-decoration: underline;
|
|
8
8
|
cursor: pointer;
|
|
9
9
|
}
|
|
10
|
+
|
|
11
|
+
&:focus,
|
|
12
|
+
&:focus-visible {
|
|
13
|
+
outline-offset: 0;
|
|
14
|
+
}
|
|
10
15
|
}
|
|
11
16
|
|
|
12
17
|
.Link--primary {
|
|
@@ -49,7 +54,7 @@
|
|
|
49
54
|
.Link--secondary,
|
|
50
55
|
.Link--primary,
|
|
51
56
|
.Link--muted {
|
|
52
|
-
&:hover [class*='color-
|
|
57
|
+
&:hover [class*='color-fg'] {
|
|
53
58
|
color: inherit !important;
|
|
54
59
|
}
|
|
55
60
|
}
|