@primer/css 20.0.0-rc.b5fee637 → 20.0.0-rc.f7fbc78b
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 +165 -4
- 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 +214 -130
- 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 +51 -2
- package/avatars/avatar-stack.scss +1 -0
- package/base/base.scss +64 -3
- package/base/index.scss +0 -1
- 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/blankslate/index.scss +0 -1
- package/box/box-overlay.scss +2 -0
- package/box/box.scss +0 -3
- package/branch-name/branch-name.scss +1 -0
- package/breadcrumb/breadcrumb.scss +1 -1
- package/buttons/button-group.scss +3 -2
- package/buttons/button.scss +64 -36
- package/buttons/misc.scss +30 -25
- package/color-modes/index.scss +2 -0
- package/color-modes/native.scss +12 -0
- package/color-modes/themes/dark.scss +0 -1
- package/color-modes/themes/dark_colorblind.scss +0 -1
- package/color-modes/themes/dark_dimmed.scss +0 -1
- package/color-modes/themes/dark_high_contrast.scss +0 -1
- package/color-modes/themes/dark_tritanopia.scss +6 -0
- package/color-modes/themes/light.scss +0 -1
- package/color-modes/themes/light_colorblind.scss +0 -1
- package/color-modes/themes/light_high_contrast.scss +0 -1
- 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 +82 -82
- 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 +26 -5
- package/forms/form-group.scss +48 -13
- package/forms/form-validation.scss +1 -1
- package/forms/input-group.scss +18 -0
- package/labels/index.scss +0 -1
- package/labels/labels.scss +12 -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 -1
- package/layout/layout.scss +8 -11
- package/layout/mixins.scss +30 -4
- 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 +17 -0
- package/markdown/images.scss +3 -3
- 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 +21 -0
- package/marketing/utilities/layout.scss +1 -0
- package/navigation/filter-list.scss +20 -2
- package/navigation/menu.scss +8 -10
- package/navigation/sidenav.scss +3 -12
- package/navigation/subnav.scss +21 -2
- package/navigation/tabnav.scss +9 -4
- package/navigation/underline-nav.scss +51 -45
- package/package.json +32 -26
- package/pagination/pagination.scss +65 -7
- package/popover/popover.scss +2 -2
- package/select-menu/select-menu.scss +3 -3
- package/stylelint.config.cjs +2 -11
- package/subhead/subhead.scss +3 -0
- package/support/mixins/color-modes.scss +5 -0
- package/support/mixins/layout.scss +1 -0
- package/support/mixins/misc.scss +28 -5
- package/support/mixins/typography.scss +3 -2
- 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
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@primer/css",
|
|
3
|
-
"version": "20.0.0-rc.
|
|
3
|
+
"version": "20.0.0-rc.f7fbc78b",
|
|
4
4
|
"description": "The CSS implementation of GitHub's Primer Design System",
|
|
5
5
|
"homepage": "https://primer.style/css",
|
|
6
6
|
"author": "GitHub, Inc.",
|
|
@@ -23,8 +23,14 @@
|
|
|
23
23
|
"design-system"
|
|
24
24
|
],
|
|
25
25
|
"scripts": {
|
|
26
|
+
"build:docs": "script/build-docs",
|
|
27
|
+
"build:docs:preview": "script/build-docs preview",
|
|
26
28
|
"dist": "script/dist.js",
|
|
27
|
-
"
|
|
29
|
+
"dist:watch": "chokidar \"src/**/*.scss\" -c \"script/dist.js\"",
|
|
30
|
+
"stylelint": "stylelint --quiet --rd 'src/**/*.scss'",
|
|
31
|
+
"stylelint:fix": "yarn stylelint -- --fix",
|
|
32
|
+
"stylelint:remove-disables": "script/stylelint-remove-disables.js 'src/**/*.scss'",
|
|
33
|
+
"stylelint:add-disables": "script/stylelint-add-disables.js 'src/**/*.scss'",
|
|
28
34
|
"eslint": "eslint deprecations.js __tests__ script",
|
|
29
35
|
"prepublishOnly": "script/prepublish",
|
|
30
36
|
"start": "yarn dev",
|
|
@@ -35,37 +41,37 @@
|
|
|
35
41
|
"storybook": "cd docs && yarn && yarn storybook"
|
|
36
42
|
},
|
|
37
43
|
"dependencies": {
|
|
38
|
-
"@primer/primitives": "^7.
|
|
44
|
+
"@primer/primitives": "^7.7.0"
|
|
39
45
|
},
|
|
40
46
|
"devDependencies": {
|
|
41
|
-
"@changesets/changelog-github": "0.4.
|
|
42
|
-
"@changesets/cli": "2.
|
|
47
|
+
"@changesets/changelog-github": "0.4.4",
|
|
48
|
+
"@changesets/cli": "2.22.0",
|
|
43
49
|
"@github/prettier-config": "0.0.4",
|
|
44
|
-
"@koddsson/postcss-sass": "5.0.
|
|
45
|
-
"@primer/stylelint-config": "12.
|
|
46
|
-
"autoprefixer": "10.4.
|
|
47
|
-
"
|
|
48
|
-
"
|
|
49
|
-
"eslint
|
|
50
|
-
"eslint-plugin-
|
|
50
|
+
"@koddsson/postcss-sass": "5.0.1",
|
|
51
|
+
"@primer/stylelint-config": "^12.4.0",
|
|
52
|
+
"autoprefixer": "10.4.4",
|
|
53
|
+
"chokidar-cli": "3.0.0",
|
|
54
|
+
"cssstats": "4.0.5",
|
|
55
|
+
"eslint": "8.13.0",
|
|
56
|
+
"eslint-plugin-github": "4.3.6",
|
|
57
|
+
"eslint-plugin-jest": "26.0.0",
|
|
51
58
|
"eslint-plugin-prettier": "4.0.0",
|
|
52
|
-
"filesize": "8.0.
|
|
59
|
+
"filesize": "8.0.7",
|
|
53
60
|
"front-matter": "4.0.2",
|
|
54
|
-
"fs-extra": "10.0.
|
|
55
|
-
"globby": "
|
|
56
|
-
"jest": "27.
|
|
61
|
+
"fs-extra": "10.0.1",
|
|
62
|
+
"globby": "13.1.1",
|
|
63
|
+
"jest": "27.5.1",
|
|
57
64
|
"js-yaml": "4.1.0",
|
|
58
|
-
"postcss": "8.4.
|
|
59
|
-
"postcss-calc": "8.
|
|
60
|
-
"postcss-import": "14.0
|
|
61
|
-
"postcss-load-config": "3.1.
|
|
62
|
-
"postcss-scss": "4.0.
|
|
65
|
+
"postcss": "8.4.12",
|
|
66
|
+
"postcss-calc": "8.2.4",
|
|
67
|
+
"postcss-import": "14.1.0",
|
|
68
|
+
"postcss-load-config": "3.1.4",
|
|
69
|
+
"postcss-scss": "4.0.3",
|
|
63
70
|
"postcss-simple-vars": "6.0.3",
|
|
64
|
-
"prettier": "2.
|
|
65
|
-
"semver": "7.3.
|
|
66
|
-
"stylelint": "14.1
|
|
67
|
-
"
|
|
68
|
-
"table": "6.7.5"
|
|
71
|
+
"prettier": "2.6.2",
|
|
72
|
+
"semver": "7.3.7",
|
|
73
|
+
"stylelint": "14.6.1",
|
|
74
|
+
"table": "6.8.0"
|
|
69
75
|
},
|
|
70
76
|
"jest": {
|
|
71
77
|
"testEnvironment": "node",
|
|
@@ -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
|
|
|
@@ -42,7 +40,7 @@
|
|
|
42
40
|
|
|
43
41
|
.current,
|
|
44
42
|
.current:hover,
|
|
45
|
-
[aria-current]:not([aria-current=false]) {
|
|
43
|
+
[aria-current]:not([aria-current='false']) {
|
|
46
44
|
color: var(--color-fg-on-emphasis);
|
|
47
45
|
background-color: var(--color-accent-emphasis);
|
|
48
46
|
border-color: transparent;
|
|
@@ -50,10 +48,10 @@
|
|
|
50
48
|
|
|
51
49
|
.gap,
|
|
52
50
|
.disabled,
|
|
53
|
-
[aria-disabled=true],
|
|
51
|
+
[aria-disabled='true'],
|
|
54
52
|
.gap:hover,
|
|
55
53
|
.disabled:hover,
|
|
56
|
-
[aria-disabled=true]:hover {
|
|
54
|
+
[aria-disabled='true']:hover {
|
|
57
55
|
color: var(--color-primer-fg-disabled);
|
|
58
56
|
cursor: default;
|
|
59
57
|
border-color: transparent;
|
|
@@ -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;
|
|
@@ -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=true] {
|
|
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=true] {
|
|
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,16 +1,7 @@
|
|
|
1
1
|
module.exports = {
|
|
2
2
|
extends: ['@primer/stylelint-config'],
|
|
3
|
-
|
|
4
|
-
customSyntax: require('postcss-scss'),
|
|
5
|
-
ignoreFiles: ['src/fonts/**/*'],
|
|
3
|
+
ignoreFiles: ['**/*.js', '**/*.cjs'],
|
|
6
4
|
rules: {
|
|
7
|
-
'
|
|
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'}]
|
|
5
|
+
'primer/no-override': false
|
|
15
6
|
}
|
|
16
7
|
}
|
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;
|
|
@@ -8,6 +8,7 @@
|
|
|
8
8
|
/*! */ // This is a fix for a cssstats bug see https://github.com/cssstats/cssstats/issues/331
|
|
9
9
|
}
|
|
10
10
|
}
|
|
11
|
+
|
|
11
12
|
@else {
|
|
12
13
|
[data-color-mode="light"][data-light-theme="#{$theme-name}"],
|
|
13
14
|
[data-color-mode="dark"][data-dark-theme="#{$theme-name}"] {
|
|
@@ -36,6 +37,7 @@
|
|
|
36
37
|
@content;
|
|
37
38
|
}
|
|
38
39
|
}
|
|
40
|
+
|
|
39
41
|
@else {
|
|
40
42
|
[data-color-mode="light"][data-light-theme*="#{$mode}"],
|
|
41
43
|
[data-color-mode="dark"][data-dark-theme*="#{$mode}"] {
|
|
@@ -82,9 +84,12 @@
|
|
|
82
84
|
@each $name, $value in $color-map {
|
|
83
85
|
@each $type, $color in $value {
|
|
84
86
|
@if $type == dark {
|
|
87
|
+
// stylelint-disable-next-line function-no-unknown
|
|
85
88
|
$dark-colors: append($dark-colors, (--color-#{$name}, #{$color}));
|
|
86
89
|
}
|
|
90
|
+
|
|
87
91
|
@else {
|
|
92
|
+
// stylelint-disable-next-line function-no-unknown
|
|
88
93
|
$light-colors: append($light-colors, (--color-#{$name}, #{$color}));
|
|
89
94
|
}
|
|
90
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
|
|
@@ -47,7 +47,6 @@
|
|
|
47
47
|
|
|
48
48
|
// 32px on desktop
|
|
49
49
|
@include breakpoint(md) { font-size: $h1-size; }
|
|
50
|
-
|
|
51
50
|
}
|
|
52
51
|
|
|
53
52
|
@mixin f2-responsive {
|
|
@@ -62,7 +61,6 @@
|
|
|
62
61
|
|
|
63
62
|
// 20px on desktop
|
|
64
63
|
@include breakpoint(md) { font-size: $h3-size; }
|
|
65
|
-
|
|
66
64
|
}
|
|
67
65
|
|
|
68
66
|
// These use the mixins from above for responsive heading sizes.
|
|
@@ -70,15 +68,18 @@
|
|
|
70
68
|
// couple the responsive font-size with the font-weight.
|
|
71
69
|
@mixin h1-responsive {
|
|
72
70
|
@include f1-responsive;
|
|
71
|
+
|
|
73
72
|
font-weight: $font-weight-bold;
|
|
74
73
|
}
|
|
75
74
|
|
|
76
75
|
@mixin h2-responsive {
|
|
77
76
|
@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
|
+
|
|
83
84
|
font-weight: $font-weight-bold;
|
|
84
85
|
}
|
|
@@ -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 {
|