@primer/css 0.0.0-1f49d76 → 0.0.0-20211010195643
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 +858 -133
- package/CONTRIBUTING.md +85 -0
- package/DEVELOP.md +4 -39
- package/LICENSE +1 -1
- package/README.md +13 -15
- package/RELEASING.md +5 -76
- package/actionlist/action-list-item-divider.scss +42 -0
- package/actionlist/action-list-item.scss +439 -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 +1 -1
- package/alerts/flash.scss +32 -26
- package/alerts/index.scss +2 -2
- package/autocomplete/README.md +1 -1
- package/autocomplete/autocomplete.scss +18 -8
- package/autocomplete/index.scss +3 -3
- package/autocomplete/suggester.scss +27 -10
- package/avatars/README.md +1 -1
- package/avatars/avatar-parent-child.scss +2 -3
- package/avatars/avatar-stack.scss +12 -14
- package/avatars/avatar.scss +4 -0
- package/avatars/circle-badge.scss +4 -4
- package/avatars/index.scss +5 -5
- package/base/README.md +1 -1
- package/base/base.scss +39 -7
- package/base/index.scss +6 -5
- package/base/kbd.scss +5 -6
- package/base/normalize.scss +13 -53
- package/base/octicons.scss +6 -0
- package/blankslate/README.md +1 -1
- package/blankslate/blankslate.scss +7 -4
- package/blankslate/index.scss +2 -2
- package/box/README.md +1 -1
- package/box/box.scss +38 -38
- package/box/index.scss +2 -2
- package/branch-name/README.md +1 -1
- package/branch-name/branch-name.scss +15 -10
- package/branch-name/index.scss +2 -2
- package/breadcrumb/README.md +1 -1
- package/breadcrumb/breadcrumb.scss +12 -7
- package/breadcrumb/index.scss +2 -2
- package/buttons/README.md +1 -1
- package/buttons/button.scss +115 -121
- package/buttons/index.scss +4 -4
- package/buttons/misc.scss +52 -41
- 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 +1 -1
- package/core/index.scss +17 -16
- package/deprecations.js +18 -200
- 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 +1 -2
- package/dist/autocomplete.css.map +1 -1
- package/dist/autocomplete.js +1 -1
- 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 +1 -2
- package/dist/core.css.map +1 -1
- package/dist/core.js +1 -1
- package/dist/deprecations.json +534 -571
- package/dist/dropdown.css +1 -2
- package/dist/dropdown.css.map +1 -1
- package/dist/dropdown.js +1 -1
- package/dist/forms.css +1 -2
- package/dist/forms.css.map +1 -1
- package/dist/forms.js +1 -1
- package/dist/header.css +1 -2
- package/dist/header.css.map +1 -1
- package/dist/header.js +1 -1
- 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 +0 -1
- package/dist/loaders.css.map +1 -1
- package/dist/loaders.js +1 -1
- 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 +1 -2
- package/dist/marketing.css.map +1 -1
- package/dist/marketing.js +1 -1
- package/dist/meta.json +314 -369
- 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 +4 -5
- package/dist/primer.css.map +1 -1
- package/dist/primer.js +1 -1
- package/dist/product.css +1 -2
- 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 +1 -2
- package/dist/select-menu.css.map +1 -1
- package/dist/select-menu.js +1 -1
- package/dist/stats/actionlist.json +1 -0
- 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/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 -1
- package/dist/stats/forms.json +1 -1
- package/dist/stats/header.json +1 -1
- 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 -1
- 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 -1
- 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 -1
- package/dist/stats/toasts.json +1 -1
- 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 +1 -2
- package/dist/timeline.css.map +1 -1
- package/dist/timeline.js +1 -1
- package/dist/toasts.css +1 -2
- package/dist/toasts.css.map +1 -1
- package/dist/toasts.js +1 -1
- 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 +630 -2274
- package/dropdown/README.md +1 -1
- package/dropdown/dropdown.scss +32 -88
- package/dropdown/index.scss +2 -2
- package/forms/README.md +1 -1
- package/forms/form-control.scss +39 -57
- package/forms/form-group.scss +31 -48
- package/forms/form-select.scss +12 -4
- package/forms/form-validation.scss +27 -32
- package/forms/index.scss +7 -7
- package/forms/input-group.scss +7 -0
- package/forms/radio-group.scss +22 -3
- package/header/README.md +1 -1
- package/header/header.scss +16 -6
- package/header/index.scss +2 -2
- package/index.scss +4 -1
- package/labels/README.md +1 -1
- package/labels/counters.scss +10 -11
- package/labels/diffstat.scss +8 -8
- package/labels/index.scss +7 -7
- package/labels/labels.scss +30 -41
- package/labels/states.scss +17 -16
- package/layout/README.md +1 -1
- package/layout/grid-offset.scss +11 -11
- package/layout/grid.scss +23 -23
- package/layout/index.scss +7 -4
- package/layout/layout.scss +185 -0
- package/layout/mixins.scss +79 -0
- package/{README.template.md → links/README.md} +5 -5
- package/links/index.scss +3 -0
- package/links/link.scss +55 -0
- package/loaders/README.md +1 -1
- package/loaders/index.scss +2 -2
- package/loaders/loaders.scss +1 -1
- package/markdown/README.md +1 -1
- package/markdown/blob-csv.scss +2 -2
- package/markdown/code.scss +7 -5
- package/markdown/footnotes.scss +37 -0
- package/markdown/headings.scss +6 -4
- package/markdown/images.scss +3 -4
- package/markdown/index.scss +9 -8
- package/markdown/lists.scss +18 -5
- package/markdown/markdown-body.scss +14 -9
- package/markdown/tables.scss +7 -7
- package/marketing/README.md +1 -1
- package/marketing/buttons/button.scss +81 -75
- package/marketing/index.scss +4 -4
- package/marketing/support/index.scss +1 -0
- package/marketing/support/mixins.scss +66 -0
- package/marketing/support/variables.scss +109 -58
- package/marketing/type/typography.scss +100 -62
- package/marketing/utilities/animations.scss +9 -0
- package/marketing/utilities/index.scss +2 -3
- package/marketing/utilities/layout.scss +31 -10
- package/navigation/README.md +1 -1
- package/navigation/filter-list.scss +8 -9
- package/navigation/index.scss +7 -7
- package/navigation/menu.scss +22 -23
- package/navigation/sidenav.scss +19 -25
- package/navigation/subnav.scss +9 -13
- package/navigation/tabnav.scss +20 -10
- package/navigation/underline-nav.scss +19 -14
- package/package.json +75 -63
- package/pagination/README.md +1 -1
- package/pagination/index.scss +2 -2
- package/pagination/pagination.scss +8 -8
- package/popover/README.md +1 -1
- package/popover/index.scss +2 -2
- package/popover/popover.scss +14 -13
- package/postcss.config.cjs +22 -0
- package/prettier.config.cjs +1 -0
- package/product/README.md +1 -1
- package/product/index.scss +17 -17
- package/progress/README.md +1 -1
- package/progress/index.scss +2 -2
- package/progress/progress.scss +3 -4
- package/select-menu/README.md +1 -1
- package/select-menu/index.scss +2 -2
- package/select-menu/select-menu.scss +44 -46
- package/{stylelint.config.js → stylelint.config.cjs} +5 -6
- package/subhead/README.md +1 -1
- package/subhead/index.scss +2 -2
- package/subhead/subhead.scss +9 -3
- package/support/README.md +1 -1
- package/support/index.scss +7 -8
- package/support/mixins/color-modes.scss +106 -0
- package/support/mixins/misc.scss +19 -13
- package/support/variables/layout.scss +68 -9
- package/support/variables/misc.scss +2 -27
- package/support/variables/typography.scss +2 -1
- package/table-object/README.md +1 -1
- package/table-object/index.scss +1 -1
- package/timeline/README.md +1 -1
- package/timeline/index.scss +2 -2
- package/timeline/timeline-item.scss +18 -18
- package/toasts/README.md +1 -1
- package/toasts/index.scss +2 -2
- package/toasts/toasts.scss +45 -24
- package/tooltips/README.md +1 -1
- package/tooltips/index.scss +2 -2
- package/tooltips/tooltips.scss +8 -12
- package/truncate/README.md +1 -1
- package/truncate/index.scss +2 -1
- package/truncate/truncate.scss +30 -0
- package/utilities/README.md +1 -1
- package/utilities/animations.scss +14 -1
- package/utilities/borders.scss +5 -50
- package/utilities/box-shadow.scss +8 -8
- package/utilities/colors.scss +71 -107
- package/utilities/details.scss +18 -6
- package/utilities/flexbox.scss +4 -3
- package/utilities/index.scss +12 -12
- package/utilities/layout.scss +23 -14
- package/utilities/margin.scss +34 -16
- package/utilities/padding.scss +13 -8
- package/utilities/typography.scss +5 -15
- package/.browserslistrc +0 -6
- package/.eslintrc.json +0 -13
- package/.nowignore +0 -5
- package/MIGRATING.md +0 -74
- package/bin/primer-migrate +0 -86
- package/dist/marketing-support.css.map +0 -1
- package/dist/support.css.map +0 -1
- package/fonts/Inter-Bold.woff +0 -0
- package/fonts/Inter-Medium.woff +0 -0
- package/fonts/Inter-Regular.woff +0 -0
- package/marketing/utilities/margin.scss +0 -17
- package/marketing/utilities/padding.scss +0 -24
- package/postcss.config.js +0 -14
- package/prettier.config.js +0 -1
- package/release.config.js +0 -4
- package/support/mixins/buttons.scss +0 -172
- package/support/variables/color-system.scss +0 -243
- package/support/variables/colors.scss +0 -55
package/CONTRIBUTING.md
ADDED
|
@@ -0,0 +1,85 @@
|
|
|
1
|
+
## Contributing
|
|
2
|
+
|
|
3
|
+
Hi there! We're thrilled that you'd like to contribute to this project. Your help is essential for keeping it great.
|
|
4
|
+
|
|
5
|
+
## Using the issue tracker
|
|
6
|
+
|
|
7
|
+
The issue tracker is the preferred channel for [bug reports](#bug-reports), [features requests](#feature-requests) and [submitting pull requests](#pull-requests), but please respect the following restrictions:
|
|
8
|
+
|
|
9
|
+
* Please **do not** use the issue tracker for personal support requests.
|
|
10
|
+
* Please **do not** derail or troll issues. Keep the discussion on topic and respect the opinions of others.
|
|
11
|
+
|
|
12
|
+
## Bug reports
|
|
13
|
+
|
|
14
|
+
A bug is a _demonstrable problem_ that is caused by the code in the repository. Good bug reports are extremely helpful, so thanks!
|
|
15
|
+
|
|
16
|
+
Guidelines for bug reports:
|
|
17
|
+
|
|
18
|
+
1. **Validate and lint your code** — [validate your HTML](http://html5.validator.nu) to ensure your problem isn't caused by a simple error in your own code.
|
|
19
|
+
|
|
20
|
+
2. **Use the GitHub issue search** — check if the issue has already been reported.
|
|
21
|
+
|
|
22
|
+
3. **Check if the issue has been fixed** — try to reproduce it using the latest `main` branch in the repository.
|
|
23
|
+
|
|
24
|
+
4. **Isolate the problem** — ideally create a [reduced test case](https://css-tricks.com/reduced-test-cases/) and a live example.
|
|
25
|
+
|
|
26
|
+
A good bug report shouldn't leave others needing to chase you up for more information. Please try to be as detailed as possible in your report. What is your environment? What steps will reproduce the issue? What browser(s) and OS experience the problem? Do other browsers show the bug differently? What would you expect to be the outcome? All these details will help people to fix any potential bugs.
|
|
27
|
+
|
|
28
|
+
Example:
|
|
29
|
+
|
|
30
|
+
> Short and descriptive example bug report title
|
|
31
|
+
>
|
|
32
|
+
> A summary of the issue and the browser/OS environment in which it occurs. If
|
|
33
|
+
> suitable, include the steps required to reproduce the bug.
|
|
34
|
+
>
|
|
35
|
+
> 1. This is the first step
|
|
36
|
+
> 2. This is the second step
|
|
37
|
+
> 3. Further steps, etc.
|
|
38
|
+
>
|
|
39
|
+
> `<url>` - a link to the reduced test case
|
|
40
|
+
>
|
|
41
|
+
> Any other information you want to share that is relevant to the issue being reported. This might include the lines of code that you have identified as causing the bug, and potential solutions (and your opinions on their merits).
|
|
42
|
+
|
|
43
|
+
## Feature requests
|
|
44
|
+
|
|
45
|
+
Feature requests are welcome, but take a moment to find out whether your idea fits with the scope and aims of the project. It's up to *you* to make a strong case to convince the project's developers of the merits of this feature. Please provide as much detail and context as possible.
|
|
46
|
+
|
|
47
|
+
## Pull requests
|
|
48
|
+
|
|
49
|
+
Good pull requests—patches, improvements, new features—are a fantastic help. They should remain focused in scope and avoid containing unrelated commits.
|
|
50
|
+
|
|
51
|
+
**Please ask first** before embarking on any significant pull request (e.g. implementing features, refactoring code, porting to a different language), otherwise you risk spending a lot of time working on something that the project's developers might not want to merge into the project.
|
|
52
|
+
|
|
53
|
+
### Updating Primer CSS
|
|
54
|
+
|
|
55
|
+
Anyone can open a pull request on Primer CSS. You do not need to work at GitHub or be a member of the org to open a pull request.
|
|
56
|
+
|
|
57
|
+
1. Fork and clone [this repository](https://github.com/primer/css).
|
|
58
|
+
2. Configure and install the dependencies: `npm install`
|
|
59
|
+
3. Create a new branch from main `git checkout -b my-branch-name`
|
|
60
|
+
4. Make your changes and commit them.
|
|
61
|
+
5. Push your branch and open a pull request. Add a comment describing your proposed changes and request a review from `@primer/css-reviewers`.
|
|
62
|
+
6. Wait for CI tests to finish.
|
|
63
|
+
- If the tests pass, you should see a status check telling you which alpha version of `@primer/css` you can install with npm to test your work in other projects.
|
|
64
|
+
- If the tests fail, review the logs and address any issues.
|
|
65
|
+
- If the builds fail for any other reason (as they occasionally do), they may need to be manually restarted.
|
|
66
|
+
7. When CI tests pass, a new npm alpha release will be posted under the CI checks, you can use this npm version for testing in your project or with a GitHub site if you are staff.
|
|
67
|
+
8. Pat yourself on the back and wait for your pull request to be reviewed.
|
|
68
|
+
|
|
69
|
+
Here are a few things you can do that will increase the likelihood of your pull request being accepted:
|
|
70
|
+
|
|
71
|
+
- Keep your change as focused as possible. If there are multiple changes you would like to make that are not dependent upon each other, consider submitting them as separate pull requests.
|
|
72
|
+
- Write a [good commit message](http://tbaggery.com/2008/04/19/a-note-about-git-commit-messages.html).
|
|
73
|
+
|
|
74
|
+
## Releasing a new Primer CSS version
|
|
75
|
+
See [RELEASING.md](RELEASING.md) for our release process.
|
|
76
|
+
|
|
77
|
+
## Resources
|
|
78
|
+
|
|
79
|
+
- [Contributing to Open Source on GitHub](https://guides.github.com/activities/contributing-to-open-source/)
|
|
80
|
+
- [Using Pull Requests](https://help.github.com/articles/using-pull-requests/)
|
|
81
|
+
- [GitHub Help](https://help.github.com)
|
|
82
|
+
|
|
83
|
+
[fork]: https://github.com/primer/css/fork
|
|
84
|
+
[pr]: https://github.com/primer/css/compare
|
|
85
|
+
[style]: https://primer.style/css/principles
|
package/DEVELOP.md
CHANGED
|
@@ -22,16 +22,6 @@ Here's what you need to know about how the files are structured in both git and
|
|
|
22
22
|
* All bundle interdependencies within Primer CSS are defined as relative imports (e.g. with `../`), so everything should work fine as long as the `@primer/css` directory is in one of your Sass include paths (i.e. `node_modules`).
|
|
23
23
|
|
|
24
24
|
|
|
25
|
-
## Workflow
|
|
26
|
-
The typical Primer workflow looks something like this:
|
|
27
|
-
|
|
28
|
-
1. `npm install` to install the development dependencies.
|
|
29
|
-
1. [Start Storybook](#storybook)
|
|
30
|
-
1. Navigate to the module you're working on and modify the SCSS and/or markdown files.
|
|
31
|
-
1. Test your changes in Storybook.
|
|
32
|
-
1. Push your work to a new branch.
|
|
33
|
-
1. Request a review from one of the Primer "core" team members.
|
|
34
|
-
|
|
35
25
|
## Install
|
|
36
26
|
Run `npm install` to install the npm dependencies.
|
|
37
27
|
|
|
@@ -45,53 +35,28 @@ npm start
|
|
|
45
35
|
Then visit http://localhost:8000 to view the site.
|
|
46
36
|
|
|
47
37
|
### The docs directory
|
|
48
|
-
The [docs directory](
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
### URL tests
|
|
52
|
-
We have a script that catches inadvertent URL changes caused by renaming or deleting Markdown docs:
|
|
53
|
-
|
|
54
|
-
```sh
|
|
55
|
-
npm run test-urls
|
|
56
|
-
```
|
|
38
|
+
The [docs directory](../docs/) contains all of the documentation files in our docs site. Files are nested in the `/content` folder.
|
|
57
39
|
|
|
58
|
-
This script includes some exceptions for URLs that have been intentionally moved or removed in the process of moving away from the [GitHub Style Guide](https://styleguide.github.com/primer/), and which you will need to modify if you rename or remove either Markdown docs or their `path` frontmatter. See [#641](https://github.com/primer/css/pull/641) for more information.
|
|
59
|
-
|
|
60
|
-
## Storybook
|
|
61
|
-
To borrow a [metaphor from Brad Frost](http://bradfrost.com/blog/post/the-workshop-and-the-storefront/), the [docs site](#docs-site) is Primer CSS's storefront, and [Storybook] is its workshop.
|
|
62
|
-
|
|
63
|
-
Our Storybook setup allows you to view every HTML code block in Primer CSS's Markdown docs in isolation. To get started, run the Storybook server with:
|
|
64
|
-
|
|
65
|
-
```sh
|
|
66
|
-
npm run start-storybook
|
|
67
|
-
```
|
|
68
|
-
|
|
69
|
-
This should open up the site in your browser (if not, navigate to `http://localhost:8001`).
|
|
70
40
|
|
|
71
41
|
### Code blocks
|
|
72
42
|
All `html` fenced code blocks in `src/**/*.md` will be rendered as stories and listed under the relevant module's name in the left-hand nav. File changes should trigger a live reload automatically (after a brief delay).
|
|
73
43
|
|
|
74
|
-
|
|
75
44
|
## Scripts
|
|
76
45
|
Our [`package.json`](package.json) houses a collection of [run-scripts] that we use to maintain, test, build, and publish Primer CSS. Run `npm run <script>` with any of the following values for `<script>`:
|
|
77
46
|
|
|
78
|
-
* `fresh` does a "fresh" npm install (like `npm install -f`)
|
|
79
47
|
* `dist` runs `script/dist`, which creates CSS bundles of all the `index.scss` files in `src/`.
|
|
80
48
|
* `check-links` runs a link checker on your local development server (`localhost:3000`, started with `npm start`).
|
|
81
|
-
* `
|
|
82
|
-
* `
|
|
83
|
-
* `lint-js` lints the JavaScript source files.
|
|
49
|
+
* `stylelint` lints the CSS source files.
|
|
50
|
+
* `eslint` lints the JavaScript source files.
|
|
84
51
|
* `now-build` and `now-start` are run on [Now] to build and start the docs site server. `now-test` runs them both in order.
|
|
85
52
|
* `start` runs the documentation site locally (alias: `dev`).
|
|
86
|
-
* `test
|
|
87
|
-
* `test-migrate` tests the [`primer-migrate`](MIGRATING.md#primer-migrate) command line utility.
|
|
53
|
+
* `test` runs our test suite.
|
|
88
54
|
|
|
89
55
|
The above list may not always be up-to-date. You can list all of the available scripts by calling `npm run` with no other arguments.
|
|
90
56
|
|
|
91
57
|
|
|
92
58
|
[@primer/css]: https://www.npmjs.com/package/@primer/css
|
|
93
59
|
[run-scripts]: https://docs.npmjs.com/cli/run-script
|
|
94
|
-
[storybook]: https://storybook.js.org/
|
|
95
60
|
[now]: https://zeit.co/now
|
|
96
61
|
[npm]: https://www.npmjs.com/
|
|
97
62
|
[npx]: https://www.npmjs.com/package/npx
|
package/LICENSE
CHANGED
package/README.md
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
<p align="center">
|
|
2
|
-
<img width="300px" src="./
|
|
2
|
+
<img width="300px" src="./docs/src/readme.png">
|
|
3
3
|
</p>
|
|
4
4
|
|
|
5
5
|
<h1 align="center">Primer CSS</h1>
|
|
@@ -10,28 +10,29 @@
|
|
|
10
10
|
<a aria-label="npm package" href="https://www.npmjs.com/package/@primer/css">
|
|
11
11
|
<img alt="" src="https://img.shields.io/npm/v/@primer/css.svg">
|
|
12
12
|
</a>
|
|
13
|
+
<a aria-label="build status" href="https://github.com/primer/css/actions/workflows/ci.yml">
|
|
14
|
+
<img alt="" src="https://github.com/primer/css/actions/workflows/ci.yml/badge.svg">
|
|
15
|
+
</a>
|
|
13
16
|
<a aria-label="contributors graph" href="https://github.com/primer/css/graphs/contributors">
|
|
14
17
|
<img src="https://img.shields.io/github/contributors/primer/css.svg">
|
|
15
18
|
</a>
|
|
16
|
-
<a aria-label="last commit" href="https://github.com/primer/css/commits/
|
|
19
|
+
<a aria-label="last commit" href="https://github.com/primer/css/commits/main">
|
|
17
20
|
<img alt="" src="https://img.shields.io/github/last-commit/primer/css.svg">
|
|
18
21
|
</a>
|
|
19
|
-
<a aria-label="
|
|
20
|
-
<img alt="" src="https://withspectrum.github.io/badge/badge.svg">
|
|
21
|
-
</a>
|
|
22
|
-
<a aria-label="license" href="https://github.com/primer/css/blob/master/LICENSE">
|
|
22
|
+
<a aria-label="license" href="https://github.com/primer/css/blob/main/LICENSE">
|
|
23
23
|
<img src="https://img.shields.io/github/license/primer/css.svg" alt="">
|
|
24
24
|
</a>
|
|
25
25
|
</p>
|
|
26
26
|
|
|
27
|
-
##
|
|
28
|
-
|
|
27
|
+
## Documentation
|
|
28
|
+
|
|
29
|
+
Our documentation site lives at [primer.style/css](https://primer.style/css). You'll be able to find detailed documentation on getting started, all of the components, our theme, our principles, and more.
|
|
29
30
|
|
|
30
31
|
## Install
|
|
31
32
|
This repository is distributed with [npm]. After [installing npm][install-npm], you can install `@primer/css` with this command:
|
|
32
33
|
|
|
33
34
|
```sh
|
|
34
|
-
|
|
35
|
+
npm install --save @primer/css
|
|
35
36
|
```
|
|
36
37
|
|
|
37
38
|
## Usage
|
|
@@ -50,13 +51,10 @@ You can import individual Primer modules directly from the `@primer/css` package
|
|
|
50
51
|
```
|
|
51
52
|
|
|
52
53
|
## Development
|
|
53
|
-
See [DEVELOP.md](
|
|
54
|
+
See [DEVELOP.md](DEVELOP.md) for development docs.
|
|
54
55
|
|
|
55
56
|
## Releasing (for GitHub staff)
|
|
56
|
-
You can find docs about our release process in [RELEASING.md](
|
|
57
|
-
|
|
58
|
-
## Documentation
|
|
59
|
-
The [Primer CSS docs site](https://primer.style/css) is deployed from this repo with [primer/deploy](https://github.com/primer/deploy). See [the development docs](DEVELOP.md#docs-site) for more info.
|
|
57
|
+
You can find docs about our release process in [RELEASING.md](RELEASING.md).
|
|
60
58
|
|
|
61
59
|
## License
|
|
62
60
|
|
|
@@ -65,5 +63,5 @@ The [Primer CSS docs site](https://primer.style/css) is deployed from this repo
|
|
|
65
63
|
|
|
66
64
|
[install-npm]: https://docs.npmjs.com/getting-started/installing-node
|
|
67
65
|
[npm]: https://www.npmjs.com/
|
|
68
|
-
[primer]: https://primer.style
|
|
66
|
+
[primer]: https://primer.style/
|
|
69
67
|
[sass]: http://sass-lang.com/
|
package/RELEASING.md
CHANGED
|
@@ -2,66 +2,9 @@
|
|
|
2
2
|
|
|
3
3
|
## Prepare the release (in `primer/css`)
|
|
4
4
|
|
|
5
|
-
|
|
6
|
-
](https://github.com/primer/css/projects/2#column-4482699) or ask your team members in Slack.
|
|
7
|
-
|
|
8
|
-
1. Create a new release branch from `master` and name it `release-<version>`.
|
|
9
|
-
|
|
10
|
-
1. Run [`npm version <version>`](https://docs.npmjs.com/cli/version) to update the `version` field in both `package.json` and `package-lock.json`.
|
|
11
|
-
|
|
12
|
-
1. Create a new PR for the `release-<version>` branch. Please use the following template for the PR description, linking to the relevant issues and/or pull requests for each change. The changelog gets generated automatically :
|
|
13
|
-
|
|
14
|
-
```md
|
|
15
|
-
# Primer CSS [Major|Minor|Patch] Release
|
|
16
|
-
|
|
17
|
-
Version: 📦 **`0.0.0`**
|
|
18
|
-
Approximate release date: 📆 **DD/MM/YY**
|
|
19
|
-
Changes: 🎉 [All merged PRs](https://github.com/primer/css/pulls?q=is%3Apr+is%3Amerged+base%3Arelease-0.0.0)
|
|
20
|
-
|
|
21
|
-
---
|
|
22
|
-
|
|
23
|
-
### :boom: Breaking Change
|
|
24
|
-
- [ ] Description #
|
|
25
|
-
|
|
26
|
-
### :rocket: Enhancement
|
|
27
|
-
- [ ] Description #
|
|
28
|
-
|
|
29
|
-
### :bug: Bug Fix
|
|
30
|
-
- [ ] Description #
|
|
31
|
-
|
|
32
|
-
### :nail_care: Polish
|
|
33
|
-
- [ ] Description #
|
|
34
|
-
|
|
35
|
-
### :memo: Documentation
|
|
36
|
-
- [ ] Description #
|
|
37
|
-
|
|
38
|
-
### :house: Internal
|
|
39
|
-
- [ ] Description #
|
|
40
|
-
|
|
41
|
-
---
|
|
42
|
-
|
|
43
|
-
### Ship checklist
|
|
44
|
-
|
|
45
|
-
- [x] Update the `version` field in `package.json`
|
|
46
|
-
- [ ] Update `CHANGELOG.md`
|
|
47
|
-
- [ ] Test the release candidate version with `github/github`
|
|
48
|
-
- [ ] Merge this PR and [create a new release](https://github.com/primer/css/releases/new)
|
|
49
|
-
- [ ] Update `github/github`
|
|
50
|
-
- [ ] Tell the world (Slack, Twitter, Team post)
|
|
51
|
-
|
|
52
|
-
For more details, see [RELEASING.md](https://github.com/primer/css/blob/master/RELEASING.md).
|
|
53
|
-
|
|
54
|
-
/cc @primer/ds-core
|
|
55
|
-
```
|
|
56
|
-
|
|
57
|
-
1. Start merging existing PRs into the release branch. Note: You have to change the base branch from `master` to the `release-<version>` branch before merging.
|
|
58
|
-
|
|
59
|
-
1. Update `CHANGELOG.md` and the PR description. **Tip**: You can copy&paste the changelog from `Checks > changelog > all > changelog`. It gets generated based on adding the `Tag` labels to PRs.
|
|
60
|
-
|
|
61
|
-
1. Wait for your checks to pass, and take note of the version that [primer/publish] lists in your status checks.
|
|
62
|
-
|
|
63
|
-
**Tip**: The release candidate version will always be `<version>-rc.<sha>`, where `<version>` comes from the branch name and `<sha>` is the 7-character commit SHA.
|
|
5
|
+
The release process is automated by [changesets]. After you familiarize yourself with how they work. We use an [action workflow integrated in ci](https://github.com/atlassian/changesets#integrating-with-ci).
|
|
64
6
|
|
|
7
|
+
1. Visit the pull requests page and find the [latest Release tracking pr from primer-css](https://github.com/primer/css/pulls/primer-css). If there isn't one, we'll need to build the next release by merging in PRs with changeset files.
|
|
65
8
|
|
|
66
9
|
## Test the release candidate (in `github/github`):
|
|
67
10
|
|
|
@@ -86,13 +29,9 @@
|
|
|
86
29
|
|
|
87
30
|
1. If the release PR got approved and you've done necessary testing, merge it.
|
|
88
31
|
|
|
89
|
-
After tests run, the docs site will be deployed and `@primer/css` will be published with your changes to the `latest` dist-tag. You can check [npm](https://www.npmjs.com/package/@primer/css?activeTab=versions) to see if
|
|
90
|
-
|
|
91
|
-
1. [Create a new release](https://github.com/primer/primer/releases/new) with tag `v<version>`.
|
|
32
|
+
After tests run, the docs site will be deployed and `@primer/css` will be published with your changes to the `latest` dist-tag. You can check [npm](https://www.npmjs.com/package/@primer/css?activeTab=versions) to see if actions has finished.
|
|
92
33
|
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
1. Publish 🎉
|
|
34
|
+
2. done 🎉
|
|
96
35
|
|
|
97
36
|
|
|
98
37
|
## Update github.com (in `github/github`):
|
|
@@ -109,15 +48,5 @@
|
|
|
109
48
|
|
|
110
49
|
1. Deploy! :rocket:
|
|
111
50
|
|
|
112
|
-
|
|
113
|
-
### Publish the release
|
|
114
|
-
|
|
115
|
-
1. [Create a new release](https://github.com/primer/css/releases/new) with tag `v<version>`.
|
|
116
|
-
|
|
117
|
-
2. Copy the changes from the [CHANGELOG] and paste them into the release notes.
|
|
118
|
-
|
|
119
|
-
3. Publish 🎉
|
|
120
|
-
|
|
121
|
-
|
|
122
51
|
[changelog]: ../CHANGELOG.md
|
|
123
|
-
[
|
|
52
|
+
[changesets]: https://github.com/atlassian/changesets
|
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
// emtpy divider
|
|
2
|
+
|
|
3
|
+
.ActionList-sectionDivider {
|
|
4
|
+
// has children
|
|
5
|
+
&:not(:empty) {
|
|
6
|
+
display: flex;
|
|
7
|
+
// stylelint-disable-next-line primer/spacing
|
|
8
|
+
padding: ($spacer-1 * 1.5) $spacer-2;
|
|
9
|
+
font-size: $font-size-small;
|
|
10
|
+
font-weight: $font-weight-bold;
|
|
11
|
+
color: var(--color-fg-muted);
|
|
12
|
+
flex-direction: column;
|
|
13
|
+
}
|
|
14
|
+
|
|
15
|
+
// no children
|
|
16
|
+
&:empty {
|
|
17
|
+
height: 1px;
|
|
18
|
+
padding: 0;
|
|
19
|
+
// stylelint-disable-next-line primer/spacing
|
|
20
|
+
margin: ($spacer-2 - 1px) ($spacer-2 * -1) $spacer-2;
|
|
21
|
+
list-style: none;
|
|
22
|
+
background: var(--color-action-list-item-inline-divider);
|
|
23
|
+
border: 0;
|
|
24
|
+
}
|
|
25
|
+
}
|
|
26
|
+
|
|
27
|
+
.ActionList-sectionDivider--filled {
|
|
28
|
+
margin: $spacer-2 ($spacer-2 * -1);
|
|
29
|
+
background: var(--color-canvas-subtle);
|
|
30
|
+
border-top: $border-width $border-style var(--color-action-list-item-inline-divider);
|
|
31
|
+
border-bottom: $border-width $border-style var(--color-action-list-item-inline-divider);
|
|
32
|
+
|
|
33
|
+
// if no children, treat as divider
|
|
34
|
+
&:empty {
|
|
35
|
+
height: $spacer-2;
|
|
36
|
+
box-sizing: border-box;
|
|
37
|
+
}
|
|
38
|
+
|
|
39
|
+
&:first-child {
|
|
40
|
+
margin-top: 0;
|
|
41
|
+
}
|
|
42
|
+
}
|