@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/CODE_OF_CONDUCT.md
CHANGED
|
@@ -40,7 +40,7 @@ response to any instances of unacceptable behavior.
|
|
|
40
40
|
Project maintainers have the right and responsibility to remove, edit, or
|
|
41
41
|
reject comments, commits, code, wiki edits, issues, and other contributions
|
|
42
42
|
that are not aligned to this Code of Conduct, or to ban temporarily or
|
|
43
|
-
permanently any contributor for
|
|
43
|
+
permanently any contributor for any behavior that they deem inappropriate,
|
|
44
44
|
threatening, offensive, or harmful.
|
|
45
45
|
|
|
46
46
|
## Scope
|
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,99 +22,41 @@ 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
|
|
|
38
28
|
## Docs site
|
|
39
|
-
The Primer CSS docs are built with React using [
|
|
29
|
+
The Primer CSS docs are built with React using [Doctocat](https://primer.style/doctocat) and automatically deployed on every push to this repo with [Now]. You can run the server locally with:
|
|
40
30
|
|
|
41
31
|
```sh
|
|
42
32
|
npm start
|
|
43
33
|
```
|
|
44
34
|
|
|
45
|
-
Then visit http://localhost:
|
|
46
|
-
|
|
47
|
-
:rotating_light: **Warning:** Next.js has a [long-running issue](https://github.com/zeit/next.js/issues/1189) with trailing slashes in URLs. Avoid visiting `http://localhost:3000/` if possible, as this may cause your development server to fail in less-than-graceful ways.
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
### Syncing the docs
|
|
51
|
-
Both before and while the Next dev server runs, all of the Markdown files within the `src/` directory are synced to Next's `pages/` directory and rewritten to include useful metadata.
|
|
52
|
-
|
|
53
|
-
If, for whatever reason, the dev server isn't syncing files from `src/` to `pages/`, you have two choices:
|
|
54
|
-
|
|
55
|
-
1. Stop the server (`ctrl-C`) and restart it (`npm start`), which will re-sync the files and clear Next's cache.
|
|
56
|
-
2. Run [script/sync](./script/sync) manually:
|
|
57
|
-
|
|
58
|
-
```sh
|
|
59
|
-
# in the docs directory
|
|
60
|
-
script/sync
|
|
61
|
-
```
|
|
62
|
-
|
|
63
|
-
**If you find yourself needing to do this often, please [file an issue](/primer/css/issues/new) and tag `@shawnbot`**. :bow:
|
|
64
|
-
|
|
65
|
-
### The pages directory
|
|
66
|
-
The [pages directory](./pages/) contains all of the files that map to URLs on the site. Because we host the site at `primer.style/css` (and because of the way that Now's path aliasing feature works), we nest all of our documentation under the [css subdirectory](./pages/css).
|
|
67
|
-
|
|
68
|
-
The sync task maintains a list of files copied from `src/` in `pages/css/.gitignore`, which ensures that none of these generated files are checked into git.
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
### URL tests
|
|
72
|
-
We have a script that catches inadvertent URL changes caused by renaming or deleting Markdown docs:
|
|
73
|
-
|
|
74
|
-
```sh
|
|
75
|
-
npm run test-urls
|
|
76
|
-
```
|
|
77
|
-
|
|
78
|
-
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.
|
|
35
|
+
Then visit http://localhost:8000 to view the site.
|
|
79
36
|
|
|
80
|
-
|
|
81
|
-
|
|
37
|
+
### The docs directory
|
|
38
|
+
The [docs directory](../docs/) contains all of the documentation files in our docs site. Files are nested in the `/content` folder.
|
|
82
39
|
|
|
83
|
-
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:
|
|
84
|
-
|
|
85
|
-
```sh
|
|
86
|
-
npm run start-storybook
|
|
87
|
-
```
|
|
88
|
-
|
|
89
|
-
This should open up the site in your browser (if not, navigate to `http://localhost:8001`).
|
|
90
40
|
|
|
91
41
|
### Code blocks
|
|
92
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).
|
|
93
43
|
|
|
94
|
-
Note: At this time, we do not load any stories from `src/**/stories.js`.
|
|
95
|
-
|
|
96
44
|
## Scripts
|
|
97
|
-
Our [`package.json`](package.json) houses a collection of [run-scripts] that we use to maintain, test, build, and publish Primer CSS
|
|
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>`:
|
|
98
46
|
|
|
99
47
|
* `dist` runs `script/dist`, which creates CSS bundles of all the `index.scss` files in `src/`.
|
|
100
48
|
* `check-links` runs a link checker on your local development server (`localhost:3000`, started with `npm start`).
|
|
101
|
-
* `
|
|
102
|
-
* `
|
|
49
|
+
* `stylelint` lints the CSS source files.
|
|
50
|
+
* `eslint` lints the JavaScript source files.
|
|
103
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.
|
|
104
|
-
* `
|
|
105
|
-
* `test
|
|
106
|
-
* `test-migrate` tests the [`primer-migrate`](MIGRATING.md#primer-migrate) command line utility.
|
|
107
|
-
* `watch` runs the sync script in watch mode, copying files as they're changed from `src/` to `pages/css/`.
|
|
52
|
+
* `start` runs the documentation site locally (alias: `dev`).
|
|
53
|
+
* `test` runs our test suite.
|
|
108
54
|
|
|
109
|
-
You can list all of the available scripts with
|
|
110
|
-
|
|
111
|
-
```sh
|
|
112
|
-
npm run
|
|
113
|
-
```
|
|
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.
|
|
114
56
|
|
|
115
57
|
|
|
116
58
|
[@primer/css]: https://www.npmjs.com/package/@primer/css
|
|
117
59
|
[run-scripts]: https://docs.npmjs.com/cli/run-script
|
|
118
|
-
[
|
|
60
|
+
[now]: https://zeit.co/now
|
|
119
61
|
[npm]: https://www.npmjs.com/
|
|
120
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,62 +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. 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.
|
|
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, removing irrelevant headings and checking off all of the boxes of the ship checklist:
|
|
13
|
-
|
|
14
|
-
```md
|
|
15
|
-
# Primer CSS [Major|Minor|Patch] Release
|
|
16
|
-
|
|
17
|
-
Version: 📦 **0.0.0**
|
|
18
|
-
Approximate release date: 📆 DD/MM/YY
|
|
19
|
-
|
|
20
|
-
### :boom: Breaking Change
|
|
21
|
-
- [ ] Description #
|
|
22
|
-
|
|
23
|
-
### :rocket: Enhancement
|
|
24
|
-
- [ ] Description #
|
|
25
|
-
|
|
26
|
-
### :bug: Bug Fix
|
|
27
|
-
- [ ] Description #
|
|
28
|
-
|
|
29
|
-
### :nail_care: Polish
|
|
30
|
-
- [ ] Description #
|
|
31
|
-
|
|
32
|
-
### :memo: Documentation
|
|
33
|
-
- [ ] Description #
|
|
34
|
-
|
|
35
|
-
### :house: Internal
|
|
36
|
-
- [ ] Description #
|
|
37
|
-
|
|
38
|
-
----
|
|
39
|
-
|
|
40
|
-
### Ship checklist
|
|
41
|
-
|
|
42
|
-
- [ ] Update `CHANGELOG.md`
|
|
43
|
-
- [ ] Update the `version` field in `package.json`
|
|
44
|
-
- [ ] Test the release candidate version with `github/github`
|
|
45
|
-
- [ ] Merge this PR and [create a new release](https://github.com/primer/css/releases/new)
|
|
46
|
-
- [ ] Update `github/github`
|
|
47
|
-
|
|
48
|
-
For more details, see [RELEASING.md](https://github.com/primer/css/blob/master/RELEASING.md).
|
|
49
|
-
|
|
50
|
-
/cc @primer/ds-core
|
|
51
|
-
```
|
|
52
|
-
|
|
53
|
-
1. Update `CHANGELOG.md`
|
|
54
|
-
|
|
55
|
-
1. Update the `version` field in `package.json` to match the release version. You may also run the `npm version v<version>` command.
|
|
56
|
-
|
|
57
|
-
1. Wait for your checks to pass, and take note of the version that [primer/publish] lists in your status checks.
|
|
58
|
-
|
|
59
|
-
**ProTip:** 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).
|
|
60
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.
|
|
61
8
|
|
|
62
9
|
## Test the release candidate (in `github/github`):
|
|
63
10
|
|
|
@@ -82,13 +29,9 @@
|
|
|
82
29
|
|
|
83
30
|
1. If the release PR got approved and you've done necessary testing, merge it.
|
|
84
31
|
|
|
85
|
-
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
|
|
86
|
-
|
|
87
|
-
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.
|
|
88
33
|
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
1. Publish 🎉
|
|
34
|
+
2. done 🎉
|
|
92
35
|
|
|
93
36
|
|
|
94
37
|
## Update github.com (in `github/github`):
|
|
@@ -105,15 +48,5 @@
|
|
|
105
48
|
|
|
106
49
|
1. Deploy! :rocket:
|
|
107
50
|
|
|
108
|
-
|
|
109
|
-
### Publish the release
|
|
110
|
-
|
|
111
|
-
1. [Create a new release](https://github.com/primer/css/releases/new) with tag `v<version>`.
|
|
112
|
-
|
|
113
|
-
2. Copy the changes from the [CHANGELOG] and paste them into the release notes.
|
|
114
|
-
|
|
115
|
-
3. Publish 🎉
|
|
116
|
-
|
|
117
|
-
|
|
118
51
|
[changelog]: ../CHANGELOG.md
|
|
119
|
-
[
|
|
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
|
+
}
|