@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
package/layout/grid.scss CHANGED
@@ -1,32 +1,32 @@
1
1
  // GRID
2
2
 
3
3
  // Columns
4
- .col-1 { width: (1 / 12 * 100%); }
5
- .col-2 { width: (2 / 12 * 100%); }
6
- .col-3 { width: (3 / 12 * 100%); }
7
- .col-4 { width: (4 / 12 * 100%); }
8
- .col-5 { width: (5 / 12 * 100%); }
9
- .col-6 { width: (6 / 12 * 100%); }
10
- .col-7 { width: (7 / 12 * 100%); }
11
- .col-8 { width: (8 / 12 * 100%); }
12
- .col-9 { width: (9 / 12 * 100%); }
13
- .col-10 { width: (10 / 12 * 100%); }
14
- .col-11 { width: (11 / 12 * 100%); }
4
+ .col-1 { width: (1 * 0.0833333333 * 100%); }
5
+ .col-2 { width: (2 * 0.0833333333 * 100%); }
6
+ .col-3 { width: (3 * 0.0833333333 * 100%); }
7
+ .col-4 { width: (4 * 0.0833333333 * 100%); }
8
+ .col-5 { width: (5 * 0.0833333333 * 100%); }
9
+ .col-6 { width: (6 * 0.0833333333 * 100%); }
10
+ .col-7 { width: (7 * 0.0833333333 * 100%); }
11
+ .col-8 { width: (8 * 0.0833333333 * 100%); }
12
+ .col-9 { width: (9 * 0.0833333333 * 100%); }
13
+ .col-10 { width: (10 * 0.0833333333 * 100%); }
14
+ .col-11 { width: (11 * 0.0833333333 * 100%); }
15
15
  .col-12 { width: 100%; }
16
16
 
17
17
  @each $breakpoint in map-keys($breakpoints) {
18
18
  @include breakpoint($breakpoint) {
19
- .col-#{$breakpoint}-1 { width: ( 1 / 12 * 100%); }
20
- .col-#{$breakpoint}-2 { width: ( 2 / 12 * 100%); }
21
- .col-#{$breakpoint}-3 { width: ( 3 / 12 * 100%); }
22
- .col-#{$breakpoint}-4 { width: ( 4 / 12 * 100%); }
23
- .col-#{$breakpoint}-5 { width: ( 5 / 12 * 100%); }
24
- .col-#{$breakpoint}-6 { width: ( 6 / 12 * 100%); }
25
- .col-#{$breakpoint}-7 { width: ( 7 / 12 * 100%); }
26
- .col-#{$breakpoint}-8 { width: ( 8 / 12 * 100%); }
27
- .col-#{$breakpoint}-9 { width: ( 9 / 12 * 100%); }
28
- .col-#{$breakpoint}-10 { width: ( 10 / 12 * 100%); }
29
- .col-#{$breakpoint}-11 { width: ( 11 / 12 * 100%); }
19
+ .col-#{$breakpoint}-1 { width: ( 1 * 0.0833333333 * 100%); }
20
+ .col-#{$breakpoint}-2 { width: ( 2 * 0.0833333333 * 100%); }
21
+ .col-#{$breakpoint}-3 { width: ( 3 * 0.0833333333 * 100%); }
22
+ .col-#{$breakpoint}-4 { width: ( 4 * 0.0833333333 * 100%); }
23
+ .col-#{$breakpoint}-5 { width: ( 5 * 0.0833333333 * 100%); }
24
+ .col-#{$breakpoint}-6 { width: ( 6 * 0.0833333333 * 100%); }
25
+ .col-#{$breakpoint}-7 { width: ( 7 * 0.0833333333 * 100%); }
26
+ .col-#{$breakpoint}-8 { width: ( 8 * 0.0833333333 * 100%); }
27
+ .col-#{$breakpoint}-9 { width: ( 9 * 0.0833333333 * 100%); }
28
+ .col-#{$breakpoint}-10 { width: ( 10 * 0.0833333333 * 100%); }
29
+ .col-#{$breakpoint}-11 { width: ( 11 * 0.0833333333 * 100%); }
30
30
  .col-#{$breakpoint}-12 { width: 100%; }
31
31
  }
32
32
  }
@@ -37,7 +37,7 @@
37
37
  margin-right: -$gutter-width;
38
38
  margin-left: -$gutter-width;
39
39
 
40
- > [class*="col-"] {
40
+ > [class*='col-'] {
41
41
  padding-right: $gutter-width !important;
42
42
  padding-left: $gutter-width !important;
43
43
  }
package/layout/index.scss CHANGED
@@ -1,4 +1,7 @@
1
- @import "../support/index.scss";
2
- @import "./container.scss";
3
- @import "./grid.scss";
4
- @import "./grid-offset.scss";
1
+ @import '../support/index.scss';
2
+ @import './mixins.scss';
3
+
4
+ @import './container.scss';
5
+ @import './grid.scss';
6
+ @import './grid-offset.scss';
7
+ @import './layout.scss';
@@ -0,0 +1,185 @@
1
+ // Layout component
2
+
3
+ .Layout {
4
+ display: grid;
5
+ --Layout-sidebar-width: #{map-get($sidebar-width, 'sm')};
6
+ --Layout-gutter: 16px;
7
+
8
+ @media (max-width: calc(#{$width-sm} - 1px)) {
9
+ @include flow-as-row;
10
+ }
11
+
12
+ &.Layout--flowRow-until-md {
13
+ @media (max-width: calc(#{$width-md} - 1px)) {
14
+ @include flow-as-row;
15
+ }
16
+ }
17
+
18
+ &.Layout--flowRow-until-lg {
19
+ @media (max-width: calc(#{$width-lg} - 1px)) {
20
+ @include flow-as-row;
21
+ }
22
+ }
23
+
24
+ // Flow as column
25
+
26
+ grid-auto-flow: column;
27
+ grid-template-columns: auto 0 1fr; // sidebar column, separator, main column
28
+ // stylelint-disable-next-line primer/no-undefined-vars
29
+ grid-gap: var(--Layout-gutter);
30
+
31
+ .Layout-sidebar {
32
+ grid-column: 1;
33
+ }
34
+
35
+ .Layout-divider {
36
+ display: none;
37
+ }
38
+
39
+ .Layout-main {
40
+ grid-column: 2 / span 2;
41
+ }
42
+
43
+ // Gutter spacing
44
+
45
+ @include breakpoint(lg) {
46
+ --Layout-gutter: 24px;
47
+ }
48
+
49
+ &.Layout--gutter-none {
50
+ --Layout-gutter: 0;
51
+ }
52
+
53
+ &.Layout--gutter-condensed {
54
+ --Layout-gutter: 16px;
55
+ }
56
+
57
+ &.Layout--gutter-spacious {
58
+ @include breakpoint(lg) {
59
+ --Layout-gutter: 32px;
60
+ }
61
+
62
+ @include breakpoint(xl) {
63
+ --Layout-gutter: 40px;
64
+ }
65
+ }
66
+
67
+ // Sidebar width
68
+
69
+ @each $breakpoint in map-keys($sidebar-width) {
70
+ @include breakpoint($breakpoint) {
71
+ --Layout-sidebar-width: #{map-get($sidebar-width, $breakpoint)};
72
+ }
73
+ }
74
+
75
+ &.Layout--sidebar-narrow {
76
+ @each $breakpoint in map-keys($sidebar-narrow-width) {
77
+ @include breakpoint($breakpoint) {
78
+ --Layout-sidebar-width: #{map-get($sidebar-narrow-width, $breakpoint)};
79
+ }
80
+ }
81
+ }
82
+
83
+ &.Layout--sidebar-wide {
84
+ @each $breakpoint in map-keys($sidebar-wide-width) {
85
+ @include breakpoint($breakpoint) {
86
+ --Layout-sidebar-width: #{map-get($sidebar-wide-width, $breakpoint)};
87
+ }
88
+ }
89
+ }
90
+
91
+ // Sidebar position
92
+
93
+ &.Layout--sidebarPosition-start {
94
+ .Layout-sidebar {
95
+ grid-column: 1;
96
+ }
97
+
98
+ .Layout-main {
99
+ grid-column: 2 / span 2;
100
+ }
101
+ }
102
+
103
+ &.Layout--sidebarPosition-end {
104
+ grid-template-columns: 1fr 0 auto;
105
+
106
+ .Layout-main {
107
+ grid-column: 1;
108
+ }
109
+
110
+ .Layout-sidebar {
111
+ grid-column: 2 / span 2;
112
+ }
113
+ }
114
+
115
+ // Sidebar divider
116
+
117
+ &.Layout--divided {
118
+ .Layout-divider {
119
+ display: block;
120
+ grid-column: 2;
121
+ width: 1px;
122
+ // stylelint-disable-next-line primer/spacing
123
+ margin-right: -1px;
124
+ background: var(--color-border-default);
125
+ }
126
+
127
+ .Layout-main {
128
+ grid-column: 3 / span 1;
129
+ }
130
+
131
+ &.Layout--sidebarPosition-end {
132
+ .Layout-sidebar {
133
+ grid-column: 3 / span 1;
134
+ }
135
+
136
+ .Layout-main {
137
+ grid-column: 1;
138
+ }
139
+ }
140
+ }
141
+ }
142
+
143
+ .Layout-divider {
144
+ display: none;
145
+ width: 1px;
146
+ }
147
+
148
+ .Layout-sidebar {
149
+ // stylelint-disable-next-line primer/no-undefined-vars
150
+ width: var(--Layout-sidebar-width);
151
+ }
152
+
153
+ .Layout-main {
154
+ min-width: 0;
155
+
156
+ // Centered main column
157
+ // FIXME: right-aligned sidebar
158
+ .Layout-main-centered-md,
159
+ .Layout-main-centered-lg,
160
+ .Layout-main-centered-xl {
161
+ margin-right: auto;
162
+ margin-left: auto;
163
+
164
+ > .container-md,
165
+ > .container-lg,
166
+ > .container-xl {
167
+ margin-left: 0;
168
+ }
169
+ }
170
+
171
+ .Layout-main-centered-md {
172
+ // stylelint-disable-next-line primer/no-undefined-vars
173
+ max-width: calc(#{$container-md} + var(--Layout-sidebar-width) + var(--Layout-gutter));
174
+ }
175
+
176
+ .Layout-main-centered-lg {
177
+ // stylelint-disable-next-line primer/no-undefined-vars
178
+ max-width: calc(#{$container-lg} + var(--Layout-sidebar-width) + var(--Layout-gutter));
179
+ }
180
+
181
+ .Layout-main-centered-xl {
182
+ // stylelint-disable-next-line primer/no-undefined-vars
183
+ max-width: calc(#{$container-xl} + var(--Layout-sidebar-width) + var(--Layout-gutter));
184
+ }
185
+ }
@@ -0,0 +1,79 @@
1
+ // Layout mixins
2
+
3
+ @mixin flow-as-row {
4
+ grid-auto-flow: row;
5
+ grid-template-columns: 1fr !important;
6
+
7
+ .Layout-sidebar,
8
+ .Layout-divider,
9
+ .Layout-main {
10
+ width: 100% !important;
11
+ grid-column: 1 !important;
12
+ }
13
+
14
+ &.Layout--sidebarPosition-flowRow-start {
15
+ .Layout-sidebar {
16
+ grid-row: 1;
17
+ }
18
+
19
+ .Layout-main {
20
+ grid-row: 2 / span 2;
21
+ }
22
+ }
23
+
24
+ &.Layout--sidebarPosition-flowRow-end {
25
+ .Layout-sidebar {
26
+ grid-row: 2 / span 2;
27
+ }
28
+
29
+ .Layout-main {
30
+ grid-row: 1;
31
+ }
32
+ }
33
+
34
+ &.Layout--sidebarPosition-flowRow-none {
35
+ .Layout-sidebar {
36
+ display: none;
37
+ }
38
+ }
39
+
40
+ &.Layout--divided {
41
+ @include flow-as-row-divider;
42
+
43
+ .Layout-main {
44
+ grid-row: 3 / span 1;
45
+ }
46
+
47
+ &.Layout--sidebarPosition-flowRow-end {
48
+ .Layout-sidebar {
49
+ grid-row: 3 / span 1;
50
+ }
51
+
52
+ .Layout-main {
53
+ grid-row: 1;
54
+ }
55
+ }
56
+ }
57
+ }
58
+
59
+ @mixin flow-as-row-divider {
60
+ --Layout-gutter: 0;
61
+
62
+ .Layout-divider {
63
+ height: 1px;
64
+ grid-row: 2;
65
+
66
+ &.Layout-divider--flowRow-hidden {
67
+ display: none;
68
+ }
69
+
70
+ &.Layout-divider--flowRow-shallow {
71
+ height: 8px;
72
+ margin-right: 0;
73
+ background: var(--color-canvas-inset);
74
+ border-color: var(--color-border-default);
75
+ border-style: solid;
76
+ border-width: $border-width 0;
77
+ }
78
+ }
79
+ }
@@ -1,25 +1,25 @@
1
1
  ---
2
- bundle: "{bundle}"
2
+ bundle: "links"
3
3
  generated: true
4
4
  ---
5
5
 
6
- # Primer CSS: `{bundle}` bundle
6
+ # Primer CSS: `links` bundle
7
7
 
8
8
  ## Usage
9
9
 
10
10
  Primer CSS source files are written in [SCSS]. To include this Primer CSS module in your own build, ensure that your `node_modules` directory is listed in your Sass include paths, then import it with:
11
11
 
12
12
  ```scss
13
- @import "@primer/css/{bundle}/index.scss";
13
+ @import "@primer/css/links/index.scss";
14
14
  ```
15
15
 
16
16
  ## Build
17
17
 
18
- The `@primer/css` npm package includes a standalone CSS build of this module in `dist/{bundle}.css`.
18
+ The `@primer/css` npm package includes a standalone CSS build of this module in `dist/links.css`.
19
19
 
20
20
  ## License
21
21
 
22
- [MIT](https://github.com/primer/css/blob/master/LICENSE) © [GitHub](https://github.com/)
22
+ [MIT](https://github.com/primer/css/blob/main/LICENSE) © [GitHub](https://github.com/)
23
23
 
24
24
 
25
25
  [scss]: https://sass-lang.com/documentation/syntax#scss
@@ -0,0 +1,3 @@
1
+ // support files
2
+ @import '../support/index.scss';
3
+ @import './link.scss';
@@ -0,0 +1,55 @@
1
+ // Links
2
+
3
+ .Link {
4
+ color: var(--color-accent-fg);
5
+
6
+ &:hover {
7
+ text-decoration: underline;
8
+ cursor: pointer;
9
+ }
10
+ }
11
+
12
+ .Link--primary {
13
+ color: var(--color-fg-default) !important;
14
+
15
+ &:hover {
16
+ color: var(--color-accent-fg) !important;
17
+ }
18
+ }
19
+
20
+ .Link--secondary {
21
+ color: var(--color-fg-muted) !important;
22
+
23
+ &:hover {
24
+ color: var(--color-accent-fg) !important;
25
+ }
26
+ }
27
+
28
+ .Link--muted {
29
+ color: var(--color-fg-muted) !important;
30
+
31
+ &:hover {
32
+ color: var(--color-accent-fg) !important;
33
+ text-decoration: none;
34
+ }
35
+ }
36
+
37
+ // Set the link color only on hover
38
+ // Useful when you want only part of a link to turn blue on hover
39
+ .Link--onHover {
40
+ &:hover {
41
+ color: var(--color-accent-fg) !important;
42
+ text-decoration: underline;
43
+ cursor: pointer;
44
+ }
45
+ }
46
+
47
+ // When using a color utility class inside of a link class,
48
+ // color should change with link on hover.
49
+ .Link--secondary,
50
+ .Link--primary,
51
+ .Link--muted {
52
+ &:hover [class*='color-text'] {
53
+ color: inherit !important;
54
+ }
55
+ }
package/loaders/README.md CHANGED
@@ -19,7 +19,7 @@ The `@primer/css` npm package includes a standalone CSS build of this module in
19
19
 
20
20
  ## License
21
21
 
22
- [MIT](https://github.com/primer/css/blob/master/LICENSE) © [GitHub](https://github.com/)
22
+ [MIT](https://github.com/primer/css/blob/main/LICENSE) © [GitHub](https://github.com/)
23
23
 
24
24
 
25
25
  [scss]: https://sass-lang.com/documentation/syntax#scss
@@ -1,2 +1,2 @@
1
- @import "../support/index.scss";
2
- @import "./loaders.scss";
1
+ @import '../support/index.scss';
2
+ @import './loaders.scss';
@@ -9,7 +9,7 @@
9
9
 
10
10
  &::after {
11
11
  display: inline-block;
12
- content: "...";
12
+ content: '...';
13
13
  animation: AnimatedEllipsis-keyframes 1.2s steps(4, jump-none) infinite;
14
14
  }
15
15
 
@@ -19,7 +19,7 @@ The `@primer/css` npm package includes a standalone CSS build of this module in
19
19
 
20
20
  ## License
21
21
 
22
- [MIT](https://github.com/primer/css/blob/master/LICENSE) © [GitHub](https://github.com/)
22
+ [MIT](https://github.com/primer/css/blob/main/LICENSE) © [GitHub](https://github.com/)
23
23
 
24
24
 
25
25
  [scss]: https://sass-lang.com/documentation/syntax#scss
@@ -15,7 +15,7 @@
15
15
  // stylelint-disable-next-line primer/spacing
16
16
  padding: 10px $spacer-2 9px;
17
17
  text-align: right;
18
- background: $bg-white;
18
+ background: var(--color-canvas-default);
19
19
  border: 0;
20
20
  }
21
21
 
@@ -23,7 +23,7 @@
23
23
 
24
24
  th {
25
25
  font-weight: $font-weight-bold;
26
- background: $bg-gray;
26
+ background: var(--color-canvas-subtle);
27
27
  border-top: 0;
28
28
  }
29
29
  }
@@ -8,8 +8,7 @@
8
8
  margin: 0;
9
9
  // stylelint-disable-next-line primer/typography
10
10
  font-size: 85%;
11
- // stylelint-disable-next-line primer/colors
12
- background-color: rgba($black, 0.05);
11
+ background-color: var(--color-neutral-muted);
13
12
  border-radius: $border-radius;
14
13
 
15
14
  br { display: none; }
@@ -20,12 +19,15 @@
20
19
  pre {
21
20
  word-wrap: normal;
22
21
 
22
+ code {
23
+ // stylelint-disable-next-line primer/typography
24
+ font-size: 100%;
25
+ }
26
+
23
27
  // Code tags within code blocks (<pre>s)
24
28
  > code {
25
29
  padding: 0;
26
30
  margin: 0;
27
- // stylelint-disable-next-line primer/typography
28
- font-size: 100%;
29
31
  word-break: normal;
30
32
  white-space: pre;
31
33
  background: transparent;
@@ -50,7 +52,7 @@
50
52
  font-size: 85%;
51
53
  // stylelint-disable-next-line primer/typography
52
54
  line-height: 1.45;
53
- background-color: $bg-gray;
55
+ background-color: var(--color-canvas-subtle);
54
56
  border-radius: $border-radius;
55
57
  }
56
58
 
@@ -0,0 +1,37 @@
1
+ // stylelint-disable selector-max-type
2
+ // stylelint-disable selector-max-compound-selectors
3
+
4
+ .markdown-body .footnotes {
5
+ font-size: $h6-size;
6
+ color: var(--color-fg-muted);
7
+ border-top: $border;
8
+
9
+ ol {
10
+ padding-left: $spacer-3;
11
+ }
12
+
13
+ li {
14
+ position: relative;
15
+ }
16
+
17
+ li:target::before {
18
+ position: absolute;
19
+ top: -$spacer-2;
20
+ right: -$spacer-2;
21
+ bottom: -$spacer-2;
22
+ left: -$spacer-4;
23
+ pointer-events: none;
24
+ content: '';
25
+ // stylelint-disable-next-line primer/borders
26
+ border: 2px $border-style var(--color-accent-emphasis);
27
+ border-radius: $border-radius;
28
+ }
29
+
30
+ li:target {
31
+ color: var(--color-fg-default);
32
+ }
33
+
34
+ .data-footnote-backref g-emoji {
35
+ font-family: monospace;
36
+ }
37
+ }
@@ -15,7 +15,7 @@
15
15
  line-height: $lh-condensed;
16
16
 
17
17
  .octicon-link {
18
- color: $text-black;
18
+ color: var(--color-fg-default);
19
19
  vertical-align: middle;
20
20
  visibility: hidden;
21
21
  }
@@ -30,6 +30,8 @@
30
30
 
31
31
  tt,
32
32
  code {
33
+ // stylelint-disable-next-line primer/spacing
34
+ padding: 0 0.2em;
33
35
  font-size: inherit;
34
36
  }
35
37
  }
@@ -39,7 +41,7 @@
39
41
  padding-bottom: 0.3em;
40
42
  // stylelint-disable-next-line primer/typography
41
43
  font-size: 2em;
42
- border-bottom: $border-width $border-style $border-gray-light;
44
+ border-bottom: $border-width $border-style var(--color-border-muted);
43
45
  }
44
46
 
45
47
  h2 {
@@ -47,7 +49,7 @@
47
49
  padding-bottom: 0.3em;
48
50
  // stylelint-disable-next-line primer/typography
49
51
  font-size: 1.5em;
50
- border-bottom: $border-width $border-style $border-gray-light;
52
+ border-bottom: $border-width $border-style var(--color-border-muted);
51
53
  }
52
54
 
53
55
  h3 {
@@ -67,6 +69,6 @@
67
69
  h6 {
68
70
  // stylelint-disable-next-line primer/typography
69
71
  font-size: 0.85em;
70
- color: $text-gray-light;
72
+ color: var(--color-fg-muted);
71
73
  }
72
74
  }
@@ -8,7 +8,7 @@
8
8
  // because we put padding on the images to hide header lines, and some people
9
9
  // specify the width of their images in their markdown.
10
10
  box-sizing: content-box;
11
- background-color: $bg-white;
11
+ background-color: var(--color-canvas-default);
12
12
 
13
13
  &[align=right] {
14
14
  // stylelint-disable-next-line primer/spacing
@@ -44,8 +44,7 @@
44
44
  // stylelint-disable-next-line primer/spacing
45
45
  margin: 13px 0 0;
46
46
  overflow: hidden;
47
- // stylelint-disable-next-line primer/borders
48
- border: $border-width $border-style lighten($gray-300, 5%);
47
+ border: $border-width $border-style var(--color-border-default);
49
48
  }
50
49
 
51
50
  span img {
@@ -58,7 +57,7 @@
58
57
  // stylelint-disable-next-line primer/spacing
59
58
  padding: 5px 0 0;
60
59
  clear: both;
61
- color: $text-gray-dark;
60
+ color: var(--color-fg-default);
62
61
  }
63
62
  }
64
63
 
@@ -1,8 +1,9 @@
1
- @import "../support/index.scss";
2
- @import "./markdown-body.scss";
3
- @import "./headings.scss";
4
- @import "./lists.scss";
5
- @import "./tables.scss";
6
- @import "./images.scss";
7
- @import "./code.scss";
8
- @import "./blob-csv.scss";
1
+ @import '../support/index.scss';
2
+ @import './markdown-body.scss';
3
+ @import './headings.scss';
4
+ @import './lists.scss';
5
+ @import './tables.scss';
6
+ @import './images.scss';
7
+ @import './code.scss';
8
+ @import './blob-csv.scss';
9
+ @import './footnotes.scss';