@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.
Files changed (368) hide show
  1. package/CHANGELOG.md +1231 -132
  2. package/CODE_OF_CONDUCT.md +1 -1
  3. package/CONTRIBUTING.md +85 -0
  4. package/DEVELOP.md +11 -69
  5. package/LICENSE +1 -1
  6. package/README.md +13 -15
  7. package/RELEASING.md +5 -72
  8. package/actionlist/action-list-item-divider.scss +42 -0
  9. package/actionlist/action-list-item.scss +444 -0
  10. package/actionlist/action-list-variables.scss +8 -0
  11. package/actionlist/action-list.scss +33 -0
  12. package/actionlist/index.scss +5 -0
  13. package/alerts/README.md +11 -22
  14. package/alerts/flash.scss +91 -21
  15. package/alerts/index.scss +2 -2
  16. package/autocomplete/README.md +25 -0
  17. package/autocomplete/autocomplete.scss +58 -0
  18. package/autocomplete/index.scss +4 -0
  19. package/autocomplete/suggester.scss +92 -0
  20. package/avatars/README.md +11 -23
  21. package/avatars/avatar-parent-child.scss +4 -3
  22. package/avatars/avatar-stack.scss +21 -13
  23. package/avatars/avatar.scss +31 -3
  24. package/avatars/circle-badge.scss +5 -4
  25. package/avatars/index.scss +5 -5
  26. package/base/README.md +11 -22
  27. package/base/base.scss +5 -4
  28. package/base/index.scss +6 -4
  29. package/base/kbd.scss +20 -0
  30. package/base/normalize.scss +5 -5
  31. package/base/octicons.scss +6 -0
  32. package/base/typography-base.scss +2 -0
  33. package/blankslate/README.md +11 -23
  34. package/blankslate/blankslate.scss +25 -12
  35. package/blankslate/index.scss +2 -2
  36. package/box/README.md +11 -23
  37. package/box/box.scss +52 -44
  38. package/box/index.scss +2 -2
  39. package/branch-name/README.md +11 -23
  40. package/branch-name/branch-name.scss +18 -8
  41. package/branch-name/index.scss +2 -2
  42. package/breadcrumb/README.md +17 -13
  43. package/breadcrumb/breadcrumb.scss +15 -5
  44. package/breadcrumb/index.scss +2 -2
  45. package/buttons/README.md +11 -23
  46. package/buttons/button-group.scss +2 -0
  47. package/buttons/button.scss +243 -143
  48. package/buttons/index.scss +4 -3
  49. package/buttons/misc.scss +222 -0
  50. package/color-modes/index.scss +9 -0
  51. package/color-modes/native.scss +10 -0
  52. package/color-modes/themes/dark.scss +7 -0
  53. package/color-modes/themes/dark_colorblind.scss +7 -0
  54. package/color-modes/themes/dark_dimmed.scss +7 -0
  55. package/color-modes/themes/dark_high_contrast.scss +7 -0
  56. package/color-modes/themes/light.scss +7 -0
  57. package/color-modes/themes/light_colorblind.scss +7 -0
  58. package/core/README.md +11 -23
  59. package/core/index.scss +19 -20
  60. package/deprecations.js +24 -0
  61. package/deprecations.json +539 -0
  62. package/dist/actionlist.css +2 -0
  63. package/dist/actionlist.css.map +1 -0
  64. package/dist/actionlist.js +1 -0
  65. package/dist/alerts.css +1 -2
  66. package/dist/alerts.css.map +1 -1
  67. package/dist/alerts.js +1 -1
  68. package/dist/autocomplete.css +2 -0
  69. package/dist/autocomplete.css.map +1 -0
  70. package/dist/autocomplete.js +1 -0
  71. package/dist/avatars.css +1 -2
  72. package/dist/avatars.css.map +1 -1
  73. package/dist/avatars.js +1 -1
  74. package/dist/base.css +1 -2
  75. package/dist/base.css.map +1 -1
  76. package/dist/base.js +1 -1
  77. package/dist/blankslate.css +1 -2
  78. package/dist/blankslate.css.map +1 -1
  79. package/dist/blankslate.js +1 -1
  80. package/dist/box.css +1 -2
  81. package/dist/box.css.map +1 -1
  82. package/dist/box.js +1 -1
  83. package/dist/branch-name.css +1 -2
  84. package/dist/branch-name.css.map +1 -1
  85. package/dist/branch-name.js +1 -1
  86. package/dist/breadcrumb.css +1 -2
  87. package/dist/breadcrumb.css.map +1 -1
  88. package/dist/breadcrumb.js +1 -1
  89. package/dist/buttons.css +1 -2
  90. package/dist/buttons.css.map +1 -1
  91. package/dist/buttons.js +1 -1
  92. package/dist/color-modes.css +2 -0
  93. package/dist/color-modes.css.map +1 -0
  94. package/dist/color-modes.js +1 -0
  95. package/dist/core.css +3 -4
  96. package/dist/core.css.map +1 -1
  97. package/dist/core.js +1 -1
  98. package/dist/deprecations.json +539 -0
  99. package/dist/dropdown.css +2 -0
  100. package/dist/dropdown.css.map +1 -0
  101. package/dist/dropdown.js +1 -0
  102. package/dist/forms.css +1 -2
  103. package/dist/forms.css.map +1 -1
  104. package/dist/forms.js +1 -1
  105. package/dist/header.css +2 -0
  106. package/dist/header.css.map +1 -0
  107. package/dist/header.js +1 -0
  108. package/dist/labels.css +1 -2
  109. package/dist/labels.css.map +1 -1
  110. package/dist/labels.js +1 -1
  111. package/dist/layout.css +1 -2
  112. package/dist/layout.css.map +1 -1
  113. package/dist/layout.js +1 -1
  114. package/dist/links.css +2 -0
  115. package/dist/links.css.map +1 -0
  116. package/dist/links.js +1 -0
  117. package/dist/loaders.css +2 -0
  118. package/dist/loaders.css.map +1 -0
  119. package/dist/loaders.js +1 -0
  120. package/dist/markdown.css +1 -2
  121. package/dist/markdown.css.map +1 -1
  122. package/dist/markdown.js +1 -1
  123. package/dist/marketing-buttons.css +1 -2
  124. package/dist/marketing-buttons.css.map +1 -1
  125. package/dist/marketing-buttons.js +1 -1
  126. package/dist/marketing-support.css +1 -2
  127. package/dist/marketing-support.js +1 -1
  128. package/dist/marketing-type.css +1 -2
  129. package/dist/marketing-type.css.map +1 -1
  130. package/dist/marketing-type.js +1 -1
  131. package/dist/marketing-utilities.css +1 -2
  132. package/dist/marketing-utilities.css.map +1 -1
  133. package/dist/marketing-utilities.js +1 -1
  134. package/dist/marketing.css +3 -4
  135. package/dist/marketing.css.map +1 -1
  136. package/dist/marketing.js +1 -1
  137. package/dist/meta.json +316 -273
  138. package/dist/navigation.css +1 -2
  139. package/dist/navigation.css.map +1 -1
  140. package/dist/navigation.js +1 -1
  141. package/dist/pagination.css +1 -2
  142. package/dist/pagination.css.map +1 -1
  143. package/dist/pagination.js +1 -1
  144. package/dist/popover.css +1 -2
  145. package/dist/popover.css.map +1 -1
  146. package/dist/popover.js +1 -1
  147. package/dist/primer.css +13 -14
  148. package/dist/primer.css.map +1 -1
  149. package/dist/primer.js +1 -1
  150. package/dist/product.css +3 -4
  151. package/dist/product.css.map +1 -1
  152. package/dist/product.js +1 -1
  153. package/dist/progress.css +1 -2
  154. package/dist/progress.css.map +1 -1
  155. package/dist/progress.js +1 -1
  156. package/dist/select-menu.css +2 -0
  157. package/dist/select-menu.css.map +1 -0
  158. package/dist/select-menu.js +1 -0
  159. package/dist/stats/actionlist.json +1 -0
  160. package/dist/stats/alerts.json +1 -1
  161. package/dist/stats/autocomplete.json +1 -0
  162. package/dist/stats/avatars.json +1 -1
  163. package/dist/stats/base.json +1 -1
  164. package/dist/stats/blankslate.json +1 -1
  165. package/dist/stats/box.json +1 -1
  166. package/dist/stats/branch-name.json +1 -1
  167. package/dist/stats/breadcrumb.json +1 -1
  168. package/dist/stats/buttons.json +1 -1
  169. package/dist/stats/color-modes.json +1 -0
  170. package/dist/stats/core.json +1 -1
  171. package/dist/stats/dropdown.json +1 -0
  172. package/dist/stats/forms.json +1 -1
  173. package/dist/stats/header.json +1 -0
  174. package/dist/stats/labels.json +1 -1
  175. package/dist/stats/layout.json +1 -1
  176. package/dist/stats/links.json +1 -0
  177. package/dist/stats/loaders.json +1 -0
  178. package/dist/stats/markdown.json +1 -1
  179. package/dist/stats/marketing-buttons.json +1 -1
  180. package/dist/stats/marketing-support.json +1 -1
  181. package/dist/stats/marketing-type.json +1 -1
  182. package/dist/stats/marketing-utilities.json +1 -1
  183. package/dist/stats/marketing.json +1 -1
  184. package/dist/stats/navigation.json +1 -1
  185. package/dist/stats/pagination.json +1 -1
  186. package/dist/stats/popover.json +1 -1
  187. package/dist/stats/primer.json +1 -1
  188. package/dist/stats/product.json +1 -1
  189. package/dist/stats/progress.json +1 -1
  190. package/dist/stats/select-menu.json +1 -0
  191. package/dist/stats/subhead.json +1 -1
  192. package/dist/stats/support.json +1 -1
  193. package/dist/stats/table-object.json +1 -1
  194. package/dist/stats/timeline.json +1 -0
  195. package/dist/stats/toasts.json +1 -0
  196. package/dist/stats/tooltips.json +1 -1
  197. package/dist/stats/truncate.json +1 -1
  198. package/dist/stats/utilities.json +1 -1
  199. package/dist/subhead.css +1 -2
  200. package/dist/subhead.css.map +1 -1
  201. package/dist/subhead.js +1 -1
  202. package/dist/support.css +1 -1
  203. package/dist/support.js +1 -1
  204. package/dist/table-object.css +0 -1
  205. package/dist/table-object.css.map +1 -1
  206. package/dist/table-object.js +1 -1
  207. package/dist/timeline.css +2 -0
  208. package/dist/timeline.css.map +1 -0
  209. package/dist/timeline.js +1 -0
  210. package/dist/toasts.css +2 -0
  211. package/dist/toasts.css.map +1 -0
  212. package/dist/toasts.js +1 -0
  213. package/dist/tooltips.css +1 -2
  214. package/dist/tooltips.css.map +1 -1
  215. package/dist/tooltips.js +1 -1
  216. package/dist/truncate.css +1 -2
  217. package/dist/truncate.css.map +1 -1
  218. package/dist/truncate.js +1 -1
  219. package/dist/utilities.css +1 -2
  220. package/dist/utilities.css.map +1 -1
  221. package/dist/utilities.js +1 -1
  222. package/dist/variables.json +1352 -0
  223. package/dropdown/README.md +25 -0
  224. package/dropdown/dropdown.scss +272 -0
  225. package/dropdown/index.scss +2 -0
  226. package/forms/README.md +11 -23
  227. package/forms/form-control.scss +76 -32
  228. package/forms/form-group.scss +83 -46
  229. package/forms/form-select.scss +17 -5
  230. package/forms/form-validation.scss +51 -32
  231. package/forms/index.scss +7 -6
  232. package/forms/input-group.scss +2 -0
  233. package/forms/radio-group.scss +62 -0
  234. package/header/README.md +25 -0
  235. package/header/header.scss +47 -0
  236. package/header/index.scss +2 -0
  237. package/index.scss +7 -4
  238. package/labels/README.md +11 -23
  239. package/labels/counters.scss +24 -13
  240. package/labels/diffstat.scss +37 -0
  241. package/labels/index.scss +8 -4
  242. package/labels/issue-labels.scss +23 -0
  243. package/labels/labels.scss +59 -40
  244. package/labels/mixins.scss +32 -0
  245. package/labels/states.scss +40 -19
  246. package/layout/README.md +11 -23
  247. package/layout/container.scss +0 -8
  248. package/layout/grid-offset.scss +11 -11
  249. package/layout/grid.scss +23 -23
  250. package/layout/index.scss +8 -5
  251. package/layout/layout-beta.scss +339 -0
  252. package/layout/layout.scss +185 -0
  253. package/layout/mixins.scss +79 -0
  254. package/links/README.md +25 -0
  255. package/links/index.scss +3 -0
  256. package/links/link.scss +55 -0
  257. package/loaders/README.md +25 -0
  258. package/loaders/index.scss +2 -0
  259. package/loaders/loaders.scss +19 -0
  260. package/markdown/README.md +11 -23
  261. package/markdown/blob-csv.scss +4 -2
  262. package/markdown/code.scss +11 -3
  263. package/markdown/footnotes.scss +37 -0
  264. package/markdown/headings.scss +13 -4
  265. package/markdown/images.scss +15 -4
  266. package/markdown/index.scss +9 -8
  267. package/markdown/lists.scss +19 -5
  268. package/markdown/markdown-body.scss +15 -18
  269. package/markdown/tables.scss +8 -5
  270. package/marketing/README.md +11 -23
  271. package/marketing/buttons/button.scss +82 -61
  272. package/marketing/index.scss +6 -11
  273. package/marketing/support/index.scss +1 -0
  274. package/marketing/support/mixins.scss +66 -0
  275. package/marketing/support/variables.scss +110 -51
  276. package/marketing/type/typography.scss +100 -62
  277. package/marketing/utilities/animations.scss +9 -0
  278. package/marketing/utilities/filters.scss +0 -1
  279. package/marketing/utilities/index.scss +2 -3
  280. package/marketing/utilities/layout.scss +32 -11
  281. package/navigation/README.md +11 -23
  282. package/navigation/filter-list.scss +16 -14
  283. package/navigation/index.scss +7 -6
  284. package/navigation/menu.scss +44 -35
  285. package/navigation/sidenav.scss +108 -0
  286. package/navigation/subnav.scss +28 -21
  287. package/navigation/tabnav.scss +45 -21
  288. package/navigation/underline-nav.scss +36 -22
  289. package/package.json +78 -107
  290. package/pagination/README.md +12 -14
  291. package/pagination/index.scss +2 -2
  292. package/pagination/pagination.scss +61 -37
  293. package/popover/README.md +11 -24
  294. package/popover/index.scss +2 -2
  295. package/popover/popover.scss +18 -9
  296. package/postcss.config.cjs +22 -0
  297. package/prettier.config.cjs +1 -0
  298. package/product/README.md +11 -23
  299. package/product/index.scss +19 -17
  300. package/progress/README.md +11 -23
  301. package/progress/index.scss +2 -2
  302. package/progress/progress.scss +11 -1
  303. package/select-menu/README.md +25 -0
  304. package/select-menu/index.scss +3 -0
  305. package/select-menu/select-menu.scss +464 -0
  306. package/stylelint.config.cjs +16 -0
  307. package/subhead/README.md +11 -25
  308. package/subhead/index.scss +2 -2
  309. package/subhead/subhead.scss +10 -4
  310. package/support/README.md +12 -18
  311. package/support/index.scss +7 -8
  312. package/support/mixins/color-modes.scss +106 -0
  313. package/support/mixins/misc.scss +9 -12
  314. package/support/mixins/typography.scss +1 -1
  315. package/support/variables/layout.scss +103 -11
  316. package/support/variables/misc.scss +7 -30
  317. package/support/variables/typography.scss +4 -4
  318. package/table-object/README.md +11 -24
  319. package/table-object/index.scss +1 -1
  320. package/timeline/README.md +25 -0
  321. package/timeline/index.scss +2 -0
  322. package/timeline/timeline-item.scss +95 -0
  323. package/toasts/README.md +25 -0
  324. package/toasts/index.scss +2 -0
  325. package/toasts/toasts.scss +124 -0
  326. package/tooltips/README.md +11 -24
  327. package/tooltips/index.scss +2 -2
  328. package/tooltips/tooltips.scss +17 -8
  329. package/truncate/README.md +11 -24
  330. package/truncate/index.scss +2 -1
  331. package/truncate/truncate.scss +41 -7
  332. package/utilities/README.md +11 -23
  333. package/utilities/animations.scss +14 -2
  334. package/utilities/borders.scss +29 -65
  335. package/utilities/box-shadow.scss +8 -9
  336. package/utilities/colors.scss +71 -110
  337. package/utilities/details.scss +12 -4
  338. package/utilities/flexbox.scss +14 -14
  339. package/utilities/index.scss +12 -12
  340. package/utilities/layout.scss +28 -22
  341. package/utilities/margin.scss +34 -17
  342. package/utilities/padding.scss +13 -9
  343. package/utilities/typography.scss +54 -25
  344. package/utilities/visibility-display.scss +0 -13
  345. package/.browserslistrc +0 -6
  346. package/.eslintrc.json +0 -13
  347. package/.stylelintrc.json +0 -9
  348. package/MIGRATING.md +0 -70
  349. package/bin/primer-migrate +0 -86
  350. package/build/build.css +0 -23
  351. package/build/build.json +0 -1
  352. package/build/index.js +0 -1
  353. package/dist/marketing-support.css.map +0 -1
  354. package/dist/support.css.map +0 -1
  355. package/fonts/Inter-Medium.woff +0 -0
  356. package/fonts/Inter-Regular.woff +0 -0
  357. package/layout/columns.scss +0 -56
  358. package/marketing/buttons/README.md +0 -39
  359. package/marketing/support/README.md +0 -31
  360. package/marketing/type/README.md +0 -39
  361. package/marketing/utilities/README.md +0 -36
  362. package/marketing/utilities/margin.scss +0 -18
  363. package/marketing/utilities/padding.scss +0 -28
  364. package/postcss.config.js +0 -14
  365. package/prettier.config.js +0 -1
  366. package/support/mixins/buttons.scss +0 -160
  367. package/support/variables/color-system.scss +0 -243
  368. package/support/variables/colors.scss +0 -70
@@ -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 other behaviors that they deem inappropriate,
43
+ permanently any contributor for any behavior that they deem inappropriate,
44
44
  threatening, offensive, or harmful.
45
45
 
46
46
  ## Scope
@@ -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 [Primer Components](https://primer.style/components) and automatically deployed on every push to this repo using our [primer/deploy action](/primer/deploy). You can run the server locally with:
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:3000/css to view the site.
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
- ## Storybook
81
- 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.
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, notably:
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
- * `lint` lints all of our SCSS source files.
102
- * `lint-js` lints the docs site and supporting scripts.
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
- * `sync` copies Markdown docs from `src/` to `pages/css/` and preps them for inclusion in the docs site.
105
- * `test-urls` compares a (pre-generated) list of paths from the [Primer Style Guide](https://styleguide.github.com/primer/) to files in `pages/css`, and lets us know if we've inadvertently deleted or renamed anything.
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
- [storybook]: https://storybook.js.org/
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
@@ -1,6 +1,6 @@
1
1
  The MIT License (MIT)
2
2
 
3
- Copyright (c) 2018 GitHub Inc.
3
+ Copyright (c) 2021 GitHub Inc.
4
4
 
5
5
  Permission is hereby granted, free of charge, to any person obtaining a copy
6
6
  of this software and associated documentation files (the "Software"), to deal
package/README.md CHANGED
@@ -1,5 +1,5 @@
1
1
  <p align="center">
2
- <img width="300px" src="./static/readme.png">
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/master">
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="join us in spectrum" href="https://spectrum.chat/primer">
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
- ## Migrating
28
- :rotating_light: **If you currently use the `primer` or `primer-`-prefixed npm packages, please read [the migration guide](MIGRATING.md)!**
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
- $ npm install --save @primer/css
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](./DEVELOP.md) for development docs.
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](./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
- 1. Decide which [PRs](https://github.com/primer/css/pulls) should be part of the next release and if it will be a major, minor or patch `<version>`. You may also check the [release tracking project
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 [primer/publish] has finished.
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
- 1. Copy the changes from the [CHANGELOG] and paste them into the release notes.
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
- [primer/publish]: https://github.com/primer/publish
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
+ }