@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.
Files changed (352) hide show
  1. package/CHANGELOG.md +858 -133
  2. package/CONTRIBUTING.md +85 -0
  3. package/DEVELOP.md +4 -39
  4. package/LICENSE +1 -1
  5. package/README.md +13 -15
  6. package/RELEASING.md +5 -76
  7. package/actionlist/action-list-item-divider.scss +42 -0
  8. package/actionlist/action-list-item.scss +439 -0
  9. package/actionlist/action-list-variables.scss +8 -0
  10. package/actionlist/action-list.scss +33 -0
  11. package/actionlist/index.scss +5 -0
  12. package/alerts/README.md +1 -1
  13. package/alerts/flash.scss +32 -26
  14. package/alerts/index.scss +2 -2
  15. package/autocomplete/README.md +1 -1
  16. package/autocomplete/autocomplete.scss +18 -8
  17. package/autocomplete/index.scss +3 -3
  18. package/autocomplete/suggester.scss +27 -10
  19. package/avatars/README.md +1 -1
  20. package/avatars/avatar-parent-child.scss +2 -3
  21. package/avatars/avatar-stack.scss +12 -14
  22. package/avatars/avatar.scss +4 -0
  23. package/avatars/circle-badge.scss +4 -4
  24. package/avatars/index.scss +5 -5
  25. package/base/README.md +1 -1
  26. package/base/base.scss +39 -7
  27. package/base/index.scss +6 -5
  28. package/base/kbd.scss +5 -6
  29. package/base/normalize.scss +13 -53
  30. package/base/octicons.scss +6 -0
  31. package/blankslate/README.md +1 -1
  32. package/blankslate/blankslate.scss +7 -4
  33. package/blankslate/index.scss +2 -2
  34. package/box/README.md +1 -1
  35. package/box/box.scss +38 -38
  36. package/box/index.scss +2 -2
  37. package/branch-name/README.md +1 -1
  38. package/branch-name/branch-name.scss +15 -10
  39. package/branch-name/index.scss +2 -2
  40. package/breadcrumb/README.md +1 -1
  41. package/breadcrumb/breadcrumb.scss +12 -7
  42. package/breadcrumb/index.scss +2 -2
  43. package/buttons/README.md +1 -1
  44. package/buttons/button.scss +115 -121
  45. package/buttons/index.scss +4 -4
  46. package/buttons/misc.scss +52 -41
  47. package/color-modes/index.scss +9 -0
  48. package/color-modes/native.scss +10 -0
  49. package/color-modes/themes/dark.scss +7 -0
  50. package/color-modes/themes/dark_colorblind.scss +7 -0
  51. package/color-modes/themes/dark_dimmed.scss +7 -0
  52. package/color-modes/themes/dark_high_contrast.scss +7 -0
  53. package/color-modes/themes/light.scss +7 -0
  54. package/color-modes/themes/light_colorblind.scss +7 -0
  55. package/core/README.md +1 -1
  56. package/core/index.scss +17 -16
  57. package/deprecations.js +18 -200
  58. package/deprecations.json +539 -0
  59. package/dist/actionlist.css +2 -0
  60. package/dist/actionlist.css.map +1 -0
  61. package/dist/actionlist.js +1 -0
  62. package/dist/alerts.css +1 -2
  63. package/dist/alerts.css.map +1 -1
  64. package/dist/alerts.js +1 -1
  65. package/dist/autocomplete.css +1 -2
  66. package/dist/autocomplete.css.map +1 -1
  67. package/dist/autocomplete.js +1 -1
  68. package/dist/avatars.css +1 -2
  69. package/dist/avatars.css.map +1 -1
  70. package/dist/avatars.js +1 -1
  71. package/dist/base.css +1 -2
  72. package/dist/base.css.map +1 -1
  73. package/dist/base.js +1 -1
  74. package/dist/blankslate.css +1 -2
  75. package/dist/blankslate.css.map +1 -1
  76. package/dist/blankslate.js +1 -1
  77. package/dist/box.css +1 -2
  78. package/dist/box.css.map +1 -1
  79. package/dist/box.js +1 -1
  80. package/dist/branch-name.css +1 -2
  81. package/dist/branch-name.css.map +1 -1
  82. package/dist/branch-name.js +1 -1
  83. package/dist/breadcrumb.css +1 -2
  84. package/dist/breadcrumb.css.map +1 -1
  85. package/dist/breadcrumb.js +1 -1
  86. package/dist/buttons.css +1 -2
  87. package/dist/buttons.css.map +1 -1
  88. package/dist/buttons.js +1 -1
  89. package/dist/color-modes.css +2 -0
  90. package/dist/color-modes.css.map +1 -0
  91. package/dist/color-modes.js +1 -0
  92. package/dist/core.css +1 -2
  93. package/dist/core.css.map +1 -1
  94. package/dist/core.js +1 -1
  95. package/dist/deprecations.json +534 -571
  96. package/dist/dropdown.css +1 -2
  97. package/dist/dropdown.css.map +1 -1
  98. package/dist/dropdown.js +1 -1
  99. package/dist/forms.css +1 -2
  100. package/dist/forms.css.map +1 -1
  101. package/dist/forms.js +1 -1
  102. package/dist/header.css +1 -2
  103. package/dist/header.css.map +1 -1
  104. package/dist/header.js +1 -1
  105. package/dist/labels.css +1 -2
  106. package/dist/labels.css.map +1 -1
  107. package/dist/labels.js +1 -1
  108. package/dist/layout.css +1 -2
  109. package/dist/layout.css.map +1 -1
  110. package/dist/layout.js +1 -1
  111. package/dist/links.css +2 -0
  112. package/dist/links.css.map +1 -0
  113. package/dist/links.js +1 -0
  114. package/dist/loaders.css +0 -1
  115. package/dist/loaders.css.map +1 -1
  116. package/dist/loaders.js +1 -1
  117. package/dist/markdown.css +1 -2
  118. package/dist/markdown.css.map +1 -1
  119. package/dist/markdown.js +1 -1
  120. package/dist/marketing-buttons.css +1 -2
  121. package/dist/marketing-buttons.css.map +1 -1
  122. package/dist/marketing-buttons.js +1 -1
  123. package/dist/marketing-support.css +1 -2
  124. package/dist/marketing-support.js +1 -1
  125. package/dist/marketing-type.css +1 -2
  126. package/dist/marketing-type.css.map +1 -1
  127. package/dist/marketing-type.js +1 -1
  128. package/dist/marketing-utilities.css +1 -2
  129. package/dist/marketing-utilities.css.map +1 -1
  130. package/dist/marketing-utilities.js +1 -1
  131. package/dist/marketing.css +1 -2
  132. package/dist/marketing.css.map +1 -1
  133. package/dist/marketing.js +1 -1
  134. package/dist/meta.json +314 -369
  135. package/dist/navigation.css +1 -2
  136. package/dist/navigation.css.map +1 -1
  137. package/dist/navigation.js +1 -1
  138. package/dist/pagination.css +1 -2
  139. package/dist/pagination.css.map +1 -1
  140. package/dist/pagination.js +1 -1
  141. package/dist/popover.css +1 -2
  142. package/dist/popover.css.map +1 -1
  143. package/dist/popover.js +1 -1
  144. package/dist/primer.css +4 -5
  145. package/dist/primer.css.map +1 -1
  146. package/dist/primer.js +1 -1
  147. package/dist/product.css +1 -2
  148. package/dist/product.css.map +1 -1
  149. package/dist/product.js +1 -1
  150. package/dist/progress.css +1 -2
  151. package/dist/progress.css.map +1 -1
  152. package/dist/progress.js +1 -1
  153. package/dist/select-menu.css +1 -2
  154. package/dist/select-menu.css.map +1 -1
  155. package/dist/select-menu.js +1 -1
  156. package/dist/stats/actionlist.json +1 -0
  157. package/dist/stats/alerts.json +1 -1
  158. package/dist/stats/autocomplete.json +1 -1
  159. package/dist/stats/avatars.json +1 -1
  160. package/dist/stats/base.json +1 -1
  161. package/dist/stats/blankslate.json +1 -1
  162. package/dist/stats/box.json +1 -1
  163. package/dist/stats/branch-name.json +1 -1
  164. package/dist/stats/breadcrumb.json +1 -1
  165. package/dist/stats/buttons.json +1 -1
  166. package/dist/stats/color-modes.json +1 -0
  167. package/dist/stats/core.json +1 -1
  168. package/dist/stats/dropdown.json +1 -1
  169. package/dist/stats/forms.json +1 -1
  170. package/dist/stats/header.json +1 -1
  171. package/dist/stats/labels.json +1 -1
  172. package/dist/stats/layout.json +1 -1
  173. package/dist/stats/links.json +1 -0
  174. package/dist/stats/loaders.json +1 -1
  175. package/dist/stats/markdown.json +1 -1
  176. package/dist/stats/marketing-buttons.json +1 -1
  177. package/dist/stats/marketing-support.json +1 -1
  178. package/dist/stats/marketing-type.json +1 -1
  179. package/dist/stats/marketing-utilities.json +1 -1
  180. package/dist/stats/marketing.json +1 -1
  181. package/dist/stats/navigation.json +1 -1
  182. package/dist/stats/pagination.json +1 -1
  183. package/dist/stats/popover.json +1 -1
  184. package/dist/stats/primer.json +1 -1
  185. package/dist/stats/product.json +1 -1
  186. package/dist/stats/progress.json +1 -1
  187. package/dist/stats/select-menu.json +1 -1
  188. package/dist/stats/subhead.json +1 -1
  189. package/dist/stats/support.json +1 -1
  190. package/dist/stats/table-object.json +1 -1
  191. package/dist/stats/timeline.json +1 -1
  192. package/dist/stats/toasts.json +1 -1
  193. package/dist/stats/tooltips.json +1 -1
  194. package/dist/stats/truncate.json +1 -1
  195. package/dist/stats/utilities.json +1 -1
  196. package/dist/subhead.css +1 -2
  197. package/dist/subhead.css.map +1 -1
  198. package/dist/subhead.js +1 -1
  199. package/dist/support.css +1 -1
  200. package/dist/support.js +1 -1
  201. package/dist/table-object.css +0 -1
  202. package/dist/table-object.css.map +1 -1
  203. package/dist/table-object.js +1 -1
  204. package/dist/timeline.css +1 -2
  205. package/dist/timeline.css.map +1 -1
  206. package/dist/timeline.js +1 -1
  207. package/dist/toasts.css +1 -2
  208. package/dist/toasts.css.map +1 -1
  209. package/dist/toasts.js +1 -1
  210. package/dist/tooltips.css +1 -2
  211. package/dist/tooltips.css.map +1 -1
  212. package/dist/tooltips.js +1 -1
  213. package/dist/truncate.css +1 -2
  214. package/dist/truncate.css.map +1 -1
  215. package/dist/truncate.js +1 -1
  216. package/dist/utilities.css +1 -2
  217. package/dist/utilities.css.map +1 -1
  218. package/dist/utilities.js +1 -1
  219. package/dist/variables.json +630 -2274
  220. package/dropdown/README.md +1 -1
  221. package/dropdown/dropdown.scss +32 -88
  222. package/dropdown/index.scss +2 -2
  223. package/forms/README.md +1 -1
  224. package/forms/form-control.scss +39 -57
  225. package/forms/form-group.scss +31 -48
  226. package/forms/form-select.scss +12 -4
  227. package/forms/form-validation.scss +27 -32
  228. package/forms/index.scss +7 -7
  229. package/forms/input-group.scss +7 -0
  230. package/forms/radio-group.scss +22 -3
  231. package/header/README.md +1 -1
  232. package/header/header.scss +16 -6
  233. package/header/index.scss +2 -2
  234. package/index.scss +4 -1
  235. package/labels/README.md +1 -1
  236. package/labels/counters.scss +10 -11
  237. package/labels/diffstat.scss +8 -8
  238. package/labels/index.scss +7 -7
  239. package/labels/labels.scss +30 -41
  240. package/labels/states.scss +17 -16
  241. package/layout/README.md +1 -1
  242. package/layout/grid-offset.scss +11 -11
  243. package/layout/grid.scss +23 -23
  244. package/layout/index.scss +7 -4
  245. package/layout/layout.scss +185 -0
  246. package/layout/mixins.scss +79 -0
  247. package/{README.template.md → links/README.md} +5 -5
  248. package/links/index.scss +3 -0
  249. package/links/link.scss +55 -0
  250. package/loaders/README.md +1 -1
  251. package/loaders/index.scss +2 -2
  252. package/loaders/loaders.scss +1 -1
  253. package/markdown/README.md +1 -1
  254. package/markdown/blob-csv.scss +2 -2
  255. package/markdown/code.scss +7 -5
  256. package/markdown/footnotes.scss +37 -0
  257. package/markdown/headings.scss +6 -4
  258. package/markdown/images.scss +3 -4
  259. package/markdown/index.scss +9 -8
  260. package/markdown/lists.scss +18 -5
  261. package/markdown/markdown-body.scss +14 -9
  262. package/markdown/tables.scss +7 -7
  263. package/marketing/README.md +1 -1
  264. package/marketing/buttons/button.scss +81 -75
  265. package/marketing/index.scss +4 -4
  266. package/marketing/support/index.scss +1 -0
  267. package/marketing/support/mixins.scss +66 -0
  268. package/marketing/support/variables.scss +109 -58
  269. package/marketing/type/typography.scss +100 -62
  270. package/marketing/utilities/animations.scss +9 -0
  271. package/marketing/utilities/index.scss +2 -3
  272. package/marketing/utilities/layout.scss +31 -10
  273. package/navigation/README.md +1 -1
  274. package/navigation/filter-list.scss +8 -9
  275. package/navigation/index.scss +7 -7
  276. package/navigation/menu.scss +22 -23
  277. package/navigation/sidenav.scss +19 -25
  278. package/navigation/subnav.scss +9 -13
  279. package/navigation/tabnav.scss +20 -10
  280. package/navigation/underline-nav.scss +19 -14
  281. package/package.json +75 -63
  282. package/pagination/README.md +1 -1
  283. package/pagination/index.scss +2 -2
  284. package/pagination/pagination.scss +8 -8
  285. package/popover/README.md +1 -1
  286. package/popover/index.scss +2 -2
  287. package/popover/popover.scss +14 -13
  288. package/postcss.config.cjs +22 -0
  289. package/prettier.config.cjs +1 -0
  290. package/product/README.md +1 -1
  291. package/product/index.scss +17 -17
  292. package/progress/README.md +1 -1
  293. package/progress/index.scss +2 -2
  294. package/progress/progress.scss +3 -4
  295. package/select-menu/README.md +1 -1
  296. package/select-menu/index.scss +2 -2
  297. package/select-menu/select-menu.scss +44 -46
  298. package/{stylelint.config.js → stylelint.config.cjs} +5 -6
  299. package/subhead/README.md +1 -1
  300. package/subhead/index.scss +2 -2
  301. package/subhead/subhead.scss +9 -3
  302. package/support/README.md +1 -1
  303. package/support/index.scss +7 -8
  304. package/support/mixins/color-modes.scss +106 -0
  305. package/support/mixins/misc.scss +19 -13
  306. package/support/variables/layout.scss +68 -9
  307. package/support/variables/misc.scss +2 -27
  308. package/support/variables/typography.scss +2 -1
  309. package/table-object/README.md +1 -1
  310. package/table-object/index.scss +1 -1
  311. package/timeline/README.md +1 -1
  312. package/timeline/index.scss +2 -2
  313. package/timeline/timeline-item.scss +18 -18
  314. package/toasts/README.md +1 -1
  315. package/toasts/index.scss +2 -2
  316. package/toasts/toasts.scss +45 -24
  317. package/tooltips/README.md +1 -1
  318. package/tooltips/index.scss +2 -2
  319. package/tooltips/tooltips.scss +8 -12
  320. package/truncate/README.md +1 -1
  321. package/truncate/index.scss +2 -1
  322. package/truncate/truncate.scss +30 -0
  323. package/utilities/README.md +1 -1
  324. package/utilities/animations.scss +14 -1
  325. package/utilities/borders.scss +5 -50
  326. package/utilities/box-shadow.scss +8 -8
  327. package/utilities/colors.scss +71 -107
  328. package/utilities/details.scss +18 -6
  329. package/utilities/flexbox.scss +4 -3
  330. package/utilities/index.scss +12 -12
  331. package/utilities/layout.scss +23 -14
  332. package/utilities/margin.scss +34 -16
  333. package/utilities/padding.scss +13 -8
  334. package/utilities/typography.scss +5 -15
  335. package/.browserslistrc +0 -6
  336. package/.eslintrc.json +0 -13
  337. package/.nowignore +0 -5
  338. package/MIGRATING.md +0 -74
  339. package/bin/primer-migrate +0 -86
  340. package/dist/marketing-support.css.map +0 -1
  341. package/dist/support.css.map +0 -1
  342. package/fonts/Inter-Bold.woff +0 -0
  343. package/fonts/Inter-Medium.woff +0 -0
  344. package/fonts/Inter-Regular.woff +0 -0
  345. package/marketing/utilities/margin.scss +0 -17
  346. package/marketing/utilities/padding.scss +0 -24
  347. package/postcss.config.js +0 -14
  348. package/prettier.config.js +0 -1
  349. package/release.config.js +0 -4
  350. package/support/mixins/buttons.scss +0 -172
  351. package/support/variables/color-system.scss +0 -243
  352. package/support/variables/colors.scss +0 -55
@@ -1,115 +1,79 @@
1
- // Color utilities
2
- // stylelint-disable block-opening-brace-space-before, comment-empty-line-before
3
-
4
- // background colors
5
- /* Set the background to $bg-white */
6
- .bg-white { background-color: $bg-white !important; }
7
- /* Set the background to $bg-blue */
8
- .bg-blue { background-color: $bg-blue !important; }
9
- /* Set the background to $bg-blue-light */
10
- .bg-blue-light { background-color: $bg-blue-light !important; }
11
- /* Set the background to $bg-gray-dark */
12
- .bg-gray-dark { background-color: $bg-gray-dark !important; }
13
- /* Set the background to $bg-gray */
14
- .bg-gray { background-color: $bg-gray !important; }
15
- /* Set the background to $bg-gray-light */
16
- .bg-gray-light { background-color: $bg-gray-light !important; }
17
- /* Set the background to $bg-green */
18
- .bg-green { background-color: $bg-green !important; }
19
- /* Set the background to $bg-green-light */
20
- .bg-green-light { background-color: $bg-green-light !important; }
21
- /* Set the background to $bg-red */
22
- .bg-red { background-color: $bg-red !important; }
23
- /* Set the background to $bg-red-light */
24
- .bg-red-light { background-color: $bg-red-light !important; }
25
- /* Set the background to $bg-yellow */
26
- .bg-yellow { background-color: $bg-yellow !important; }
27
- /* Set the background to $bg-yellow-light */
28
- .bg-yellow-light { background-color: $bg-yellow-light !important; }
29
- /* Set the background to $bg-yellow-dark */
30
- .bg-yellow-dark { background-color: $bg-yellow-dark !important; }
31
- /* Set the background to $bg-purple */
32
- .bg-purple { background-color: $bg-purple !important; }
33
- /* Set the background to $bg-pink */
34
- .bg-pink { background-color: $bg-pink !important; }
35
- /* Set the background to $bg-purple-light */
36
- .bg-purple-light { background-color: $bg-purple-light !important; }
37
-
38
- // Generate a foreground and background utility for every shade of every hue
39
- @each $hue, $shades in $hue-maps {
40
- @each $index, $color in $shades {
41
- .color-#{$hue}-#{$index} { color: $color !important; }
42
- .bg-#{$hue}-#{$index} { background-color: $color !important; }
43
- }
44
- }
1
+ // stylelint-disable block-opening-brace-space-before
45
2
 
46
- .bg-shade-gradient {
47
- background-image: linear-gradient(180deg, rgba($black, 0.065), rgba($black, 0)) !important;
48
- background-repeat: no-repeat !important;
49
- background-size: 100% 200px !important;
50
- }
3
+ // Foreground
51
4
 
52
- // text colors
53
- /* Set the text color to $text-blue */
54
- .text-blue { color: $text-blue !important; }
55
- /* Set the text color to $text-red */
56
- .text-red { color: $text-red !important; }
57
- /* Set the text color to $text-gray-light */
58
- .text-gray-light { color: $text-gray-light !important; }
59
- /* Set the text color to $text-gray */
60
- .text-gray { color: $text-gray !important; }
61
- /* Set the text color to $text-gray-dark */
62
- .text-gray-dark { color: $text-gray-dark !important; }
63
- /* Set the text color to $text-green */
64
- .text-green { color: $text-green !important; }
65
- /* Set the text color to $text-yellow */
66
- .text-yellow { color: $text-yellow !important; }
67
- /* Set the text color to $text-orange */
68
- .text-orange { color: $text-orange !important; }
69
- /* Set the text color to $text-orange-light */
70
- .text-orange-light { color: $text-orange-light !important; }
71
- /* Set the text color to $text-purple */
72
- .text-purple { color: $text-purple !important; }
73
- /* Set the text color to $text-pink */
74
- .text-pink { color: $text-pink !important; }
75
- /* Set the text color to $text-white */
76
- .text-white { color: $text-white !important; }
77
- /* Set the text color to inherit */
78
- .text-inherit { color: inherit !important; }
79
-
80
- // Link colors
81
- // Sets the links color to $text-gray and $text-blue on hover
82
- .link-gray {
83
- color: $text-gray !important;
84
-
85
- &:hover {
86
- color: $text-blue !important;
87
- }
88
- }
5
+ .color-fg-default { color: var(--color-fg-default) !important; }
6
+ .color-fg-muted { color: var(--color-fg-muted) !important; }
7
+ .color-fg-subtle { color: var(--color-fg-subtle) !important; }
89
8
 
90
- // Sets the links color to $text-gray-dark and $text-blue on hover
91
- .link-gray-dark {
92
- color: $text-gray-dark !important;
9
+ .color-fg-accent { color: var(--color-accent-fg) !important; }
10
+ .color-fg-success { color: var(--color-success-fg) !important; }
11
+ .color-fg-attention { color: var(--color-attention-fg) !important; }
12
+ .color-fg-severe { color: var(--color-severe-fg) !important; }
13
+ .color-fg-danger { color: var(--color-danger-fg) !important; }
14
+ .color-fg-done { color: var(--color-done-fg) !important; }
15
+ .color-fg-sponsors { color: var(--color-sponsors-fg) !important; }
93
16
 
94
- &:hover {
95
- color: $text-blue !important;
96
- }
97
- }
17
+ .color-fg-on-emphasis { color: var(--color-fg-on-emphasis) !important; }
98
18
 
99
- /* Set the link color to $text-blue on hover
100
- Useful when you want only part of a link to turn blue on hover */
101
- .link-hover-blue {
102
- &:hover {
103
- color: $text-blue !important;
104
- }
105
- }
19
+ // Background
20
+
21
+ .color-bg-default { background-color: var(--color-canvas-default) !important; }
22
+ .color-bg-overlay { background-color: var(--color-canvas-overlay) !important; }
23
+ .color-bg-inset { background-color: var(--color-canvas-inset) !important; }
24
+ .color-bg-subtle { background-color: var(--color-canvas-subtle) !important; }
25
+ .color-bg-emphasis { background-color: var(--color-neutral-emphasis-plus) !important; }
26
+
27
+ .color-bg-accent { background-color: var(--color-accent-subtle) !important; }
28
+ .color-bg-accent-emphasis { background-color: var(--color-accent-emphasis) !important; }
29
+
30
+ .color-bg-success { background-color: var(--color-success-subtle) !important; }
31
+ .color-bg-success-emphasis { background-color: var(--color-success-emphasis) !important; }
32
+
33
+ .color-bg-attention { background-color: var(--color-attention-subtle) !important; }
34
+ .color-bg-attention-emphasis { background-color: var(--color-attention-emphasis) !important; }
35
+
36
+ .color-bg-severe { background-color: var(--color-severe-subtle) !important; }
37
+ .color-bg-severe-emphasis { background-color: var(--color-severe-emphasis) !important; }
38
+
39
+ .color-bg-danger { background-color: var(--color-danger-subtle) !important; }
40
+ .color-bg-danger-emphasis { background-color: var(--color-danger-emphasis) !important; }
41
+
42
+ .color-bg-done { background-color: var(--color-done-subtle) !important; }
43
+ .color-bg-done-emphasis { background-color: var(--color-done-emphasis) !important; }
44
+
45
+ .color-bg-sponsors { background-color: var(--color-sponsors-subtle) !important; }
46
+ .color-bg-sponsors-emphasis { background-color: var(--color-sponsors-emphasis) !important; }
47
+
48
+ // Border
49
+
50
+ .color-border-default { border-color: var(--color-border-default) !important; }
51
+ .color-border-muted { border-color: var(--color-border-muted) !important; }
52
+ .color-border-subtle { border-color: var(--color-border-subtle) !important; }
53
+
54
+ .color-border-accent { border-color: var(--color-accent-muted) !important; }
55
+ .color-border-accent-emphasis { border-color: var(--color-accent-emphasis) !important; }
56
+
57
+ .color-border-success { border-color: var(--color-success-muted) !important; }
58
+ .color-border-success-emphasis { border-color: var(--color-success-emphasis) !important; }
59
+
60
+ .color-border-attention { border-color: var(--color-attention-muted) !important; }
61
+ .color-border-attention-emphasis { border-color: var(--color-attention-emphasis) !important; }
62
+
63
+ .color-border-severe { border-color: var(--color-severe-muted) !important; }
64
+ .color-border-severe-emphasis { border-color: var(--color-severe-emphasis) !important; }
65
+
66
+ .color-border-danger { border-color: var(--color-danger-muted) !important; }
67
+ .color-border-danger-emphasis { border-color: var(--color-danger-emphasis) !important; }
68
+
69
+ .color-border-done { border-color: var(--color-done-muted) !important; }
70
+ .color-border-done-emphasis { border-color: var(--color-done-emphasis) !important; }
71
+
72
+ .color-border-sponsors { border-color: var(--color-sponsors-muted) !important; }
73
+ .color-border-sponsors-emphasis { border-color: var(--color-sponsors-emphasis) !important; }
106
74
 
107
- /* Make a link $text-gray, then $text-blue on hover and removes the underline */
108
- .muted-link {
109
- color: $text-gray !important;
75
+ // Misc
110
76
 
111
- &:hover {
112
- color: $text-blue !important;
113
- text-decoration: none;
114
- }
77
+ .color-fg-inherit {
78
+ color: inherit !important;
115
79
  }
@@ -9,20 +9,32 @@
9
9
  z-index: 80;
10
10
  display: block;
11
11
  cursor: default;
12
- content: " ";
12
+ content: ' ';
13
13
  background: transparent;
14
14
  }
15
15
 
16
16
  .details-overlay-dark[open] > summary::before {
17
- z-index: 99;
18
- background: $bg-black-fade;
17
+ z-index: 111;
18
+ background: var(--color-primer-canvas-backdrop);
19
19
  }
20
20
 
21
21
  .details-reset {
22
22
  // Remove marker added by the display: list-item browser default
23
- > summary { list-style: none; }
23
+ > summary {
24
+ list-style: none;
25
+ }
24
26
  // Remove marker added by details polyfill
25
- > summary::before { display: none; }
27
+ > summary::before {
28
+ display: none;
29
+ }
26
30
  // Remove marker added by Chrome
27
- > summary::-webkit-details-marker { display: none; }
31
+ > summary::-webkit-details-marker {
32
+ display: none;
33
+ }
34
+ }
35
+
36
+ .details-overlay > summary {
37
+ &:focus {
38
+ @include focusOutline;
39
+ }
28
40
  }
@@ -1,5 +1,5 @@
1
1
  // Flex utility classes
2
- // stylelint-disable block-opening-brace-space-after, block-opening-brace-space-before
2
+ // stylelint-disable block-opening-brace-space-before
3
3
  @each $breakpoint, $variant in $responsive-variants {
4
4
  @include breakpoint($breakpoint) {
5
5
  // Flexbox classes
@@ -9,8 +9,9 @@
9
9
  .flex#{$variant}-column { flex-direction: column !important; }
10
10
  .flex#{$variant}-column-reverse { flex-direction: column-reverse !important; }
11
11
 
12
- .flex#{$variant}-wrap { flex-wrap: wrap !important; }
13
- .flex#{$variant}-nowrap { flex-wrap: nowrap !important; }
12
+ .flex#{$variant}-wrap { flex-wrap: wrap !important; }
13
+ .flex#{$variant}-nowrap { flex-wrap: nowrap !important; }
14
+ .flex#{$variant}-wrap-reverse { flex-wrap: wrap-reverse !important; }
14
15
 
15
16
  .flex#{$variant}-justify-start { justify-content: flex-start !important; }
16
17
  .flex#{$variant}-justify-end { justify-content: flex-end !important; }
@@ -1,14 +1,14 @@
1
- @import "../support/index.scss";
1
+ @import '../support/index.scss';
2
2
  // utilities
3
- @import "./animations.scss";
4
- @import "./borders.scss";
5
- @import "./box-shadow.scss";
6
- @import "./colors.scss";
7
- @import "./details.scss";
8
- @import "./flexbox.scss";
9
- @import "./layout.scss";
10
- @import "./margin.scss";
11
- @import "./padding.scss";
12
- @import "./typography.scss";
3
+ @import './animations.scss';
4
+ @import './borders.scss';
5
+ @import './box-shadow.scss';
6
+ @import './colors.scss';
7
+ @import './details.scss';
8
+ @import './flexbox.scss';
9
+ @import './layout.scss';
10
+ @import './margin.scss';
11
+ @import './padding.scss';
12
+ @import './typography.scss';
13
13
  // Visibility and display should always come last in the imports so that they override other utilities with !important
14
- @import "./visibility-display.scss";
14
+ @import './visibility-display.scss';
@@ -1,7 +1,7 @@
1
1
  // Layout
2
- // stylelint-disable block-opening-brace-space-after, block-opening-brace-space-before, comment-empty-line-before
2
+ // stylelint-disable block-opening-brace-space-before, comment-empty-line-before
3
3
 
4
- // Loop through the breakpoint values
4
+ /* Position */
5
5
  @each $breakpoint, $variant in $responsive-variants {
6
6
  @include breakpoint($breakpoint) {
7
7
  @each $position in $responsive-positions {
@@ -12,14 +12,19 @@
12
12
  }
13
13
  }
14
14
 
15
- /* Set top 0 */
16
- .top-0 { top: 0 !important; }
17
- /* Set right 0 */
18
- .right-0 { right: 0 !important; }
19
- /* Set bottom 0 */
20
- .bottom-0 { bottom: 0 !important; }
21
- /* Set left 0 */
22
- .left-0 { left: 0 !important; }
15
+ /* Final position */
16
+ @each $breakpoint, $variant in $responsive-variants {
17
+ @include breakpoint($breakpoint) {
18
+ .top#{$variant}-0 { top: 0 !important; }
19
+ .right#{$variant}-0 { right: 0 !important; }
20
+ .bottom#{$variant}-0 { bottom: 0 !important; }
21
+ .left#{$variant}-0 { left: 0 !important; }
22
+ .top#{$variant}-auto { top: auto !important; }
23
+ .right#{$variant}-auto { right: auto !important; }
24
+ .bottom#{$variant}-auto { bottom: auto !important; }
25
+ .left#{$variant}-auto { left: auto !important; }
26
+ }
27
+ }
23
28
 
24
29
  /* Vertical align middle */
25
30
  .v-align-middle { vertical-align: middle !important; }
@@ -35,10 +40,14 @@
35
40
  .v-align-baseline { vertical-align: baseline !important; }
36
41
 
37
42
  // Overflow utilities
38
- @each $overflow in (visible, hidden, auto, scroll) {
39
- .overflow-#{$overflow} { overflow: $overflow !important; }
40
- .overflow-x-#{$overflow} { overflow-x: $overflow !important; }
41
- .overflow-y-#{$overflow} { overflow-y: $overflow !important; }
43
+ @each $breakpoint, $variant in $responsive-variants {
44
+ @include breakpoint($breakpoint) {
45
+ @each $overflow in (visible, hidden, auto, scroll) {
46
+ .overflow#{$variant}-#{$overflow} { overflow: $overflow !important; }
47
+ .overflow#{$variant}-x-#{$overflow} { overflow-x: $overflow !important; }
48
+ .overflow#{$variant}-y-#{$overflow} { overflow-y: $overflow !important; }
49
+ }
50
+ }
42
51
  }
43
52
 
44
53
  // Clear floats
@@ -5,33 +5,44 @@
5
5
  @each $breakpoint, $variant in $responsive-variants {
6
6
  @include breakpoint($breakpoint) {
7
7
  // Loop through the spacer values
8
- @each $scale, $size in $spacer-map {
9
- /* Set a $size margin to all sides at $breakpoint */
10
- .m#{$variant}-#{$scale} { margin: $size !important; }
8
+ @each $scale, $size in $spacer-map-extended {
9
+ @if ($scale < length($spacer-map)) {
10
+ /* Set a $size margin to all sides at $breakpoint */
11
+ .m#{$variant}-#{$scale} { margin: $size !important; }
12
+ }
13
+
11
14
  /* Set a $size margin on the top at $breakpoint */
12
15
  .mt#{$variant}-#{$scale} { margin-top: $size !important; }
13
- /* Set a $size margin on the right at $breakpoint */
14
- .mr#{$variant}-#{$scale} { margin-right: $size !important; }
15
16
  /* Set a $size margin on the bottom at $breakpoint */
16
17
  .mb#{$variant}-#{$scale} { margin-bottom: $size !important; }
17
- /* Set a $size margin on the left at $breakpoint */
18
- .ml#{$variant}-#{$scale} { margin-left: $size !important; }
18
+
19
+ @if ($scale < length($spacer-map)) {
20
+ /* Set a $size margin on the right at $breakpoint */
21
+ .mr#{$variant}-#{$scale} { margin-right: $size !important; }
22
+ /* Set a $size margin on the left at $breakpoint */
23
+ .ml#{$variant}-#{$scale} { margin-left: $size !important; }
24
+ }
19
25
 
20
26
  @if ($size != 0) {
21
27
  /* Set a negative $size margin on top at $breakpoint */
22
- .mt#{$variant}-n#{$scale} { margin-top : -$size !important; }
23
- /* Set a negative $size margin on the right at $breakpoint */
24
- .mr#{$variant}-n#{$scale} { margin-right : -$size !important; }
28
+ .mt#{$variant}-n#{$scale} { margin-top: -$size !important; }
25
29
  /* Set a negative $size margin on the bottom at $breakpoint */
26
30
  .mb#{$variant}-n#{$scale} { margin-bottom: -$size !important; }
27
- /* Set a negative $size margin on the left at $breakpoint */
28
- .ml#{$variant}-n#{$scale} { margin-left : -$size !important; }
31
+
32
+ @if ($scale < length($spacer-map)) {
33
+ /* Set a negative $size margin on the right at $breakpoint */
34
+ .mr#{$variant}-n#{$scale} { margin-right : -$size !important; }
35
+ /* Set a negative $size margin on the left at $breakpoint */
36
+ .ml#{$variant}-n#{$scale} { margin-left : -$size !important; }
37
+ }
29
38
  }
30
39
 
31
- /* Set a $size margin on the left & right at $breakpoint */
32
- .mx#{$variant}-#{$scale} {
33
- margin-right: $size !important;
34
- margin-left: $size !important;
40
+ @if ($scale < length($spacer-map)) {
41
+ /* Set a $size margin on the left & right at $breakpoint */
42
+ .mx#{$variant}-#{$scale} {
43
+ margin-right: $size !important;
44
+ margin-left: $size !important;
45
+ }
35
46
  }
36
47
 
37
48
  /* Set a $size margin on the top & bottom at $breakpoint */
@@ -48,3 +59,10 @@
48
59
  }
49
60
  }
50
61
  }
62
+
63
+ .m-auto { margin: auto !important; }
64
+
65
+ .mt-auto { margin-top: auto !important; }
66
+ .mr-auto { margin-right: auto !important; }
67
+ .mb-auto { margin-bottom: auto !important; }
68
+ .ml-auto { margin-left: auto !important; }
@@ -1,13 +1,16 @@
1
1
  // Padding spacer utilities
2
- // stylelint-disable block-opening-brace-space-before, declaration-colon-space-before, comment-empty-line-before
2
+ // stylelint-disable block-opening-brace-space-before, comment-empty-line-before
3
3
 
4
4
  // Responsive padding spacer utilities
5
5
  @each $breakpoint, $variant in $responsive-variants {
6
6
  @include breakpoint($breakpoint) {
7
7
  // Loop through the spacer values
8
- @each $scale, $size in $spacer-map {
9
- /* Set a $size padding to all sides at $breakpoint */
10
- .p#{$variant}-#{$scale} { padding: $size !important; }
8
+ @each $scale, $size in $spacer-map-extended {
9
+ @if ($scale < length($spacer-map)) {
10
+ /* Set a $size padding to all sides at $breakpoint */
11
+ .p#{$variant}-#{$scale} { padding: $size !important; }
12
+ }
13
+
11
14
  /* Set a $size padding to the top at $breakpoint */
12
15
  .pt#{$variant}-#{$scale} { padding-top: $size !important; }
13
16
  /* Set a $size padding to the right at $breakpoint */
@@ -17,10 +20,12 @@
17
20
  /* Set a $size padding to the left at $breakpoint */
18
21
  .pl#{$variant}-#{$scale} { padding-left: $size !important; }
19
22
 
20
- /* Set a $size padding to the left & right at $breakpoint */
21
- .px#{$variant}-#{$scale} {
22
- padding-right: $size !important;
23
- padding-left: $size !important;
23
+ @if ($scale < length($spacer-map)) {
24
+ /* Set a $size padding to the left & right at $breakpoint */
25
+ .px#{$variant}-#{$scale} {
26
+ padding-right: $size !important;
27
+ padding-left: $size !important;
28
+ }
24
29
  }
25
30
 
26
31
  /* Set a $size padding to the top & bottom at $breakpoint */
@@ -1,4 +1,4 @@
1
- // stylelint-disable block-closing-brace-space-before, comment-empty-line-before
1
+ // stylelint-disable comment-empty-line-before
2
2
 
3
3
  // Type scale variables found in ../support/lib/variables.scss
4
4
  // $h00-size-mobile: 40px;
@@ -154,7 +154,6 @@
154
154
  margin-bottom: 30px;
155
155
  font-size: $h3-size;
156
156
  font-weight: $font-weight-light;
157
- color: $text-gray;
158
157
  }
159
158
 
160
159
  // Line-height variations
@@ -192,7 +191,9 @@
192
191
  /* Set the font weight to normal */
193
192
  .text-normal { font-weight: $font-weight-normal !important; }
194
193
  /* Set the font weight to bold */
195
- .text-bold { font-weight: $font-weight-bold !important;}
194
+ .text-bold { font-weight: $font-weight-bold !important; }
195
+ .text-semibold { font-weight: $font-weight-semibold !important; }
196
+ .text-light { font-weight: $font-weight-light !important; }
196
197
  /* Set the font to italic */
197
198
  .text-italic { font-style: italic !important; }
198
199
  /* Make text uppercase */
@@ -207,7 +208,7 @@
207
208
  .ws-normal { white-space: normal !important; }
208
209
 
209
210
  /* Force long "words" to wrap if they exceed the width of the container */
210
- .break-word {
211
+ .wb-break-word {
211
212
  word-break: break-word !important;
212
213
  // this is for backwards compatibility with browsers that don't respect overflow-wrap
213
214
  word-wrap: break-word !important;
@@ -228,22 +229,11 @@
228
229
 
229
230
  .text-emphasized {
230
231
  font-weight: $font-weight-bold;
231
- color: $text-gray-dark;
232
232
  }
233
233
 
234
234
  // List styles
235
235
  .list-style-none { list-style: none !important; }
236
236
 
237
- // Text Shadows
238
- /* Add a dark text shadow */
239
- .text-shadow-dark {
240
- text-shadow: 0 1px 1px rgba($black, 0.25), 0 1px 25px rgba($black, 0.75);
241
- }
242
- /* Add a light text shadow */
243
- .text-shadow-light {
244
- text-shadow: 0 1px 0 rgba($white, 0.5);
245
- }
246
-
247
237
  /* Set to monospace font */
248
238
  .text-mono {
249
239
  font-family: $mono-font !important;
package/.browserslistrc DELETED
@@ -1,6 +0,0 @@
1
- > 5%
2
- last 2 firefox versions
3
- last 2 chrome versions
4
- last 2 safari versions
5
- last 2 edge versions
6
- ie 11
package/.eslintrc.json DELETED
@@ -1,13 +0,0 @@
1
- {
2
- "extends": [
3
- "plugin:github/es6",
4
- "plugin:github/recommended"
5
- ],
6
- "env": {
7
- "es6": true,
8
- "node": true
9
- },
10
- "parserOptions": {
11
- "ecmaVersion": 2017
12
- }
13
- }
package/.nowignore DELETED
@@ -1,5 +0,0 @@
1
- .*.sw?
2
- .changelog/
3
- dist/
4
- docs/dist
5
- docs/public/
package/MIGRATING.md DELETED
@@ -1,74 +0,0 @@
1
- # 12.0.0
2
- The v12 release marks a major transition from small, single-purpose npm packages (`primer-core`, `primer-marketing`, `primer-utilities`, etc.) to a single package — `@primer/css` — which contains all of the SCSS source files in subdirectories. Here's what you need to do to migrate different parts of your app:
3
-
4
- ## npm
5
- First, install the new package.
6
-
7
- ```sh
8
- npm install --save @primer/css
9
- ```
10
-
11
- If you use the `primer` package, all you'll need to do is:
12
-
13
- ```sh
14
- npm uninstall --save primer
15
- ```
16
-
17
- If you use other packages, such as `primer-utilities`, you will need to uninstall each one by name or use a command line tool like [jq](https://stedolan.github.io/jq/) to list them:
18
-
19
- ```sh
20
- jq -r '.dependencies | keys[] | select(.|startswith("primer"))' package.json
21
- ```
22
-
23
- And, if you're feeling saucy, uninstall them all by piping that to `xargs npm uninstall`. :sparkles:
24
-
25
- ## Sass
26
- There are a couple of things you'll need to change in your Sass setup when migrating to v12. This section is intentionally vague because environments vary wildly between text editors, Sass implementations, and application frameworks. When in doubt, consult the relevant documentation, and feel free to [file an issue][help] if you think that we can help.
27
-
28
- ### Sass imports
29
- Generally speaking, all of your Sass `@import` statements can be migrated with the following search-and-replace operations, **in the following order**:
30
-
31
- * If you import `primer/index.scss` or `primer`, just replace `primer` with `@primer/css` and you're done!
32
- * Otherwise...
33
- 1. Replace `primer-marketing-` with `@primer/css/marketing/`, e.g.
34
- * `primer-marketing-buttons/index.scss` becomes `@primer/css/marketing/buttons/index.scss`
35
- * `primer-marketing-utilities/index.scss` becomes `@primer/css/marketing/utilities/index.scss`
36
- 1. Replace `primer-` with `@primer/css/`, e.g.
37
- * `primer-markdown/index.scss` becomes `@primer/css/markdown/index.scss`
38
- * `primer-utilities/index.scss` becomes `@primer/css/utilities/index.scss`
39
- 1. Delete `lib/` from every Primer CSS path, e.g.
40
- * `primer-forms/lib/form-control.scss` becomes `@primer/css/forms/form-control.scss`
41
- * `primer-navigation/lib/subnav.scss` becomes `@primer/css/navigation/subnav.scss`
42
-
43
- If your text editor supports search and replace regular expressions, the following patterns should work:
44
-
45
- | find | replace |
46
- | :--- | :--- |
47
- | `primer-marketing-(\w+)(\/lib)?` | `@primer/css/marketing/$1` |
48
- | `primer-(\w+)(\/lib)?` | `@primer/css/$1` |
49
- | `primer\b` | `@primer/css`
50
-
51
- #### `primer-migrate`
52
- You can also use the included [`primer-migrate` script](bin/primer-migrate):
53
-
54
- ```sh
55
- npx -p @primer/css primer-migrate path/to/**/*.scss
56
- ```
57
-
58
- ### Sass include paths
59
- If you've installed Primer CSS with npm, you very likely already have `node_modules` listed in your Sass `includePaths` option, and you won't need to change anything. :tada:
60
-
61
- If you've installed Primer CSS with something _other than_ npm, or you don't know how it was installed, consult the documentation for your setup first, then [let us know][help] if you still can't figure it out.
62
-
63
- ## Compiled CSS files
64
-
65
- The compiled CSS files can be found under `/dist` in case you want to directly link to them.
66
-
67
- ## Fonts
68
- The marketing-specific font files published in the [`fonts` directory](https://unpkg.com/primer-marketing-support@2.0.0/fonts/) of `primer-marketing-support@2.0.0` are published in the `fonts` directory of `@primer/css`. If you use these fonts, you'll need to do the following:
69
-
70
- 1. Update any scripts that copy the `.woff` font files from `node_modules/primer-marketing-support/fonts` into your application to look for them in `node_modules/@primer/css/fonts`.
71
- 1. Update any webpack (or other bundler) resolution rules that look for fonts in `primer-marketing-support/fonts` to look for them in `@primer/css/fonts`.
72
- 1. Customize the [`$marketing-font-path` variable](src/marketing/support/variables.scss#L1) to match the path from which they're served.
73
-
74
- [help]: https://github.com/primer/css/issues/new?title=Help!&labels=v12,migration