@primer/css 0.0.0-20220120184157 → 0.0.0-2022020193741
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 +6 -41
- package/actionlist/action-list-item.scss +49 -102
- package/actionlist/index.scss +0 -1
- package/autocomplete/autocomplete.scss +1 -1
- package/avatars/avatar-stack.scss +0 -1
- package/base/base.scss +0 -1
- package/base/index.scss +1 -0
- package/blankslate/index.scss +1 -0
- package/breadcrumb/breadcrumb.scss +1 -1
- package/buttons/button-group.scss +2 -3
- package/buttons/button.scss +35 -0
- package/buttons/misc.scss +7 -6
- package/color-modes/native.scss +0 -1
- package/color-modes/themes/dark.scss +1 -0
- package/color-modes/themes/dark_colorblind.scss +1 -0
- package/color-modes/themes/dark_dimmed.scss +1 -0
- package/color-modes/themes/dark_high_contrast.scss +1 -0
- package/color-modes/themes/light.scss +1 -0
- package/color-modes/themes/light_colorblind.scss +1 -0
- package/color-modes/themes/light_high_contrast.scss +1 -0
- package/core/index.scss +1 -5
- package/dist/actionlist.css +1 -1
- package/dist/actionlist.css.map +1 -1
- package/dist/alerts.css.map +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.map +1 -1
- package/dist/blankslate.css.map +1 -1
- package/dist/box.css.map +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.map +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.map +1 -1
- package/dist/loaders.css.map +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-type.css.map +1 -1
- package/dist/marketing-utilities.css +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 +84 -95
- package/dist/navigation.css.map +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/avatars.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/labels.json +1 -1
- package/dist/stats/layout.json +1 -1
- package/dist/stats/marketing-buttons.json +1 -1
- package/dist/stats/marketing-utilities.json +1 -1
- package/dist/stats/marketing.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/utilities.json +1 -1
- package/dist/subhead.css.map +1 -1
- package/dist/timeline.css.map +1 -1
- package/dist/toasts.css.map +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/forms/form-control.scss +0 -2
- package/labels/counters.scss +1 -1
- package/labels/index.scss +1 -0
- package/labels/labels.scss +0 -1
- package/layout/index.scss +1 -1
- package/layout/layout.scss +10 -6
- package/layout/mixins.scss +4 -30
- package/markdown/images.scss +2 -2
- package/marketing/buttons/button.scss +0 -8
- package/marketing/index.scss +0 -1
- package/marketing/type/typography.scss +0 -3
- package/marketing/utilities/animations.scss +0 -42
- package/navigation/filter-list.scss +2 -2
- package/navigation/menu.scss +2 -2
- package/navigation/sidenav.scss +2 -2
- package/navigation/subnav.scss +2 -2
- package/navigation/tabnav.scss +2 -2
- package/navigation/underline-nav.scss +2 -2
- package/package.json +13 -12
- package/pagination/pagination.scss +3 -3
- package/popover/popover.scss +1 -1
- package/select-menu/select-menu.scss +2 -2
- package/stylelint.config.cjs +11 -2
- package/support/mixins/color-modes.scss +0 -3
- package/support/mixins/misc.scss +13 -4
- package/support/mixins/typography.scss +2 -3
- package/support/variables/layout.scss +2 -1
- package/utilities/visibility-display.scss +3 -3
- package/actionlist/action-list-tree.scss +0 -92
- package/button-refactor/ButtonsLinksAPI.md +0 -111
- package/button-refactor/button-group.scss +0 -0
- package/button-refactor/button.scss +0 -245
- package/button-refactor/icon-button.scss +0 -14
- package/button-refactor/link-styled-as-button.scss +0 -75
- package/button-refactor/link.scss +0 -25
- package/dist/marketing-links.css +0 -2
- package/dist/marketing-links.css.map +0 -1
- package/dist/marketing-links.js +0 -1
- package/dist/stats/marketing-links.json +0 -1
- package/layout/page-layout.scss +0 -380
- package/marketing/links/index.scss +0 -3
- package/marketing/links/link.scss +0 -50
package/labels/index.scss
CHANGED
package/labels/labels.scss
CHANGED
package/layout/index.scss
CHANGED
package/layout/layout.scss
CHANGED
|
@@ -2,22 +2,21 @@
|
|
|
2
2
|
|
|
3
3
|
.Layout {
|
|
4
4
|
display: grid;
|
|
5
|
-
|
|
6
5
|
--Layout-sidebar-width: #{map-get($sidebar-width, 'sm')};
|
|
7
6
|
--Layout-gutter: 16px;
|
|
8
7
|
|
|
9
|
-
@media (max-width: calc(#{$width-sm} -
|
|
8
|
+
@media (max-width: calc(#{$width-sm} - 1px)) {
|
|
10
9
|
@include flow-as-row;
|
|
11
10
|
}
|
|
12
11
|
|
|
13
12
|
&.Layout--flowRow-until-md {
|
|
14
|
-
@media (max-width: calc(#{$width-md} -
|
|
13
|
+
@media (max-width: calc(#{$width-md} - 1px)) {
|
|
15
14
|
@include flow-as-row;
|
|
16
15
|
}
|
|
17
16
|
}
|
|
18
17
|
|
|
19
18
|
&.Layout--flowRow-until-lg {
|
|
20
|
-
@media (max-width: calc(#{$width-lg} -
|
|
19
|
+
@media (max-width: calc(#{$width-lg} - 1px)) {
|
|
21
20
|
@include flow-as-row;
|
|
22
21
|
}
|
|
23
22
|
}
|
|
@@ -25,7 +24,8 @@
|
|
|
25
24
|
// Flow as column
|
|
26
25
|
|
|
27
26
|
grid-auto-flow: column;
|
|
28
|
-
grid-template-columns: auto 0
|
|
27
|
+
grid-template-columns: auto 0 1fr; // sidebar column, separator, main column
|
|
28
|
+
// stylelint-disable-next-line primer/no-undefined-vars
|
|
29
29
|
grid-gap: var(--Layout-gutter);
|
|
30
30
|
|
|
31
31
|
.Layout-sidebar {
|
|
@@ -101,7 +101,7 @@
|
|
|
101
101
|
}
|
|
102
102
|
|
|
103
103
|
&.Layout--sidebarPosition-end {
|
|
104
|
-
grid-template-columns:
|
|
104
|
+
grid-template-columns: 1fr 0 auto;
|
|
105
105
|
|
|
106
106
|
.Layout-main {
|
|
107
107
|
grid-column: 1;
|
|
@@ -146,6 +146,7 @@
|
|
|
146
146
|
}
|
|
147
147
|
|
|
148
148
|
.Layout-sidebar {
|
|
149
|
+
// stylelint-disable-next-line primer/no-undefined-vars
|
|
149
150
|
width: var(--Layout-sidebar-width);
|
|
150
151
|
}
|
|
151
152
|
|
|
@@ -168,14 +169,17 @@
|
|
|
168
169
|
}
|
|
169
170
|
|
|
170
171
|
.Layout-main-centered-md {
|
|
172
|
+
// stylelint-disable-next-line primer/no-undefined-vars
|
|
171
173
|
max-width: calc(#{$container-md} + var(--Layout-sidebar-width) + var(--Layout-gutter));
|
|
172
174
|
}
|
|
173
175
|
|
|
174
176
|
.Layout-main-centered-lg {
|
|
177
|
+
// stylelint-disable-next-line primer/no-undefined-vars
|
|
175
178
|
max-width: calc(#{$container-lg} + var(--Layout-sidebar-width) + var(--Layout-gutter));
|
|
176
179
|
}
|
|
177
180
|
|
|
178
181
|
.Layout-main-centered-xl {
|
|
182
|
+
// stylelint-disable-next-line primer/no-undefined-vars
|
|
179
183
|
max-width: calc(#{$container-xl} + var(--Layout-sidebar-width) + var(--Layout-gutter));
|
|
180
184
|
}
|
|
181
185
|
}
|
package/layout/mixins.scss
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
// Layout
|
|
1
|
+
// Layout mixins
|
|
2
2
|
|
|
3
3
|
@mixin flow-as-row {
|
|
4
4
|
grid-auto-flow: row;
|
|
@@ -7,9 +7,9 @@
|
|
|
7
7
|
.Layout-sidebar,
|
|
8
8
|
.Layout-divider,
|
|
9
9
|
.Layout-main {
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
10
|
+
width: 100% !important;
|
|
11
|
+
grid-column: 1 !important;
|
|
12
|
+
}
|
|
13
13
|
|
|
14
14
|
&.Layout--sidebarPosition-flowRow-start {
|
|
15
15
|
.Layout-sidebar {
|
|
@@ -77,29 +77,3 @@
|
|
|
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
|
-
}
|
package/markdown/images.scss
CHANGED
|
@@ -10,12 +10,12 @@
|
|
|
10
10
|
box-sizing: content-box;
|
|
11
11
|
background-color: var(--color-canvas-default);
|
|
12
12
|
|
|
13
|
-
&[align=
|
|
13
|
+
&[align=right] {
|
|
14
14
|
// stylelint-disable-next-line primer/spacing
|
|
15
15
|
padding-left: 20px;
|
|
16
16
|
}
|
|
17
17
|
|
|
18
|
-
&[align=
|
|
18
|
+
&[align=left] {
|
|
19
19
|
// stylelint-disable-next-line primer/spacing
|
|
20
20
|
padding-right: 20px;
|
|
21
21
|
}
|
|
@@ -38,7 +38,6 @@
|
|
|
38
38
|
}
|
|
39
39
|
|
|
40
40
|
&:hover {
|
|
41
|
-
text-decoration: none;
|
|
42
41
|
box-shadow: var(--color-mktg-btn-shadow-hover) !important;
|
|
43
42
|
}
|
|
44
43
|
|
|
@@ -69,13 +68,6 @@
|
|
|
69
68
|
opacity: 0.5 !important;
|
|
70
69
|
}
|
|
71
70
|
}
|
|
72
|
-
|
|
73
|
-
&.disabled,
|
|
74
|
-
&[disabled] {
|
|
75
|
-
pointer-events: none;
|
|
76
|
-
cursor: default;
|
|
77
|
-
opacity: 0.5;
|
|
78
|
-
}
|
|
79
71
|
}
|
|
80
72
|
|
|
81
73
|
.btn-muted-mktg {
|
package/marketing/index.scss
CHANGED
|
@@ -21,7 +21,6 @@
|
|
|
21
21
|
|
|
22
22
|
font-size: map-get($pairing, 'size') !important;
|
|
23
23
|
line-height: map-get($pairing, 'lh') !important;
|
|
24
|
-
|
|
25
24
|
@if (map-get($pairing, 'size') >= $mktg-header-weight-threshold) { font-weight: $mktg-header-weight-large !important; }
|
|
26
25
|
|
|
27
26
|
@if (nth($sizes, 1) != nth($sizes, 2)) {
|
|
@@ -76,9 +75,7 @@
|
|
|
76
75
|
|
|
77
76
|
font-size: map-get($pairing, 'size') !important;
|
|
78
77
|
line-height: map-get($pairing, 'lh') !important;
|
|
79
|
-
|
|
80
78
|
@if (map-get($pairing, 'size') >= $mktg-body-spacing-threshold) { letter-spacing: $mktg-body-spacing-large !important; }
|
|
81
|
-
|
|
82
79
|
@if (map-get($pairing, 'size') >= $mktg-body-weight-threshold) { font-weight: $font-weight-semibold; }
|
|
83
80
|
|
|
84
81
|
@if (nth($sizes, 1) != nth($sizes, 2)) {
|
|
@@ -7,45 +7,3 @@
|
|
|
7
7
|
transform: scale3d(1.025, 1.025, 1.025);
|
|
8
8
|
}
|
|
9
9
|
}
|
|
10
|
-
|
|
11
|
-
// Animated arrow symbol, used in marketing links, buttons, etc.
|
|
12
|
-
.btn-mktg,
|
|
13
|
-
.link-mktg,
|
|
14
|
-
.arrow-target-mktg {
|
|
15
|
-
.octicon {
|
|
16
|
-
width: 1em;
|
|
17
|
-
height: 1em;
|
|
18
|
-
}
|
|
19
|
-
|
|
20
|
-
.arrow-symbol-mktg {
|
|
21
|
-
transition: transform 0.2s;
|
|
22
|
-
transform: translateX(0);
|
|
23
|
-
|
|
24
|
-
// stylelint-disable-next-line selector-max-type
|
|
25
|
-
path:last-child {
|
|
26
|
-
stroke-dasharray: 10;
|
|
27
|
-
stroke-dashoffset: 10;
|
|
28
|
-
transition: stroke-dashoffset 0.2s;
|
|
29
|
-
}
|
|
30
|
-
}
|
|
31
|
-
|
|
32
|
-
@media screen and (prefers-reduced-motion: no-preference) {
|
|
33
|
-
&:hover,
|
|
34
|
-
&:focus {
|
|
35
|
-
.arrow-symbol-mktg {
|
|
36
|
-
transform: translateX(4px);
|
|
37
|
-
|
|
38
|
-
// stylelint-disable-next-line selector-max-type, selector-max-specificity, max-nesting-depth
|
|
39
|
-
path:last-child {
|
|
40
|
-
stroke-dashoffset: 20;
|
|
41
|
-
}
|
|
42
|
-
}
|
|
43
|
-
}
|
|
44
|
-
|
|
45
|
-
&:active {
|
|
46
|
-
.arrow-symbol-mktg {
|
|
47
|
-
transform: translateX(6px);
|
|
48
|
-
}
|
|
49
|
-
}
|
|
50
|
-
}
|
|
51
|
-
}
|
|
@@ -41,8 +41,8 @@
|
|
|
41
41
|
}
|
|
42
42
|
|
|
43
43
|
&.selected,
|
|
44
|
-
&[aria-selected=
|
|
45
|
-
&[aria-current]:not([aria-current=
|
|
44
|
+
&[aria-selected=true],
|
|
45
|
+
&[aria-current]:not([aria-current=false]) {
|
|
46
46
|
color: var(--color-fg-on-emphasis);
|
|
47
47
|
background-color: var(--color-accent-emphasis);
|
|
48
48
|
}
|
package/navigation/menu.scss
CHANGED
package/navigation/sidenav.scss
CHANGED
|
@@ -59,7 +59,7 @@
|
|
|
59
59
|
background-color: var(--color-canvas-subtle);
|
|
60
60
|
}
|
|
61
61
|
|
|
62
|
-
.SideNav-item[aria-current]:not([aria-current=
|
|
62
|
+
.SideNav-item[aria-current]:not([aria-current=false]),
|
|
63
63
|
.SideNav-item[aria-selected='true'] {
|
|
64
64
|
background-color: var(--color-sidenav-selected-bg);
|
|
65
65
|
|
|
@@ -101,7 +101,7 @@
|
|
|
101
101
|
outline: none;
|
|
102
102
|
}
|
|
103
103
|
|
|
104
|
-
.SideNav-subItem[aria-current]:not([aria-current=
|
|
104
|
+
.SideNav-subItem[aria-current]:not([aria-current=false]),
|
|
105
105
|
.SideNav-subItem[aria-selected='true'] {
|
|
106
106
|
font-weight: $font-weight-semibold;
|
|
107
107
|
color: var(--color-fg-default);
|
package/navigation/subnav.scss
CHANGED
|
@@ -40,8 +40,8 @@
|
|
|
40
40
|
}
|
|
41
41
|
|
|
42
42
|
&.selected,
|
|
43
|
-
&[aria-selected=
|
|
44
|
-
&[aria-current]:not([aria-current=
|
|
43
|
+
&[aria-selected=true],
|
|
44
|
+
&[aria-current]:not([aria-current=false]) {
|
|
45
45
|
z-index: 2;
|
|
46
46
|
color: var(--color-fg-on-emphasis);
|
|
47
47
|
background-color: var(--color-accent-emphasis);
|
package/navigation/tabnav.scss
CHANGED
|
@@ -28,8 +28,8 @@
|
|
|
28
28
|
transition: color 0.2s cubic-bezier(0.3, 0, 0.5, 1);
|
|
29
29
|
|
|
30
30
|
&.selected,
|
|
31
|
-
&[aria-selected=
|
|
32
|
-
&[aria-current]:not([aria-current=
|
|
31
|
+
&[aria-selected=true],
|
|
32
|
+
&[aria-current]:not([aria-current=false]) {
|
|
33
33
|
color: var(--color-fg-default);
|
|
34
34
|
background-color: var(--color-canvas-default); // cover bottom border
|
|
35
35
|
border-color: var(--color-border-default);
|
|
@@ -35,8 +35,8 @@
|
|
|
35
35
|
}
|
|
36
36
|
|
|
37
37
|
&.selected,
|
|
38
|
-
&[role=
|
|
39
|
-
&[aria-current]:not([aria-current=
|
|
38
|
+
&[role=tab][aria-selected=true],
|
|
39
|
+
&[aria-current]:not([aria-current=false]) {
|
|
40
40
|
font-weight: $font-weight-bold;
|
|
41
41
|
color: var(--color-fg-default);
|
|
42
42
|
border-bottom-color: var(--color-primer-border-active);
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@primer/css",
|
|
3
|
-
"version": "0.0.0-
|
|
3
|
+
"version": "0.0.0-2022020193741",
|
|
4
4
|
"description": "The CSS implementation of GitHub's Primer Design System",
|
|
5
5
|
"homepage": "https://primer.style/css",
|
|
6
6
|
"author": "GitHub, Inc.",
|
|
@@ -35,36 +35,37 @@
|
|
|
35
35
|
"storybook": "cd docs && yarn && yarn storybook"
|
|
36
36
|
},
|
|
37
37
|
"dependencies": {
|
|
38
|
-
"@primer/primitives": "^7.
|
|
38
|
+
"@primer/primitives": "^7.2.0"
|
|
39
39
|
},
|
|
40
40
|
"devDependencies": {
|
|
41
41
|
"@changesets/changelog-github": "0.4.2",
|
|
42
|
-
"@changesets/cli": "2.
|
|
42
|
+
"@changesets/cli": "2.18.1",
|
|
43
43
|
"@github/prettier-config": "0.0.4",
|
|
44
44
|
"@koddsson/postcss-sass": "5.0.0",
|
|
45
|
-
"@primer/stylelint-config": "12.
|
|
46
|
-
"autoprefixer": "10.4.
|
|
45
|
+
"@primer/stylelint-config": "12.1.1",
|
|
46
|
+
"autoprefixer": "10.4.0",
|
|
47
47
|
"cssstats": "4.0.2",
|
|
48
|
-
"eslint": "8.
|
|
48
|
+
"eslint": "8.3.0",
|
|
49
49
|
"eslint-plugin-github": "4.3.5",
|
|
50
|
-
"eslint-plugin-jest": "25.3.
|
|
50
|
+
"eslint-plugin-jest": "25.3.0",
|
|
51
51
|
"eslint-plugin-prettier": "4.0.0",
|
|
52
52
|
"filesize": "8.0.6",
|
|
53
53
|
"front-matter": "4.0.2",
|
|
54
54
|
"fs-extra": "10.0.0",
|
|
55
55
|
"globby": "12.0.2",
|
|
56
|
-
"jest": "27.4.
|
|
56
|
+
"jest": "27.4.2",
|
|
57
57
|
"js-yaml": "4.1.0",
|
|
58
|
-
"postcss": "8.4.
|
|
58
|
+
"postcss": "8.4.4",
|
|
59
59
|
"postcss-calc": "8.0.0",
|
|
60
60
|
"postcss-import": "14.0.2",
|
|
61
61
|
"postcss-load-config": "3.1.0",
|
|
62
62
|
"postcss-scss": "4.0.2",
|
|
63
63
|
"postcss-simple-vars": "6.0.3",
|
|
64
|
-
"prettier": "2.5.
|
|
64
|
+
"prettier": "2.5.0",
|
|
65
65
|
"semver": "7.3.5",
|
|
66
|
-
"stylelint": "14.
|
|
67
|
-
"
|
|
66
|
+
"stylelint": "14.1.0",
|
|
67
|
+
"stylelint-scss": "4.0.0",
|
|
68
|
+
"table": "6.7.3"
|
|
68
69
|
},
|
|
69
70
|
"jest": {
|
|
70
71
|
"testEnvironment": "node",
|
|
@@ -42,7 +42,7 @@
|
|
|
42
42
|
|
|
43
43
|
.current,
|
|
44
44
|
.current:hover,
|
|
45
|
-
[aria-current]:not([aria-current=
|
|
45
|
+
[aria-current]:not([aria-current=false]) {
|
|
46
46
|
color: var(--color-fg-on-emphasis);
|
|
47
47
|
background-color: var(--color-accent-emphasis);
|
|
48
48
|
border-color: transparent;
|
|
@@ -50,10 +50,10 @@
|
|
|
50
50
|
|
|
51
51
|
.gap,
|
|
52
52
|
.disabled,
|
|
53
|
-
[aria-disabled=
|
|
53
|
+
[aria-disabled=true],
|
|
54
54
|
.gap:hover,
|
|
55
55
|
.disabled:hover,
|
|
56
|
-
[aria-disabled=
|
|
56
|
+
[aria-disabled=true]:hover {
|
|
57
57
|
color: var(--color-primer-fg-disabled);
|
|
58
58
|
cursor: default;
|
|
59
59
|
border-color: transparent;
|
package/popover/popover.scss
CHANGED
|
@@ -386,7 +386,7 @@ $SelectMenu-max-height: 480px !default;
|
|
|
386
386
|
//
|
|
387
387
|
// Visible when a user clicks/taps on a list item
|
|
388
388
|
|
|
389
|
-
.SelectMenu-item[aria-checked=
|
|
389
|
+
.SelectMenu-item[aria-checked=true] {
|
|
390
390
|
font-weight: $font-weight-semibold;
|
|
391
391
|
color: var(--color-fg-default);
|
|
392
392
|
|
|
@@ -402,7 +402,7 @@ $SelectMenu-max-height: 480px !default;
|
|
|
402
402
|
// Prevent list items to be selected
|
|
403
403
|
|
|
404
404
|
.SelectMenu-item:disabled,
|
|
405
|
-
.SelectMenu-item[aria-disabled=
|
|
405
|
+
.SelectMenu-item[aria-disabled=true] {
|
|
406
406
|
color: var(--color-primer-fg-disabled);
|
|
407
407
|
pointer-events: none;
|
|
408
408
|
}
|
package/stylelint.config.cjs
CHANGED
|
@@ -1,7 +1,16 @@
|
|
|
1
1
|
module.exports = {
|
|
2
2
|
extends: ['@primer/stylelint-config'],
|
|
3
|
-
|
|
3
|
+
plugins: ['stylelint-scss'],
|
|
4
|
+
customSyntax: require('postcss-scss'),
|
|
5
|
+
ignoreFiles: ['src/fonts/**/*'],
|
|
4
6
|
rules: {
|
|
5
|
-
'
|
|
7
|
+
'scss/dollar-variable-default': [true, {ignore: 'local'}],
|
|
8
|
+
'primer/no-override': false,
|
|
9
|
+
'primer/colors': true,
|
|
10
|
+
'primer/borders': true,
|
|
11
|
+
'primer/spacing': true,
|
|
12
|
+
'primer/typography': true,
|
|
13
|
+
'primer/box-shadow': true,
|
|
14
|
+
'primer/no-undefined-vars': [true, {files: 'node_modules/@primer/primitives/dist/scss/colors*/*.scss'}]
|
|
6
15
|
}
|
|
7
16
|
}
|
|
@@ -8,7 +8,6 @@
|
|
|
8
8
|
/*! */ // This is a fix for a cssstats bug see https://github.com/cssstats/cssstats/issues/331
|
|
9
9
|
}
|
|
10
10
|
}
|
|
11
|
-
|
|
12
11
|
@else {
|
|
13
12
|
[data-color-mode="light"][data-light-theme="#{$theme-name}"],
|
|
14
13
|
[data-color-mode="dark"][data-dark-theme="#{$theme-name}"] {
|
|
@@ -37,7 +36,6 @@
|
|
|
37
36
|
@content;
|
|
38
37
|
}
|
|
39
38
|
}
|
|
40
|
-
|
|
41
39
|
@else {
|
|
42
40
|
[data-color-mode="light"][data-light-theme*="#{$mode}"],
|
|
43
41
|
[data-color-mode="dark"][data-dark-theme*="#{$mode}"] {
|
|
@@ -86,7 +84,6 @@
|
|
|
86
84
|
@if $type == dark {
|
|
87
85
|
$dark-colors: append($dark-colors, (--color-#{$name}, #{$color}));
|
|
88
86
|
}
|
|
89
|
-
|
|
90
87
|
@else {
|
|
91
88
|
$light-colors: append($light-colors, (--color-#{$name}, #{$color}));
|
|
92
89
|
}
|
package/support/mixins/misc.scss
CHANGED
|
@@ -25,9 +25,18 @@
|
|
|
25
25
|
}
|
|
26
26
|
}
|
|
27
27
|
|
|
28
|
-
//
|
|
28
|
+
// if min-width is undefined, return only min-height
|
|
29
|
+
@mixin minTouchTarget($min-height: 48px, $min-width: '') {
|
|
30
|
+
position: absolute;
|
|
31
|
+
top: 50%;
|
|
32
|
+
left: 50%;
|
|
33
|
+
width: 100%;
|
|
34
|
+
height: 100%;
|
|
35
|
+
min-height: $min-height;
|
|
36
|
+
content: '';
|
|
37
|
+
transform: translateX(-50%) translateY(-50%);
|
|
29
38
|
|
|
30
|
-
@
|
|
31
|
-
|
|
32
|
-
|
|
39
|
+
@if $min-width != '' {
|
|
40
|
+
min-width: $min-width;
|
|
41
|
+
}
|
|
33
42
|
}
|
|
@@ -47,6 +47,7 @@
|
|
|
47
47
|
|
|
48
48
|
// 32px on desktop
|
|
49
49
|
@include breakpoint(md) { font-size: $h1-size; }
|
|
50
|
+
|
|
50
51
|
}
|
|
51
52
|
|
|
52
53
|
@mixin f2-responsive {
|
|
@@ -61,6 +62,7 @@
|
|
|
61
62
|
|
|
62
63
|
// 20px on desktop
|
|
63
64
|
@include breakpoint(md) { font-size: $h3-size; }
|
|
65
|
+
|
|
64
66
|
}
|
|
65
67
|
|
|
66
68
|
// These use the mixins from above for responsive heading sizes.
|
|
@@ -68,18 +70,15 @@
|
|
|
68
70
|
// couple the responsive font-size with the font-weight.
|
|
69
71
|
@mixin h1-responsive {
|
|
70
72
|
@include f1-responsive;
|
|
71
|
-
|
|
72
73
|
font-weight: $font-weight-bold;
|
|
73
74
|
}
|
|
74
75
|
|
|
75
76
|
@mixin h2-responsive {
|
|
76
77
|
@include f2-responsive;
|
|
77
|
-
|
|
78
78
|
font-weight: $font-weight-bold;
|
|
79
79
|
}
|
|
80
80
|
|
|
81
81
|
@mixin h3-responsive {
|
|
82
82
|
@include f3-responsive;
|
|
83
|
-
|
|
84
83
|
font-weight: $font-weight-bold;
|
|
85
84
|
}
|
|
@@ -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 - 1px) {
|
|
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 - 1px) {
|
|
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 - 1px) {
|
|
30
30
|
.hide-lg {
|
|
31
31
|
display: none !important;
|
|
32
32
|
}
|
|
@@ -1,92 +0,0 @@
|
|
|
1
|
-
// tree-view variant
|
|
2
|
-
// renders ActionList with default styling for tree-view
|
|
3
|
-
// collapse/expand icons presents as leadingActions, rotate 90deg
|
|
4
|
-
// connecting vertical lines between collapse groups
|
|
5
|
-
// consistent font-size between nested groups
|
|
6
|
-
|
|
7
|
-
@mixin treeConnectingLine($left) {
|
|
8
|
-
position: absolute;
|
|
9
|
-
left: $left;
|
|
10
|
-
width: 1px;
|
|
11
|
-
height: 100%;
|
|
12
|
-
content: '';
|
|
13
|
-
background: var(--color-action-list-item-inline-divider);
|
|
14
|
-
}
|
|
15
|
-
|
|
16
|
-
.ActionList--tree {
|
|
17
|
-
--ActionList-tree-depth: 1;
|
|
18
|
-
// TODO: remove with PVC implementation
|
|
19
|
-
.ActionList-item--subItem > .ActionList-content {
|
|
20
|
-
font-size: $body-font-size;
|
|
21
|
-
}
|
|
22
|
-
|
|
23
|
-
.ActionList-item {
|
|
24
|
-
// nesting (infinate levels)
|
|
25
|
-
// target items inside expanded subgroup
|
|
26
|
-
&[aria-expanded] {
|
|
27
|
-
.ActionList--subGroup {
|
|
28
|
-
position: relative;
|
|
29
|
-
|
|
30
|
-
// --ActionList-tree-depth is defined as an inline style referencing the aria-level of each item ie: aria-level="2"
|
|
31
|
-
// stylelint-disable-next-line selector-max-specificity, max-nesting-depth, selector-max-compound-selectors
|
|
32
|
-
.ActionList-content {
|
|
33
|
-
// stylelint-disable-next-line primer/spacing
|
|
34
|
-
padding-left: calc(#{$spacer-2} * var(--ActionList-tree-depth));
|
|
35
|
-
}
|
|
36
|
-
}
|
|
37
|
-
}
|
|
38
|
-
|
|
39
|
-
// tree-view specific collapse icon positioning/animation
|
|
40
|
-
&[aria-expanded='true'] {
|
|
41
|
-
.ActionList-item-collapseIcon {
|
|
42
|
-
transition: transform 120ms linear;
|
|
43
|
-
transform: rotate(0deg);
|
|
44
|
-
}
|
|
45
|
-
}
|
|
46
|
-
|
|
47
|
-
&[aria-expanded='false'] {
|
|
48
|
-
.ActionList-item-collapseIcon {
|
|
49
|
-
transition: transform 120ms linear;
|
|
50
|
-
transform: rotate(-90deg);
|
|
51
|
-
}
|
|
52
|
-
}
|
|
53
|
-
}
|
|
54
|
-
|
|
55
|
-
// expand/collapse group
|
|
56
|
-
.ActionList-item--hasSubItem {
|
|
57
|
-
.ActionList-item--subItem:not(.ActionList-item--hasSubItem) {
|
|
58
|
-
// stylelint-disable-next-line selector-max-specificity, selector-max-compound-selectors
|
|
59
|
-
.ActionList-content {
|
|
60
|
-
// increase child padding by targeting content first child span (add to ActionList-content padding, not replace)
|
|
61
|
-
// creates a slight indent of child items
|
|
62
|
-
// stylelint-disable-next-line selector-max-specificity, selector-max-type, max-nesting-depth, selector-max-compound-selectors
|
|
63
|
-
> span:first-child {
|
|
64
|
-
padding-left: $spacer-4;
|
|
65
|
-
}
|
|
66
|
-
}
|
|
67
|
-
}
|
|
68
|
-
}
|
|
69
|
-
|
|
70
|
-
// first subitem
|
|
71
|
-
> [aria-level='1'].ActionList-item--hasSubItem {
|
|
72
|
-
> .ActionList--subGroup {
|
|
73
|
-
// stylelint-disable-next-line selector-max-specificity
|
|
74
|
-
&::before {
|
|
75
|
-
@include treeConnectingLine($left: $spacer-3);
|
|
76
|
-
}
|
|
77
|
-
}
|
|
78
|
-
}
|
|
79
|
-
|
|
80
|
-
// all other subitems
|
|
81
|
-
// center connecting line with parent (line is 1px (8px - 1px)
|
|
82
|
-
.ActionList-item--hasSubItem:not([aria-level='1']) {
|
|
83
|
-
> .ActionList--subGroup {
|
|
84
|
-
// stylelint-disable-next-line selector-max-specificity
|
|
85
|
-
&::before {
|
|
86
|
-
@include treeConnectingLine(
|
|
87
|
-
$left: calc(#{$spacer-2} * (var(--ActionList-tree-depth)) + #{$spacer-2 - $border-width})
|
|
88
|
-
);
|
|
89
|
-
}
|
|
90
|
-
}
|
|
91
|
-
}
|
|
92
|
-
}
|