@primer/css 0.0.0-1ea75fe → 0.0.0-202110100305
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 +1231 -132
- package/CODE_OF_CONDUCT.md +1 -1
- package/CONTRIBUTING.md +85 -0
- package/DEVELOP.md +11 -69
- package/LICENSE +1 -1
- package/README.md +13 -15
- package/RELEASING.md +5 -72
- package/actionlist/action-list-item-divider.scss +42 -0
- package/actionlist/action-list-item.scss +444 -0
- package/actionlist/action-list-variables.scss +8 -0
- package/actionlist/action-list.scss +33 -0
- package/actionlist/index.scss +5 -0
- package/alerts/README.md +11 -22
- package/alerts/flash.scss +91 -21
- package/alerts/index.scss +2 -2
- package/autocomplete/README.md +25 -0
- package/autocomplete/autocomplete.scss +58 -0
- package/autocomplete/index.scss +4 -0
- package/autocomplete/suggester.scss +92 -0
- package/avatars/README.md +11 -23
- package/avatars/avatar-parent-child.scss +4 -3
- package/avatars/avatar-stack.scss +21 -13
- package/avatars/avatar.scss +31 -3
- package/avatars/circle-badge.scss +5 -4
- package/avatars/index.scss +5 -5
- package/base/README.md +11 -22
- package/base/base.scss +5 -4
- package/base/index.scss +6 -4
- package/base/kbd.scss +20 -0
- package/base/normalize.scss +5 -5
- package/base/octicons.scss +6 -0
- package/base/typography-base.scss +2 -0
- package/blankslate/README.md +11 -23
- package/blankslate/blankslate.scss +25 -12
- package/blankslate/index.scss +2 -2
- package/box/README.md +11 -23
- package/box/box.scss +52 -44
- package/box/index.scss +2 -2
- package/branch-name/README.md +11 -23
- package/branch-name/branch-name.scss +18 -8
- package/branch-name/index.scss +2 -2
- package/breadcrumb/README.md +17 -13
- package/breadcrumb/breadcrumb.scss +15 -5
- package/breadcrumb/index.scss +2 -2
- package/buttons/README.md +11 -23
- package/buttons/button-group.scss +2 -0
- package/buttons/button.scss +243 -143
- package/buttons/index.scss +4 -3
- package/buttons/misc.scss +222 -0
- package/color-modes/index.scss +9 -0
- package/color-modes/native.scss +10 -0
- package/color-modes/themes/dark.scss +7 -0
- package/color-modes/themes/dark_colorblind.scss +7 -0
- package/color-modes/themes/dark_dimmed.scss +7 -0
- package/color-modes/themes/dark_high_contrast.scss +7 -0
- package/color-modes/themes/light.scss +7 -0
- package/color-modes/themes/light_colorblind.scss +7 -0
- package/core/README.md +11 -23
- package/core/index.scss +19 -20
- package/deprecations.js +24 -0
- package/deprecations.json +539 -0
- package/dist/actionlist.css +2 -0
- package/dist/actionlist.css.map +1 -0
- package/dist/actionlist.js +1 -0
- package/dist/alerts.css +1 -2
- package/dist/alerts.css.map +1 -1
- package/dist/alerts.js +1 -1
- package/dist/autocomplete.css +2 -0
- package/dist/autocomplete.css.map +1 -0
- package/dist/autocomplete.js +1 -0
- package/dist/avatars.css +1 -2
- package/dist/avatars.css.map +1 -1
- package/dist/avatars.js +1 -1
- package/dist/base.css +1 -2
- package/dist/base.css.map +1 -1
- package/dist/base.js +1 -1
- package/dist/blankslate.css +1 -2
- package/dist/blankslate.css.map +1 -1
- package/dist/blankslate.js +1 -1
- package/dist/box.css +1 -2
- package/dist/box.css.map +1 -1
- package/dist/box.js +1 -1
- package/dist/branch-name.css +1 -2
- package/dist/branch-name.css.map +1 -1
- package/dist/branch-name.js +1 -1
- package/dist/breadcrumb.css +1 -2
- package/dist/breadcrumb.css.map +1 -1
- package/dist/breadcrumb.js +1 -1
- package/dist/buttons.css +1 -2
- package/dist/buttons.css.map +1 -1
- package/dist/buttons.js +1 -1
- package/dist/color-modes.css +2 -0
- package/dist/color-modes.css.map +1 -0
- package/dist/color-modes.js +1 -0
- package/dist/core.css +3 -4
- package/dist/core.css.map +1 -1
- package/dist/core.js +1 -1
- package/dist/deprecations.json +539 -0
- package/dist/dropdown.css +2 -0
- package/dist/dropdown.css.map +1 -0
- package/dist/dropdown.js +1 -0
- package/dist/forms.css +1 -2
- package/dist/forms.css.map +1 -1
- package/dist/forms.js +1 -1
- package/dist/header.css +2 -0
- package/dist/header.css.map +1 -0
- package/dist/header.js +1 -0
- package/dist/labels.css +1 -2
- package/dist/labels.css.map +1 -1
- package/dist/labels.js +1 -1
- package/dist/layout.css +1 -2
- package/dist/layout.css.map +1 -1
- package/dist/layout.js +1 -1
- package/dist/links.css +2 -0
- package/dist/links.css.map +1 -0
- package/dist/links.js +1 -0
- package/dist/loaders.css +2 -0
- package/dist/loaders.css.map +1 -0
- package/dist/loaders.js +1 -0
- package/dist/markdown.css +1 -2
- package/dist/markdown.css.map +1 -1
- package/dist/markdown.js +1 -1
- package/dist/marketing-buttons.css +1 -2
- package/dist/marketing-buttons.css.map +1 -1
- package/dist/marketing-buttons.js +1 -1
- package/dist/marketing-support.css +1 -2
- package/dist/marketing-support.js +1 -1
- package/dist/marketing-type.css +1 -2
- package/dist/marketing-type.css.map +1 -1
- package/dist/marketing-type.js +1 -1
- package/dist/marketing-utilities.css +1 -2
- package/dist/marketing-utilities.css.map +1 -1
- package/dist/marketing-utilities.js +1 -1
- package/dist/marketing.css +3 -4
- package/dist/marketing.css.map +1 -1
- package/dist/marketing.js +1 -1
- package/dist/meta.json +316 -273
- package/dist/navigation.css +1 -2
- package/dist/navigation.css.map +1 -1
- package/dist/navigation.js +1 -1
- package/dist/pagination.css +1 -2
- package/dist/pagination.css.map +1 -1
- package/dist/pagination.js +1 -1
- package/dist/popover.css +1 -2
- package/dist/popover.css.map +1 -1
- package/dist/popover.js +1 -1
- package/dist/primer.css +13 -14
- package/dist/primer.css.map +1 -1
- package/dist/primer.js +1 -1
- package/dist/product.css +3 -4
- package/dist/product.css.map +1 -1
- package/dist/product.js +1 -1
- package/dist/progress.css +1 -2
- package/dist/progress.css.map +1 -1
- package/dist/progress.js +1 -1
- package/dist/select-menu.css +2 -0
- package/dist/select-menu.css.map +1 -0
- package/dist/select-menu.js +1 -0
- package/dist/stats/actionlist.json +1 -0
- package/dist/stats/alerts.json +1 -1
- package/dist/stats/autocomplete.json +1 -0
- package/dist/stats/avatars.json +1 -1
- package/dist/stats/base.json +1 -1
- package/dist/stats/blankslate.json +1 -1
- package/dist/stats/box.json +1 -1
- package/dist/stats/branch-name.json +1 -1
- package/dist/stats/breadcrumb.json +1 -1
- package/dist/stats/buttons.json +1 -1
- package/dist/stats/color-modes.json +1 -0
- package/dist/stats/core.json +1 -1
- package/dist/stats/dropdown.json +1 -0
- package/dist/stats/forms.json +1 -1
- package/dist/stats/header.json +1 -0
- package/dist/stats/labels.json +1 -1
- package/dist/stats/layout.json +1 -1
- package/dist/stats/links.json +1 -0
- package/dist/stats/loaders.json +1 -0
- package/dist/stats/markdown.json +1 -1
- package/dist/stats/marketing-buttons.json +1 -1
- package/dist/stats/marketing-support.json +1 -1
- package/dist/stats/marketing-type.json +1 -1
- package/dist/stats/marketing-utilities.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/progress.json +1 -1
- package/dist/stats/select-menu.json +1 -0
- package/dist/stats/subhead.json +1 -1
- package/dist/stats/support.json +1 -1
- package/dist/stats/table-object.json +1 -1
- package/dist/stats/timeline.json +1 -0
- package/dist/stats/toasts.json +1 -0
- package/dist/stats/tooltips.json +1 -1
- package/dist/stats/truncate.json +1 -1
- package/dist/stats/utilities.json +1 -1
- package/dist/subhead.css +1 -2
- package/dist/subhead.css.map +1 -1
- package/dist/subhead.js +1 -1
- package/dist/support.css +1 -1
- package/dist/support.js +1 -1
- package/dist/table-object.css +0 -1
- package/dist/table-object.css.map +1 -1
- package/dist/table-object.js +1 -1
- package/dist/timeline.css +2 -0
- package/dist/timeline.css.map +1 -0
- package/dist/timeline.js +1 -0
- package/dist/toasts.css +2 -0
- package/dist/toasts.css.map +1 -0
- package/dist/toasts.js +1 -0
- package/dist/tooltips.css +1 -2
- package/dist/tooltips.css.map +1 -1
- package/dist/tooltips.js +1 -1
- package/dist/truncate.css +1 -2
- package/dist/truncate.css.map +1 -1
- package/dist/truncate.js +1 -1
- package/dist/utilities.css +1 -2
- package/dist/utilities.css.map +1 -1
- package/dist/utilities.js +1 -1
- package/dist/variables.json +1352 -0
- package/dropdown/README.md +25 -0
- package/dropdown/dropdown.scss +272 -0
- package/dropdown/index.scss +2 -0
- package/forms/README.md +11 -23
- package/forms/form-control.scss +76 -32
- package/forms/form-group.scss +83 -46
- package/forms/form-select.scss +17 -5
- package/forms/form-validation.scss +51 -32
- package/forms/index.scss +7 -6
- package/forms/input-group.scss +2 -0
- package/forms/radio-group.scss +62 -0
- package/header/README.md +25 -0
- package/header/header.scss +47 -0
- package/header/index.scss +2 -0
- package/index.scss +7 -4
- package/labels/README.md +11 -23
- package/labels/counters.scss +24 -13
- package/labels/diffstat.scss +37 -0
- package/labels/index.scss +8 -4
- package/labels/issue-labels.scss +23 -0
- package/labels/labels.scss +59 -40
- package/labels/mixins.scss +32 -0
- package/labels/states.scss +40 -19
- package/layout/README.md +11 -23
- package/layout/container.scss +0 -8
- package/layout/grid-offset.scss +11 -11
- package/layout/grid.scss +23 -23
- package/layout/index.scss +8 -5
- package/layout/layout-beta.scss +339 -0
- package/layout/layout.scss +185 -0
- package/layout/mixins.scss +79 -0
- package/links/README.md +25 -0
- package/links/index.scss +3 -0
- package/links/link.scss +55 -0
- package/loaders/README.md +25 -0
- package/loaders/index.scss +2 -0
- package/loaders/loaders.scss +19 -0
- package/markdown/README.md +11 -23
- package/markdown/blob-csv.scss +4 -2
- package/markdown/code.scss +11 -3
- package/markdown/footnotes.scss +37 -0
- package/markdown/headings.scss +13 -4
- package/markdown/images.scss +15 -4
- package/markdown/index.scss +9 -8
- package/markdown/lists.scss +19 -5
- package/markdown/markdown-body.scss +15 -18
- package/markdown/tables.scss +8 -5
- package/marketing/README.md +11 -23
- package/marketing/buttons/button.scss +82 -61
- package/marketing/index.scss +6 -11
- package/marketing/support/index.scss +1 -0
- package/marketing/support/mixins.scss +66 -0
- package/marketing/support/variables.scss +110 -51
- package/marketing/type/typography.scss +100 -62
- package/marketing/utilities/animations.scss +9 -0
- package/marketing/utilities/filters.scss +0 -1
- package/marketing/utilities/index.scss +2 -3
- package/marketing/utilities/layout.scss +32 -11
- package/navigation/README.md +11 -23
- package/navigation/filter-list.scss +16 -14
- package/navigation/index.scss +7 -6
- package/navigation/menu.scss +44 -35
- package/navigation/sidenav.scss +108 -0
- package/navigation/subnav.scss +28 -21
- package/navigation/tabnav.scss +45 -21
- package/navigation/underline-nav.scss +36 -22
- package/package.json +78 -107
- package/pagination/README.md +12 -14
- package/pagination/index.scss +2 -2
- package/pagination/pagination.scss +61 -37
- package/popover/README.md +11 -24
- package/popover/index.scss +2 -2
- package/popover/popover.scss +18 -9
- package/postcss.config.cjs +22 -0
- package/prettier.config.cjs +1 -0
- package/product/README.md +11 -23
- package/product/index.scss +19 -17
- package/progress/README.md +11 -23
- package/progress/index.scss +2 -2
- package/progress/progress.scss +11 -1
- package/select-menu/README.md +25 -0
- package/select-menu/index.scss +3 -0
- package/select-menu/select-menu.scss +464 -0
- package/stylelint.config.cjs +16 -0
- package/subhead/README.md +11 -25
- package/subhead/index.scss +2 -2
- package/subhead/subhead.scss +10 -4
- package/support/README.md +12 -18
- package/support/index.scss +7 -8
- package/support/mixins/color-modes.scss +106 -0
- package/support/mixins/misc.scss +9 -12
- package/support/mixins/typography.scss +1 -1
- package/support/variables/layout.scss +103 -11
- package/support/variables/misc.scss +7 -30
- package/support/variables/typography.scss +4 -4
- package/table-object/README.md +11 -24
- package/table-object/index.scss +1 -1
- package/timeline/README.md +25 -0
- package/timeline/index.scss +2 -0
- package/timeline/timeline-item.scss +95 -0
- package/toasts/README.md +25 -0
- package/toasts/index.scss +2 -0
- package/toasts/toasts.scss +124 -0
- package/tooltips/README.md +11 -24
- package/tooltips/index.scss +2 -2
- package/tooltips/tooltips.scss +17 -8
- package/truncate/README.md +11 -24
- package/truncate/index.scss +2 -1
- package/truncate/truncate.scss +41 -7
- package/utilities/README.md +11 -23
- package/utilities/animations.scss +14 -2
- package/utilities/borders.scss +29 -65
- package/utilities/box-shadow.scss +8 -9
- package/utilities/colors.scss +71 -110
- package/utilities/details.scss +12 -4
- package/utilities/flexbox.scss +14 -14
- package/utilities/index.scss +12 -12
- package/utilities/layout.scss +28 -22
- package/utilities/margin.scss +34 -17
- package/utilities/padding.scss +13 -9
- package/utilities/typography.scss +54 -25
- package/utilities/visibility-display.scss +0 -13
- package/.browserslistrc +0 -6
- package/.eslintrc.json +0 -13
- package/.stylelintrc.json +0 -9
- package/MIGRATING.md +0 -70
- package/bin/primer-migrate +0 -86
- package/build/build.css +0 -23
- package/build/build.json +0 -1
- package/build/index.js +0 -1
- package/dist/marketing-support.css.map +0 -1
- package/dist/support.css.map +0 -1
- package/fonts/Inter-Medium.woff +0 -0
- package/fonts/Inter-Regular.woff +0 -0
- package/layout/columns.scss +0 -56
- package/marketing/buttons/README.md +0 -39
- package/marketing/support/README.md +0 -31
- package/marketing/type/README.md +0 -39
- package/marketing/utilities/README.md +0 -36
- package/marketing/utilities/margin.scss +0 -18
- package/marketing/utilities/padding.scss +0 -28
- package/postcss.config.js +0 -14
- package/prettier.config.js +0 -1
- package/support/mixins/buttons.scss +0 -160
- package/support/variables/color-system.scss +0 -243
- package/support/variables/colors.scss +0 -70
package/alerts/index.scss
CHANGED
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
// support files
|
|
2
|
-
@import
|
|
3
|
-
@import
|
|
2
|
+
@import '../support/index.scss';
|
|
3
|
+
@import './flash.scss';
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
---
|
|
2
|
+
bundle: "autocomplete"
|
|
3
|
+
generated: true
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
# Primer CSS: `autocomplete` 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/autocomplete/index.scss";
|
|
14
|
+
```
|
|
15
|
+
|
|
16
|
+
## Build
|
|
17
|
+
|
|
18
|
+
The `@primer/css` npm package includes a standalone CSS build of this module in `dist/autocomplete.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
|
|
@@ -0,0 +1,58 @@
|
|
|
1
|
+
// A pop up list of items used to show autocompleted results
|
|
2
|
+
.autocomplete-results {
|
|
3
|
+
position: absolute;
|
|
4
|
+
z-index: 99;
|
|
5
|
+
width: 100%;
|
|
6
|
+
max-height: 20em;
|
|
7
|
+
overflow-y: auto;
|
|
8
|
+
// stylelint-disable-next-line primer/typography
|
|
9
|
+
font-size: 13px;
|
|
10
|
+
list-style: none;
|
|
11
|
+
background: var(--color-canvas-overlay);
|
|
12
|
+
border: $border-width $border-style var(--color-border-default);
|
|
13
|
+
border-radius: $border-radius;
|
|
14
|
+
box-shadow: var(--color-shadow-medium);
|
|
15
|
+
}
|
|
16
|
+
|
|
17
|
+
// One of the items that appears within an autocomplete group
|
|
18
|
+
// Bold black text on white background
|
|
19
|
+
|
|
20
|
+
.autocomplete-item {
|
|
21
|
+
display: block;
|
|
22
|
+
width: 100%;
|
|
23
|
+
padding: $spacer-1 $spacer-2;
|
|
24
|
+
overflow: hidden;
|
|
25
|
+
font-weight: $font-weight-bold;
|
|
26
|
+
color: var(--color-fg-default);
|
|
27
|
+
text-align: left;
|
|
28
|
+
text-decoration: none;
|
|
29
|
+
text-overflow: ellipsis;
|
|
30
|
+
white-space: nowrap;
|
|
31
|
+
cursor: pointer;
|
|
32
|
+
background-color: var(--color-canvas-overlay);
|
|
33
|
+
border: 0;
|
|
34
|
+
|
|
35
|
+
&:hover {
|
|
36
|
+
color: var(--color-fg-on-emphasis);
|
|
37
|
+
text-decoration: none;
|
|
38
|
+
background-color: var(--color-accent-emphasis);
|
|
39
|
+
|
|
40
|
+
// Inherit color on all child elements to ensure enough contrast
|
|
41
|
+
* {
|
|
42
|
+
color: inherit !important;
|
|
43
|
+
}
|
|
44
|
+
}
|
|
45
|
+
|
|
46
|
+
&.selected,
|
|
47
|
+
&[aria-selected=true],
|
|
48
|
+
&.navigation-focus {
|
|
49
|
+
color: var(--color-fg-on-emphasis);
|
|
50
|
+
text-decoration: none;
|
|
51
|
+
background-color: var(--color-accent-emphasis);
|
|
52
|
+
|
|
53
|
+
// Inherit color on all child elements to ensure enough contrast
|
|
54
|
+
* {
|
|
55
|
+
color: inherit !important;
|
|
56
|
+
}
|
|
57
|
+
}
|
|
58
|
+
}
|
|
@@ -0,0 +1,92 @@
|
|
|
1
|
+
// Needs refactoring
|
|
2
|
+
// stylelint-disable selector-max-type, selector-no-qualifying-type
|
|
3
|
+
|
|
4
|
+
.suggester {
|
|
5
|
+
position: relative;
|
|
6
|
+
top: 0;
|
|
7
|
+
left: 0;
|
|
8
|
+
min-width: 180px;
|
|
9
|
+
padding: 0;
|
|
10
|
+
margin: 0;
|
|
11
|
+
margin-top: $spacer-4;
|
|
12
|
+
list-style: none;
|
|
13
|
+
cursor: pointer;
|
|
14
|
+
background: var(--color-canvas-overlay);
|
|
15
|
+
border: $border-width $border-style var(--color-border-default);
|
|
16
|
+
border-radius: $border-radius;
|
|
17
|
+
box-shadow: var(--color-shadow-medium);
|
|
18
|
+
|
|
19
|
+
li {
|
|
20
|
+
display: block;
|
|
21
|
+
padding: $spacer-1 $spacer-2;
|
|
22
|
+
font-weight: $font-weight-semibold;
|
|
23
|
+
border-bottom: $border-width $border-style var(--color-border-muted);
|
|
24
|
+
|
|
25
|
+
small {
|
|
26
|
+
font-weight: $font-weight-normal;
|
|
27
|
+
color: var(--color-fg-muted);
|
|
28
|
+
}
|
|
29
|
+
|
|
30
|
+
&:last-child {
|
|
31
|
+
border-bottom: 0;
|
|
32
|
+
border-bottom-right-radius: $border-radius;
|
|
33
|
+
border-bottom-left-radius: $border-radius;
|
|
34
|
+
}
|
|
35
|
+
|
|
36
|
+
&:first-child {
|
|
37
|
+
border-top-left-radius: $border-radius;
|
|
38
|
+
border-top-right-radius: $border-radius;
|
|
39
|
+
}
|
|
40
|
+
|
|
41
|
+
&:hover {
|
|
42
|
+
color: var(--color-fg-on-emphasis);
|
|
43
|
+
text-decoration: none;
|
|
44
|
+
background: var(--color-accent-emphasis);
|
|
45
|
+
|
|
46
|
+
small {
|
|
47
|
+
color: var(--color-fg-on-emphasis);
|
|
48
|
+
}
|
|
49
|
+
|
|
50
|
+
.octicon {
|
|
51
|
+
color: inherit !important;
|
|
52
|
+
}
|
|
53
|
+
}
|
|
54
|
+
|
|
55
|
+
&[aria-selected='true'],
|
|
56
|
+
&.navigation-focus {
|
|
57
|
+
color: var(--color-fg-on-emphasis);
|
|
58
|
+
text-decoration: none;
|
|
59
|
+
background: var(--color-accent-emphasis);
|
|
60
|
+
|
|
61
|
+
small {
|
|
62
|
+
color: var(--color-fg-on-emphasis);
|
|
63
|
+
}
|
|
64
|
+
|
|
65
|
+
.octicon {
|
|
66
|
+
color: inherit !important;
|
|
67
|
+
}
|
|
68
|
+
}
|
|
69
|
+
}
|
|
70
|
+
}
|
|
71
|
+
|
|
72
|
+
.suggester-container {
|
|
73
|
+
position: absolute;
|
|
74
|
+
top: 0;
|
|
75
|
+
left: 0;
|
|
76
|
+
z-index: 30;
|
|
77
|
+
}
|
|
78
|
+
|
|
79
|
+
// Responsive
|
|
80
|
+
|
|
81
|
+
.page-responsive {
|
|
82
|
+
@media (max-width: $width-sm) {
|
|
83
|
+
.suggester-container {
|
|
84
|
+
right: $spacer-2 !important;
|
|
85
|
+
left: $spacer-2 !important;
|
|
86
|
+
}
|
|
87
|
+
|
|
88
|
+
.suggester li {
|
|
89
|
+
padding: $spacer-2 $spacer-3;
|
|
90
|
+
}
|
|
91
|
+
}
|
|
92
|
+
}
|
package/avatars/README.md
CHANGED
|
@@ -1,37 +1,25 @@
|
|
|
1
|
-
|
|
1
|
+
---
|
|
2
|
+
bundle: "avatars"
|
|
3
|
+
generated: true
|
|
4
|
+
---
|
|
2
5
|
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
This repository is a module of the full [primer][primer] repository.
|
|
6
|
+
# Primer CSS: `avatars` bundle
|
|
6
7
|
|
|
7
8
|
## Usage
|
|
8
9
|
|
|
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:
|
|
10
11
|
|
|
11
12
|
```scss
|
|
12
|
-
@import "primer
|
|
13
|
+
@import "@primer/css/avatars/index.scss";
|
|
13
14
|
```
|
|
14
15
|
|
|
15
|
-
You can also import specific portions of the module by importing those partials from the `/lib/` folder. _Make sure you import any requirements along with the modules._
|
|
16
|
-
|
|
17
16
|
## Build
|
|
18
17
|
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
```
|
|
22
|
-
$ npm run build
|
|
23
|
-
```
|
|
24
|
-
|
|
25
|
-
## Documentation
|
|
26
|
-
|
|
27
|
-
Find further documentation at [primer.style/css/components/avatars](https://primer.style/css/components/avatars).
|
|
18
|
+
The `@primer/css` npm package includes a standalone CSS build of this module in `dist/avatars.css`.
|
|
28
19
|
|
|
29
20
|
## License
|
|
30
21
|
|
|
31
|
-
[MIT](
|
|
22
|
+
[MIT](https://github.com/primer/css/blob/main/LICENSE) © [GitHub](https://github.com/)
|
|
23
|
+
|
|
32
24
|
|
|
33
|
-
[
|
|
34
|
-
[docs]: https://primer.style/css
|
|
35
|
-
[npm]: https://www.npmjs.com/
|
|
36
|
-
[install-npm]: https://docs.npmjs.com/getting-started/installing-node
|
|
37
|
-
[sass]: http://sass-lang.com/
|
|
25
|
+
[scss]: https://sass-lang.com/documentation/syntax#scss
|
|
@@ -10,7 +10,8 @@
|
|
|
10
10
|
position: absolute;
|
|
11
11
|
right: -15%;
|
|
12
12
|
bottom: -9%;
|
|
13
|
-
background-color:
|
|
14
|
-
|
|
15
|
-
|
|
13
|
+
background-color: var(--color-canvas-default); // For transparent backgrounds
|
|
14
|
+
// stylelint-disable-next-line primer/borders
|
|
15
|
+
border-radius: $border-radius-1;
|
|
16
|
+
box-shadow: var(--color-avatar-child-shadow);
|
|
16
17
|
}
|
|
@@ -21,7 +21,7 @@
|
|
|
21
21
|
|
|
22
22
|
.AvatarStack-body {
|
|
23
23
|
display: flex;
|
|
24
|
-
background:
|
|
24
|
+
background: var(--color-canvas-default);
|
|
25
25
|
|
|
26
26
|
.avatar {
|
|
27
27
|
position: relative;
|
|
@@ -30,10 +30,12 @@
|
|
|
30
30
|
width: 20px;
|
|
31
31
|
height: 20px;
|
|
32
32
|
box-sizing: content-box;
|
|
33
|
+
// stylelint-disable-next-line primer/spacing
|
|
33
34
|
margin-right: -11px;
|
|
34
|
-
background-color:
|
|
35
|
-
border-right: $border-width $border-style
|
|
36
|
-
|
|
35
|
+
background-color: var(--color-canvas-default);
|
|
36
|
+
border-right: $border-width $border-style var(--color-canvas-default);
|
|
37
|
+
// stylelint-disable-next-line primer/borders
|
|
38
|
+
border-radius: $border-radius-1;
|
|
37
39
|
transition: margin 0.1s ease-in-out;
|
|
38
40
|
|
|
39
41
|
&:first-child {
|
|
@@ -47,7 +49,8 @@
|
|
|
47
49
|
|
|
48
50
|
// stylelint-disable selector-max-type
|
|
49
51
|
img {
|
|
50
|
-
|
|
52
|
+
// stylelint-disable-next-line primer/borders
|
|
53
|
+
border-radius: $border-radius-1;
|
|
51
54
|
}
|
|
52
55
|
// stylelint-enable selector-max-type
|
|
53
56
|
|
|
@@ -60,9 +63,11 @@
|
|
|
60
63
|
|
|
61
64
|
&:hover {
|
|
62
65
|
.avatar {
|
|
66
|
+
// stylelint-disable-next-line primer/spacing
|
|
63
67
|
margin-right: 3px;
|
|
64
68
|
}
|
|
65
69
|
|
|
70
|
+
// stylelint-disable-next-line selector-max-specificity
|
|
66
71
|
.avatar:nth-child(n+4) {
|
|
67
72
|
display: flex;
|
|
68
73
|
opacity: 1;
|
|
@@ -77,26 +82,27 @@
|
|
|
77
82
|
.avatar.avatar-more {
|
|
78
83
|
z-index: 1;
|
|
79
84
|
margin-right: 0;
|
|
80
|
-
background:
|
|
85
|
+
background: var(--color-canvas-subtle);
|
|
81
86
|
|
|
82
87
|
&::before,
|
|
83
88
|
&::after {
|
|
84
89
|
position: absolute;
|
|
85
90
|
display: block;
|
|
86
91
|
height: 20px;
|
|
87
|
-
content:
|
|
92
|
+
content: '';
|
|
93
|
+
// stylelint-disable-next-line primer/borders
|
|
88
94
|
border-radius: 2px;
|
|
89
|
-
outline: $border-width $border-style
|
|
95
|
+
outline: $border-width $border-style var(--color-canvas-default);
|
|
90
96
|
}
|
|
91
97
|
|
|
92
98
|
&::before {
|
|
93
99
|
width: 17px;
|
|
94
|
-
background:
|
|
100
|
+
background: var(--color-avatar-stack-fade-more);
|
|
95
101
|
}
|
|
96
102
|
|
|
97
103
|
&::after {
|
|
98
104
|
width: 14px;
|
|
99
|
-
background:
|
|
105
|
+
background: var(--color-avatar-stack-fade);
|
|
100
106
|
}
|
|
101
107
|
}
|
|
102
108
|
|
|
@@ -109,12 +115,13 @@
|
|
|
109
115
|
|
|
110
116
|
&:hover .avatar {
|
|
111
117
|
margin-right: 0;
|
|
118
|
+
// stylelint-disable-next-line primer/spacing
|
|
112
119
|
margin-left: 3px;
|
|
113
120
|
}
|
|
114
121
|
}
|
|
115
122
|
|
|
116
123
|
.avatar.avatar-more {
|
|
117
|
-
background:
|
|
124
|
+
background: var(--color-avatar-stack-fade);
|
|
118
125
|
|
|
119
126
|
&::before {
|
|
120
127
|
width: 5px;
|
|
@@ -122,14 +129,15 @@
|
|
|
122
129
|
|
|
123
130
|
&::after {
|
|
124
131
|
width: 2px;
|
|
125
|
-
background:
|
|
132
|
+
background: var(--color-canvas-subtle);
|
|
126
133
|
}
|
|
127
134
|
}
|
|
128
135
|
|
|
129
136
|
.avatar {
|
|
130
137
|
margin-right: 0;
|
|
138
|
+
// stylelint-disable-next-line primer/spacing
|
|
131
139
|
margin-left: -11px;
|
|
132
140
|
border-right: 0;
|
|
133
|
-
border-left: $border-width $border-style
|
|
141
|
+
border-left: $border-width $border-style var(--color-canvas-default);
|
|
134
142
|
}
|
|
135
143
|
}
|
package/avatars/avatar.scss
CHANGED
|
@@ -3,11 +3,13 @@
|
|
|
3
3
|
overflow: hidden; // Ensure page layout in Firefox should images fail to load
|
|
4
4
|
line-height: $lh-condensed-ultra;
|
|
5
5
|
vertical-align: middle;
|
|
6
|
-
|
|
6
|
+
background-color: var(--color-avatar-bg); // adds opaque bg to transparent avatars
|
|
7
|
+
border-radius: $border-radius;
|
|
8
|
+
flex-shrink: 0;
|
|
9
|
+
// stylelint-disable-next-line primer/box-shadow
|
|
10
|
+
box-shadow: 0 0 0 1px var(--color-avatar-border);
|
|
7
11
|
}
|
|
8
12
|
|
|
9
|
-
.avatar-small { border-radius: 2px; }
|
|
10
|
-
|
|
11
13
|
.avatar-link {
|
|
12
14
|
float: left;
|
|
13
15
|
line-height: $lh-condensed-ultra;
|
|
@@ -16,5 +18,31 @@
|
|
|
16
18
|
// User for example on /stars and /user for grids of avatars
|
|
17
19
|
.avatar-group-item {
|
|
18
20
|
display: inline-block;
|
|
21
|
+
// stylelint-disable-next-line primer/spacing
|
|
19
22
|
margin-bottom: 3px;
|
|
20
23
|
}
|
|
24
|
+
|
|
25
|
+
// Border radius
|
|
26
|
+
|
|
27
|
+
.avatar-1,
|
|
28
|
+
.avatar-2,
|
|
29
|
+
.avatar-small {
|
|
30
|
+
// stylelint-disable-next-line primer/borders
|
|
31
|
+
border-radius: $border-radius-1;
|
|
32
|
+
}
|
|
33
|
+
|
|
34
|
+
// Sizes
|
|
35
|
+
|
|
36
|
+
@mixin avatar-size( $size ) {
|
|
37
|
+
width: $size;
|
|
38
|
+
height: $size;
|
|
39
|
+
}
|
|
40
|
+
|
|
41
|
+
.avatar-1 { @include avatar-size( $size-1 ); }
|
|
42
|
+
.avatar-2 { @include avatar-size( $size-2 ); }
|
|
43
|
+
.avatar-3 { @include avatar-size( $size-3 ); }
|
|
44
|
+
.avatar-4 { @include avatar-size( $size-4 ); }
|
|
45
|
+
.avatar-5 { @include avatar-size( $size-5 ); }
|
|
46
|
+
.avatar-6 { @include avatar-size( $size-6 ); }
|
|
47
|
+
.avatar-7 { @include avatar-size( $size-7 ); }
|
|
48
|
+
.avatar-8 { @include avatar-size( $size-8 ); }
|
|
@@ -4,9 +4,9 @@
|
|
|
4
4
|
display: flex;
|
|
5
5
|
align-items: center;
|
|
6
6
|
justify-content: center;
|
|
7
|
-
background-color:
|
|
7
|
+
background-color: var(--color-canvas-default);
|
|
8
8
|
border-radius: 50%;
|
|
9
|
-
box-shadow:
|
|
9
|
+
box-shadow: var(--color-shadow-medium);
|
|
10
10
|
}
|
|
11
11
|
|
|
12
12
|
.CircleBadge-icon {
|
|
@@ -44,8 +44,9 @@
|
|
|
44
44
|
top: 50%;
|
|
45
45
|
left: 0;
|
|
46
46
|
width: 100%;
|
|
47
|
-
content:
|
|
48
|
-
|
|
47
|
+
content: '';
|
|
48
|
+
// stylelint-disable-next-line primer/borders
|
|
49
|
+
border-bottom: 2px dashed var(--color-border-default);
|
|
49
50
|
}
|
|
50
51
|
|
|
51
52
|
.CircleBadge {
|
package/avatars/index.scss
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
@import
|
|
1
|
+
@import '../support/index.scss';
|
|
2
2
|
|
|
3
3
|
// Avatars
|
|
4
|
-
@import
|
|
5
|
-
@import
|
|
6
|
-
@import
|
|
7
|
-
@import
|
|
4
|
+
@import './avatar.scss';
|
|
5
|
+
@import './avatar-parent-child.scss';
|
|
6
|
+
@import './avatar-stack.scss';
|
|
7
|
+
@import './circle-badge.scss';
|
package/base/README.md
CHANGED
|
@@ -1,36 +1,25 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
1
|
+
---
|
|
2
|
+
bundle: "base"
|
|
3
|
+
generated: true
|
|
4
|
+
---
|
|
3
5
|
|
|
4
|
-
|
|
6
|
+
# Primer CSS: `base` bundle
|
|
5
7
|
|
|
6
8
|
## Usage
|
|
7
9
|
|
|
8
|
-
|
|
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:
|
|
9
11
|
|
|
10
12
|
```scss
|
|
11
|
-
@import "primer
|
|
13
|
+
@import "@primer/css/base/index.scss";
|
|
12
14
|
```
|
|
13
15
|
|
|
14
|
-
You can also import specific portions of the module by importing those partials from the `/lib/` folder. _Make sure you import any requirements along with the modules._
|
|
15
|
-
|
|
16
16
|
## Build
|
|
17
17
|
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
```
|
|
21
|
-
$ npm run build
|
|
22
|
-
```
|
|
23
|
-
|
|
24
|
-
## Documentation
|
|
25
|
-
|
|
26
|
-
You can read more about base in the [docs][docs].
|
|
18
|
+
The `@primer/css` npm package includes a standalone CSS build of this module in `dist/base.css`.
|
|
27
19
|
|
|
28
20
|
## License
|
|
29
21
|
|
|
30
|
-
[MIT](
|
|
22
|
+
[MIT](https://github.com/primer/css/blob/main/LICENSE) © [GitHub](https://github.com/)
|
|
23
|
+
|
|
31
24
|
|
|
32
|
-
[
|
|
33
|
-
[docs]: https://primer.style/css
|
|
34
|
-
[npm]: https://www.npmjs.com/
|
|
35
|
-
[install-npm]: https://docs.npmjs.com/getting-started/installing-node
|
|
36
|
-
[sass]: http://sass-lang.com/
|
|
25
|
+
[scss]: https://sass-lang.com/documentation/syntax#scss
|
package/base/base.scss
CHANGED
|
@@ -16,12 +16,12 @@ body {
|
|
|
16
16
|
font-family: $body-font;
|
|
17
17
|
font-size: $body-font-size;
|
|
18
18
|
line-height: $body-line-height;
|
|
19
|
-
color:
|
|
20
|
-
background-color:
|
|
19
|
+
color: var(--color-fg-default);
|
|
20
|
+
background-color: var(--color-canvas-default);
|
|
21
21
|
}
|
|
22
22
|
|
|
23
23
|
a {
|
|
24
|
-
color:
|
|
24
|
+
color: var(--color-accent-fg);
|
|
25
25
|
text-decoration: none;
|
|
26
26
|
|
|
27
27
|
&:hover {
|
|
@@ -40,11 +40,12 @@ strong {
|
|
|
40
40
|
hr,
|
|
41
41
|
.rule {
|
|
42
42
|
height: 0;
|
|
43
|
+
// stylelint-disable-next-line primer/spacing
|
|
43
44
|
margin: 15px 0;
|
|
44
45
|
overflow: hidden;
|
|
45
46
|
background: transparent;
|
|
46
47
|
border: 0;
|
|
47
|
-
border-bottom:
|
|
48
|
+
border-bottom: $border-width $border-style var(--color-border-muted);
|
|
48
49
|
@include clearfix();
|
|
49
50
|
}
|
|
50
51
|
|
package/base/index.scss
CHANGED
|
@@ -1,5 +1,7 @@
|
|
|
1
|
-
@import
|
|
1
|
+
@import '../support/index.scss';
|
|
2
2
|
|
|
3
|
-
@import
|
|
4
|
-
@import
|
|
5
|
-
@import
|
|
3
|
+
@import './normalize.scss';
|
|
4
|
+
@import './base.scss';
|
|
5
|
+
@import './kbd.scss';
|
|
6
|
+
@import './typography-base.scss';
|
|
7
|
+
@import './octicons.scss';
|
package/base/kbd.scss
ADDED
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
// Keyboard shortcuts
|
|
2
|
+
// stylelint-disable selector-max-type
|
|
3
|
+
|
|
4
|
+
kbd {
|
|
5
|
+
display: inline-block;
|
|
6
|
+
// stylelint-disable-next-line primer/spacing
|
|
7
|
+
padding: ($spacer-1 - 1) ($spacer-1 + 1);
|
|
8
|
+
font: 11px $mono-font;
|
|
9
|
+
// stylelint-disable-next-line primer/typography
|
|
10
|
+
line-height: 10px;
|
|
11
|
+
color: var(--color-fg-default);
|
|
12
|
+
vertical-align: middle;
|
|
13
|
+
background-color: var(--color-canvas-subtle);
|
|
14
|
+
// stylelint-disable-next-line primer/borders
|
|
15
|
+
border: $border-style $border-width var(--color-neutral-muted);
|
|
16
|
+
border-bottom-color: var(--color-neutral-muted);
|
|
17
|
+
border-radius: $border-radius;
|
|
18
|
+
// stylelint-disable-next-line primer/box-shadow
|
|
19
|
+
box-shadow: inset 0 -1px 0 var(--color-neutral-muted);
|
|
20
|
+
}
|
package/base/normalize.scss
CHANGED
|
@@ -162,7 +162,7 @@ h1 {
|
|
|
162
162
|
|
|
163
163
|
mark {
|
|
164
164
|
background-color: #ff0;
|
|
165
|
-
color:
|
|
165
|
+
color: var(--color-text-primary);
|
|
166
166
|
}
|
|
167
167
|
|
|
168
168
|
/**
|
|
@@ -234,7 +234,7 @@ samp {
|
|
|
234
234
|
*/
|
|
235
235
|
|
|
236
236
|
figure {
|
|
237
|
-
margin: 1em
|
|
237
|
+
margin: 1em $spacer-6;
|
|
238
238
|
}
|
|
239
239
|
|
|
240
240
|
/**
|
|
@@ -269,7 +269,7 @@ textarea {
|
|
|
269
269
|
*/
|
|
270
270
|
|
|
271
271
|
optgroup {
|
|
272
|
-
font-weight: bold;
|
|
272
|
+
font-weight: $font-weight-bold;
|
|
273
273
|
}
|
|
274
274
|
|
|
275
275
|
/**
|
|
@@ -333,9 +333,9 @@ button:-moz-focusring,
|
|
|
333
333
|
*/
|
|
334
334
|
|
|
335
335
|
fieldset {
|
|
336
|
-
border:
|
|
336
|
+
border: $border-width $border-style #c0c0c0;
|
|
337
337
|
margin: 0 2px;
|
|
338
|
-
padding: 0.35em 0.625em
|
|
338
|
+
padding: 0.35em 0.625em $em-spacer-6;
|
|
339
339
|
}
|
|
340
340
|
|
|
341
341
|
/**
|
package/blankslate/README.md
CHANGED
|
@@ -1,37 +1,25 @@
|
|
|
1
|
-
|
|
1
|
+
---
|
|
2
|
+
bundle: "blankslate"
|
|
3
|
+
generated: true
|
|
4
|
+
---
|
|
2
5
|
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
This repository is a module of the full [primer][primer] repository.
|
|
6
|
+
# Primer CSS: `blankslate` bundle
|
|
6
7
|
|
|
7
8
|
## Usage
|
|
8
9
|
|
|
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:
|
|
10
11
|
|
|
11
12
|
```scss
|
|
12
|
-
@import "primer
|
|
13
|
+
@import "@primer/css/blankslate/index.scss";
|
|
13
14
|
```
|
|
14
15
|
|
|
15
|
-
You can also import specific portions of the module by importing those partials from the `/lib/` folder. _Make sure you import any requirements along with the modules._
|
|
16
|
-
|
|
17
16
|
## Build
|
|
18
17
|
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
```
|
|
22
|
-
$ npm run build
|
|
23
|
-
```
|
|
24
|
-
|
|
25
|
-
## Documentation
|
|
26
|
-
|
|
27
|
-
Find further documentation at [primer.style/css/components/blankslate](https://primer.style/css/components/blankslate).
|
|
18
|
+
The `@primer/css` npm package includes a standalone CSS build of this module in `dist/blankslate.css`.
|
|
28
19
|
|
|
29
20
|
## License
|
|
30
21
|
|
|
31
|
-
[MIT](
|
|
22
|
+
[MIT](https://github.com/primer/css/blob/main/LICENSE) © [GitHub](https://github.com/)
|
|
23
|
+
|
|
32
24
|
|
|
33
|
-
[
|
|
34
|
-
[docs]: https://primer.style/css
|
|
35
|
-
[npm]: https://www.npmjs.com/
|
|
36
|
-
[install-npm]: https://docs.npmjs.com/getting-started/installing-node
|
|
37
|
-
[sass]: http://sass-lang.com/
|
|
25
|
+
[scss]: https://sass-lang.com/documentation/syntax#scss
|