@primer/css 0.0.0-1f8274f → 0.0.0-2021101020130
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +1197 -133
- package/CODE_OF_CONDUCT.md +1 -1
- package/CONTRIBUTING.md +85 -0
- package/DEVELOP.md +11 -50
- package/LICENSE +1 -1
- package/README.md +13 -15
- package/RELEASING.md +5 -72
- package/actionlist/action-list-item-divider.scss +42 -0
- package/actionlist/action-list-item.scss +439 -0
- package/actionlist/action-list-variables.scss +8 -0
- package/actionlist/action-list.scss +33 -0
- package/actionlist/index.scss +5 -0
- package/alerts/README.md +11 -22
- package/alerts/flash.scss +91 -21
- package/alerts/index.scss +2 -2
- package/autocomplete/README.md +25 -0
- package/autocomplete/autocomplete.scss +58 -0
- package/autocomplete/index.scss +4 -0
- package/autocomplete/suggester.scss +92 -0
- package/avatars/README.md +11 -23
- package/avatars/avatar-parent-child.scss +4 -3
- package/avatars/avatar-stack.scss +21 -13
- package/avatars/avatar.scss +31 -3
- package/avatars/circle-badge.scss +5 -4
- package/avatars/index.scss +5 -5
- package/base/README.md +11 -22
- package/base/base.scss +40 -6
- package/base/index.scss +6 -4
- package/base/kbd.scss +20 -0
- package/base/normalize.scss +17 -57
- package/base/octicons.scss +6 -0
- package/base/typography-base.scss +2 -0
- package/blankslate/README.md +11 -23
- package/blankslate/blankslate.scss +25 -12
- package/blankslate/index.scss +2 -2
- package/box/README.md +11 -23
- package/box/box.scss +52 -44
- package/box/index.scss +2 -2
- package/branch-name/README.md +11 -23
- package/branch-name/branch-name.scss +18 -8
- package/branch-name/index.scss +2 -2
- package/breadcrumb/README.md +17 -13
- package/breadcrumb/breadcrumb.scss +15 -5
- package/breadcrumb/index.scss +2 -2
- package/buttons/README.md +11 -23
- package/buttons/button-group.scss +2 -0
- package/buttons/button.scss +218 -144
- package/buttons/index.scss +4 -3
- package/buttons/misc.scss +212 -0
- package/color-modes/index.scss +9 -0
- package/color-modes/native.scss +10 -0
- package/color-modes/themes/dark.scss +7 -0
- package/color-modes/themes/dark_colorblind.scss +7 -0
- package/color-modes/themes/dark_dimmed.scss +7 -0
- package/color-modes/themes/dark_high_contrast.scss +7 -0
- package/color-modes/themes/light.scss +7 -0
- package/color-modes/themes/light_colorblind.scss +7 -0
- package/core/README.md +11 -23
- package/core/index.scss +19 -20
- package/deprecations.js +24 -0
- package/deprecations.json +539 -0
- package/dist/actionlist.css +2 -0
- package/dist/actionlist.css.map +1 -0
- package/dist/actionlist.js +1 -0
- package/dist/alerts.css +1 -2
- package/dist/alerts.css.map +1 -1
- package/dist/alerts.js +1 -1
- package/dist/autocomplete.css +2 -0
- package/dist/autocomplete.css.map +1 -0
- package/dist/autocomplete.js +1 -0
- package/dist/avatars.css +1 -2
- package/dist/avatars.css.map +1 -1
- package/dist/avatars.js +1 -1
- package/dist/base.css +1 -2
- package/dist/base.css.map +1 -1
- package/dist/base.js +1 -1
- package/dist/blankslate.css +1 -2
- package/dist/blankslate.css.map +1 -1
- package/dist/blankslate.js +1 -1
- package/dist/box.css +1 -2
- package/dist/box.css.map +1 -1
- package/dist/box.js +1 -1
- package/dist/branch-name.css +1 -2
- package/dist/branch-name.css.map +1 -1
- package/dist/branch-name.js +1 -1
- package/dist/breadcrumb.css +1 -2
- package/dist/breadcrumb.css.map +1 -1
- package/dist/breadcrumb.js +1 -1
- package/dist/buttons.css +1 -2
- package/dist/buttons.css.map +1 -1
- package/dist/buttons.js +1 -1
- package/dist/color-modes.css +2 -0
- package/dist/color-modes.css.map +1 -0
- package/dist/color-modes.js +1 -0
- package/dist/core.css +3 -4
- package/dist/core.css.map +1 -1
- package/dist/core.js +1 -1
- package/dist/deprecations.json +539 -0
- package/dist/dropdown.css +2 -0
- package/dist/dropdown.css.map +1 -0
- package/dist/dropdown.js +1 -0
- package/dist/forms.css +1 -2
- package/dist/forms.css.map +1 -1
- package/dist/forms.js +1 -1
- package/dist/header.css +2 -0
- package/dist/header.css.map +1 -0
- package/dist/header.js +1 -0
- package/dist/labels.css +1 -2
- package/dist/labels.css.map +1 -1
- package/dist/labels.js +1 -1
- package/dist/layout.css +1 -2
- package/dist/layout.css.map +1 -1
- package/dist/layout.js +1 -1
- package/dist/links.css +2 -0
- package/dist/links.css.map +1 -0
- package/dist/links.js +1 -0
- package/dist/loaders.css +2 -0
- package/dist/loaders.css.map +1 -0
- package/dist/loaders.js +1 -0
- package/dist/markdown.css +1 -2
- package/dist/markdown.css.map +1 -1
- package/dist/markdown.js +1 -1
- package/dist/marketing-buttons.css +1 -2
- package/dist/marketing-buttons.css.map +1 -1
- package/dist/marketing-buttons.js +1 -1
- package/dist/marketing-support.css +1 -2
- package/dist/marketing-support.js +1 -1
- package/dist/marketing-type.css +1 -2
- package/dist/marketing-type.css.map +1 -1
- package/dist/marketing-type.js +1 -1
- package/dist/marketing-utilities.css +1 -2
- package/dist/marketing-utilities.css.map +1 -1
- package/dist/marketing-utilities.js +1 -1
- package/dist/marketing.css +3 -4
- package/dist/marketing.css.map +1 -1
- package/dist/marketing.js +1 -1
- package/dist/meta.json +325 -282
- package/dist/navigation.css +1 -2
- package/dist/navigation.css.map +1 -1
- package/dist/navigation.js +1 -1
- package/dist/pagination.css +1 -2
- package/dist/pagination.css.map +1 -1
- package/dist/pagination.js +1 -1
- package/dist/popover.css +1 -2
- package/dist/popover.css.map +1 -1
- package/dist/popover.js +1 -1
- package/dist/primer.css +13 -14
- package/dist/primer.css.map +1 -1
- package/dist/primer.js +1 -1
- package/dist/product.css +3 -4
- package/dist/product.css.map +1 -1
- package/dist/product.js +1 -1
- package/dist/progress.css +1 -2
- package/dist/progress.css.map +1 -1
- package/dist/progress.js +1 -1
- package/dist/select-menu.css +2 -0
- package/dist/select-menu.css.map +1 -0
- package/dist/select-menu.js +1 -0
- package/dist/stats/actionlist.json +1 -0
- package/dist/stats/alerts.json +1 -1
- package/dist/stats/autocomplete.json +1 -0
- package/dist/stats/avatars.json +1 -1
- package/dist/stats/base.json +1 -1
- package/dist/stats/blankslate.json +1 -1
- package/dist/stats/box.json +1 -1
- package/dist/stats/branch-name.json +1 -1
- package/dist/stats/breadcrumb.json +1 -1
- package/dist/stats/buttons.json +1 -1
- package/dist/stats/color-modes.json +1 -0
- package/dist/stats/core.json +1 -1
- package/dist/stats/dropdown.json +1 -0
- package/dist/stats/forms.json +1 -1
- package/dist/stats/header.json +1 -0
- package/dist/stats/labels.json +1 -1
- package/dist/stats/layout.json +1 -1
- package/dist/stats/links.json +1 -0
- package/dist/stats/loaders.json +1 -0
- package/dist/stats/markdown.json +1 -1
- package/dist/stats/marketing-buttons.json +1 -1
- package/dist/stats/marketing-support.json +1 -1
- package/dist/stats/marketing-type.json +1 -1
- package/dist/stats/marketing-utilities.json +1 -1
- package/dist/stats/marketing.json +1 -1
- package/dist/stats/navigation.json +1 -1
- package/dist/stats/pagination.json +1 -1
- package/dist/stats/popover.json +1 -1
- package/dist/stats/primer.json +1 -1
- package/dist/stats/product.json +1 -1
- package/dist/stats/progress.json +1 -1
- package/dist/stats/select-menu.json +1 -0
- package/dist/stats/subhead.json +1 -1
- package/dist/stats/support.json +1 -1
- package/dist/stats/table-object.json +1 -1
- package/dist/stats/timeline.json +1 -0
- package/dist/stats/toasts.json +1 -0
- package/dist/stats/tooltips.json +1 -1
- package/dist/stats/truncate.json +1 -1
- package/dist/stats/utilities.json +1 -1
- package/dist/subhead.css +1 -2
- package/dist/subhead.css.map +1 -1
- package/dist/subhead.js +1 -1
- package/dist/support.css +1 -1
- package/dist/support.js +1 -1
- package/dist/table-object.css +0 -1
- package/dist/table-object.css.map +1 -1
- package/dist/table-object.js +1 -1
- package/dist/timeline.css +2 -0
- package/dist/timeline.css.map +1 -0
- package/dist/timeline.js +1 -0
- package/dist/toasts.css +2 -0
- package/dist/toasts.css.map +1 -0
- package/dist/toasts.js +1 -0
- package/dist/tooltips.css +1 -2
- package/dist/tooltips.css.map +1 -1
- package/dist/tooltips.js +1 -1
- package/dist/truncate.css +1 -2
- package/dist/truncate.css.map +1 -1
- package/dist/truncate.js +1 -1
- package/dist/utilities.css +1 -2
- package/dist/utilities.css.map +1 -1
- package/dist/utilities.js +1 -1
- package/dist/variables.json +1352 -0
- package/dropdown/README.md +25 -0
- package/dropdown/dropdown.scss +270 -0
- package/dropdown/index.scss +2 -0
- package/forms/README.md +11 -23
- package/forms/form-control.scss +73 -37
- package/forms/form-group.scss +83 -46
- package/forms/form-select.scss +17 -5
- package/forms/form-validation.scss +51 -32
- package/forms/index.scss +7 -6
- package/forms/input-group.scss +10 -0
- package/forms/radio-group.scss +62 -0
- package/header/README.md +25 -0
- package/header/header.scss +47 -0
- package/header/index.scss +2 -0
- package/index.scss +7 -4
- package/labels/README.md +11 -23
- package/labels/counters.scss +24 -13
- package/labels/diffstat.scss +37 -0
- package/labels/index.scss +8 -4
- package/labels/issue-labels.scss +23 -0
- package/labels/labels.scss +59 -40
- package/labels/mixins.scss +32 -0
- package/labels/states.scss +40 -19
- package/layout/README.md +11 -23
- package/layout/container.scss +0 -8
- package/layout/grid-offset.scss +11 -11
- package/layout/grid.scss +23 -23
- package/layout/index.scss +7 -5
- package/layout/layout.scss +185 -0
- package/layout/mixins.scss +79 -0
- package/links/README.md +25 -0
- package/links/index.scss +3 -0
- package/links/link.scss +55 -0
- package/loaders/README.md +25 -0
- package/loaders/index.scss +2 -0
- package/loaders/loaders.scss +19 -0
- package/markdown/README.md +11 -23
- package/markdown/blob-csv.scss +4 -2
- package/markdown/code.scss +11 -3
- package/markdown/footnotes.scss +37 -0
- package/markdown/headings.scss +13 -4
- package/markdown/images.scss +15 -4
- package/markdown/index.scss +9 -8
- package/markdown/lists.scss +19 -5
- package/markdown/markdown-body.scss +15 -18
- package/markdown/tables.scss +8 -5
- package/marketing/README.md +11 -23
- package/marketing/buttons/button.scss +82 -61
- package/marketing/index.scss +6 -11
- package/marketing/support/index.scss +1 -0
- package/marketing/support/mixins.scss +66 -0
- package/marketing/support/variables.scss +110 -51
- package/marketing/type/typography.scss +100 -62
- package/marketing/utilities/animations.scss +9 -0
- package/marketing/utilities/filters.scss +0 -1
- package/marketing/utilities/index.scss +2 -3
- package/marketing/utilities/layout.scss +32 -11
- package/navigation/README.md +11 -23
- package/navigation/filter-list.scss +16 -14
- package/navigation/index.scss +7 -6
- package/navigation/menu.scss +42 -35
- package/navigation/sidenav.scss +99 -0
- package/navigation/subnav.scss +28 -21
- package/navigation/tabnav.scss +45 -21
- package/navigation/underline-nav.scss +36 -22
- package/package.json +78 -101
- package/pagination/README.md +12 -14
- package/pagination/index.scss +2 -2
- package/pagination/pagination.scss +61 -37
- package/popover/README.md +11 -24
- package/popover/index.scss +2 -2
- package/popover/popover.scss +18 -9
- package/postcss.config.cjs +22 -0
- package/prettier.config.cjs +1 -0
- package/product/README.md +11 -23
- package/product/index.scss +19 -17
- package/progress/README.md +11 -23
- package/progress/index.scss +2 -2
- package/progress/progress.scss +11 -1
- package/select-menu/README.md +25 -0
- package/select-menu/index.scss +3 -0
- package/select-menu/select-menu.scss +464 -0
- package/stylelint.config.cjs +16 -0
- package/subhead/README.md +11 -25
- package/subhead/index.scss +2 -2
- package/subhead/subhead.scss +10 -4
- package/support/README.md +12 -18
- package/support/index.scss +7 -8
- package/support/mixins/color-modes.scss +106 -0
- package/support/mixins/misc.scss +19 -13
- package/support/mixins/typography.scss +1 -1
- package/support/variables/layout.scss +104 -11
- package/support/variables/misc.scss +7 -30
- package/support/variables/typography.scss +4 -4
- package/table-object/README.md +11 -24
- package/table-object/index.scss +1 -1
- package/timeline/README.md +25 -0
- package/timeline/index.scss +2 -0
- package/timeline/timeline-item.scss +95 -0
- package/toasts/README.md +25 -0
- package/toasts/index.scss +2 -0
- package/toasts/toasts.scss +127 -0
- package/tooltips/README.md +11 -24
- package/tooltips/index.scss +2 -2
- package/tooltips/tooltips.scss +17 -8
- package/truncate/README.md +11 -24
- package/truncate/index.scss +2 -1
- package/truncate/truncate.scss +41 -7
- package/utilities/README.md +11 -23
- package/utilities/animations.scss +14 -2
- package/utilities/borders.scss +14 -58
- package/utilities/box-shadow.scss +8 -9
- package/utilities/colors.scss +71 -116
- package/utilities/details.scss +24 -4
- package/utilities/flexbox.scss +11 -16
- package/utilities/index.scss +12 -12
- package/utilities/layout.scss +23 -15
- package/utilities/margin.scss +34 -17
- package/utilities/padding.scss +13 -9
- package/utilities/typography.scss +54 -25
- package/utilities/visibility-display.scss +0 -13
- package/.browserslistrc +0 -6
- package/.eslintrc.json +0 -13
- package/.stylelintrc.json +0 -9
- package/MIGRATING.md +0 -70
- package/bin/primer-migrate +0 -86
- package/build/build.css +0 -23
- package/build/build.json +0 -1
- package/build/index.js +0 -1
- package/dist/marketing-support.css.map +0 -1
- package/dist/support.css.map +0 -1
- package/fonts/Inter-Medium.woff +0 -0
- package/fonts/Inter-Regular.woff +0 -0
- package/layout/columns.scss +0 -56
- package/marketing/buttons/README.md +0 -39
- package/marketing/support/README.md +0 -31
- package/marketing/type/README.md +0 -39
- package/marketing/utilities/README.md +0 -36
- package/marketing/utilities/margin.scss +0 -18
- package/marketing/utilities/padding.scss +0 -28
- package/postcss.config.js +0 -14
- package/prettier.config.js +0 -1
- package/support/mixins/buttons.scss +0 -160
- package/support/variables/color-system.scss +0 -243
- package/support/variables/colors.scss +0 -70
package/base/normalize.scss
CHANGED
|
@@ -39,7 +39,8 @@ header,
|
|
|
39
39
|
main, /* 2 */
|
|
40
40
|
menu,
|
|
41
41
|
nav,
|
|
42
|
-
section {
|
|
42
|
+
section {
|
|
43
|
+
/* 1 */
|
|
43
44
|
display: block;
|
|
44
45
|
}
|
|
45
46
|
|
|
@@ -96,16 +97,6 @@ a {
|
|
|
96
97
|
background-color: transparent; /* 1 */
|
|
97
98
|
}
|
|
98
99
|
|
|
99
|
-
/**
|
|
100
|
-
* Remove the outline on focused links when they are also active or hovered
|
|
101
|
-
* in all browsers (opinionated).
|
|
102
|
-
*/
|
|
103
|
-
|
|
104
|
-
a:active,
|
|
105
|
-
a:hover {
|
|
106
|
-
outline-width: 0;
|
|
107
|
-
}
|
|
108
|
-
|
|
109
100
|
/* Text-level semantics
|
|
110
101
|
========================================================================== */
|
|
111
102
|
|
|
@@ -162,7 +153,7 @@ h1 {
|
|
|
162
153
|
|
|
163
154
|
mark {
|
|
164
155
|
background-color: #ff0;
|
|
165
|
-
color:
|
|
156
|
+
color: var(--color-text-primary);
|
|
166
157
|
}
|
|
167
158
|
|
|
168
159
|
/**
|
|
@@ -234,7 +225,7 @@ samp {
|
|
|
234
225
|
*/
|
|
235
226
|
|
|
236
227
|
figure {
|
|
237
|
-
margin: 1em
|
|
228
|
+
margin: 1em $spacer-6;
|
|
238
229
|
}
|
|
239
230
|
|
|
240
231
|
/**
|
|
@@ -269,7 +260,7 @@ textarea {
|
|
|
269
260
|
*/
|
|
270
261
|
|
|
271
262
|
optgroup {
|
|
272
|
-
font-weight: bold;
|
|
263
|
+
font-weight: $font-weight-bold;
|
|
273
264
|
}
|
|
274
265
|
|
|
275
266
|
/**
|
|
@@ -278,7 +269,8 @@ optgroup {
|
|
|
278
269
|
*/
|
|
279
270
|
|
|
280
271
|
button,
|
|
281
|
-
input {
|
|
272
|
+
input {
|
|
273
|
+
/* 1 */
|
|
282
274
|
overflow: visible;
|
|
283
275
|
}
|
|
284
276
|
|
|
@@ -288,7 +280,8 @@ input { /* 1 */
|
|
|
288
280
|
*/
|
|
289
281
|
|
|
290
282
|
button,
|
|
291
|
-
select {
|
|
283
|
+
select {
|
|
284
|
+
/* 1 */
|
|
292
285
|
text-transform: none;
|
|
293
286
|
}
|
|
294
287
|
|
|
@@ -305,37 +298,14 @@ html [type="button"], /* 1 */
|
|
|
305
298
|
-webkit-appearance: button; /* 2 */
|
|
306
299
|
}
|
|
307
300
|
|
|
308
|
-
/**
|
|
309
|
-
* Remove the inner border and padding in Firefox.
|
|
310
|
-
*/
|
|
311
|
-
|
|
312
|
-
button::-moz-focus-inner,
|
|
313
|
-
[type="button"]::-moz-focus-inner,
|
|
314
|
-
[type="reset"]::-moz-focus-inner,
|
|
315
|
-
[type="submit"]::-moz-focus-inner {
|
|
316
|
-
border-style: none;
|
|
317
|
-
padding: 0;
|
|
318
|
-
}
|
|
319
|
-
|
|
320
|
-
/**
|
|
321
|
-
* Restore the focus styles unset by the previous rule.
|
|
322
|
-
*/
|
|
323
|
-
|
|
324
|
-
button:-moz-focusring,
|
|
325
|
-
[type="button"]:-moz-focusring,
|
|
326
|
-
[type="reset"]:-moz-focusring,
|
|
327
|
-
[type="submit"]:-moz-focusring {
|
|
328
|
-
outline: 1px dotted ButtonText;
|
|
329
|
-
}
|
|
330
|
-
|
|
331
301
|
/**
|
|
332
302
|
* Change the border, margin, and padding in all browsers (opinionated).
|
|
333
303
|
*/
|
|
334
304
|
|
|
335
305
|
fieldset {
|
|
336
|
-
border:
|
|
306
|
+
border: $border-width $border-style #c0c0c0;
|
|
337
307
|
margin: 0 2px;
|
|
338
|
-
padding: 0.35em 0.625em
|
|
308
|
+
padding: 0.35em 0.625em $em-spacer-6;
|
|
339
309
|
}
|
|
340
310
|
|
|
341
311
|
/**
|
|
@@ -367,8 +337,8 @@ textarea {
|
|
|
367
337
|
* 2. Remove the padding in IE 10-.
|
|
368
338
|
*/
|
|
369
339
|
|
|
370
|
-
[type=
|
|
371
|
-
[type=
|
|
340
|
+
[type='checkbox'],
|
|
341
|
+
[type='radio'] {
|
|
372
342
|
box-sizing: border-box; /* 1 */
|
|
373
343
|
padding: 0; /* 2 */
|
|
374
344
|
}
|
|
@@ -377,27 +347,17 @@ textarea {
|
|
|
377
347
|
* Correct the cursor style of increment and decrement buttons in Chrome.
|
|
378
348
|
*/
|
|
379
349
|
|
|
380
|
-
[type=
|
|
381
|
-
[type=
|
|
350
|
+
[type='number']::-webkit-inner-spin-button,
|
|
351
|
+
[type='number']::-webkit-outer-spin-button {
|
|
382
352
|
height: auto;
|
|
383
353
|
}
|
|
384
354
|
|
|
385
|
-
/**
|
|
386
|
-
* 1. Correct the odd appearance in Chrome and Safari.
|
|
387
|
-
* 2. Correct the outline style in Safari.
|
|
388
|
-
*/
|
|
389
|
-
|
|
390
|
-
[type="search"] {
|
|
391
|
-
-webkit-appearance: textfield; /* 1 */
|
|
392
|
-
outline-offset: -2px; /* 2 */
|
|
393
|
-
}
|
|
394
|
-
|
|
395
355
|
/**
|
|
396
356
|
* Remove the inner padding and cancel buttons in Chrome and Safari on OS X.
|
|
397
357
|
*/
|
|
398
358
|
|
|
399
|
-
[type=
|
|
400
|
-
[type=
|
|
359
|
+
[type='search']::-webkit-search-cancel-button,
|
|
360
|
+
[type='search']::-webkit-search-decoration {
|
|
401
361
|
-webkit-appearance: none;
|
|
402
362
|
}
|
|
403
363
|
|
package/blankslate/README.md
CHANGED
|
@@ -1,37 +1,25 @@
|
|
|
1
|
-
|
|
1
|
+
---
|
|
2
|
+
bundle: "blankslate"
|
|
3
|
+
generated: true
|
|
4
|
+
---
|
|
2
5
|
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
This repository is a module of the full [primer][primer] repository.
|
|
6
|
+
# Primer CSS: `blankslate` bundle
|
|
6
7
|
|
|
7
8
|
## Usage
|
|
8
9
|
|
|
9
|
-
|
|
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:
|
|
10
11
|
|
|
11
12
|
```scss
|
|
12
|
-
@import "primer
|
|
13
|
+
@import "@primer/css/blankslate/index.scss";
|
|
13
14
|
```
|
|
14
15
|
|
|
15
|
-
You can also import specific portions of the module by importing those partials from the `/lib/` folder. _Make sure you import any requirements along with the modules._
|
|
16
|
-
|
|
17
16
|
## Build
|
|
18
17
|
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
```
|
|
22
|
-
$ npm run build
|
|
23
|
-
```
|
|
24
|
-
|
|
25
|
-
## Documentation
|
|
26
|
-
|
|
27
|
-
Find further documentation at [primer.style/css/components/blankslate](https://primer.style/css/components/blankslate).
|
|
18
|
+
The `@primer/css` npm package includes a standalone CSS build of this module in `dist/blankslate.css`.
|
|
28
19
|
|
|
29
20
|
## License
|
|
30
21
|
|
|
31
|
-
[MIT](
|
|
22
|
+
[MIT](https://github.com/primer/css/blob/main/LICENSE) © [GitHub](https://github.com/)
|
|
23
|
+
|
|
32
24
|
|
|
33
|
-
[
|
|
34
|
-
[docs]: https://primer.style/css
|
|
35
|
-
[npm]: https://www.npmjs.com/
|
|
36
|
-
[install-npm]: https://docs.npmjs.com/getting-started/installing-node
|
|
37
|
-
[sass]: http://sass-lang.com/
|
|
25
|
+
[scss]: https://sass-lang.com/documentation/syntax#scss
|
|
@@ -3,17 +3,23 @@
|
|
|
3
3
|
position: relative;
|
|
4
4
|
padding: $spacer-5;
|
|
5
5
|
text-align: center;
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
6
|
+
|
|
7
|
+
p {
|
|
8
|
+
color: var(--color-fg-muted);
|
|
9
|
+
}
|
|
10
10
|
|
|
11
11
|
code {
|
|
12
|
+
// stylelint-disable-next-line primer/spacing
|
|
12
13
|
padding: 2px 5px 3px;
|
|
13
14
|
font-size: $h5-size;
|
|
14
|
-
background:
|
|
15
|
-
border:
|
|
16
|
-
border-radius:
|
|
15
|
+
background: var(--color-canvas-default);
|
|
16
|
+
border: $border-width $border-style var(--color-border-muted);
|
|
17
|
+
border-radius: $border-radius;
|
|
18
|
+
}
|
|
19
|
+
|
|
20
|
+
img {
|
|
21
|
+
width: 56px;
|
|
22
|
+
height: 56px;
|
|
17
23
|
}
|
|
18
24
|
}
|
|
19
25
|
|
|
@@ -21,14 +27,15 @@
|
|
|
21
27
|
margin-right: $spacer-1;
|
|
22
28
|
margin-bottom: $spacer-2;
|
|
23
29
|
margin-left: $spacer-1;
|
|
24
|
-
color:
|
|
30
|
+
color: var(--color-fg-muted);
|
|
25
31
|
}
|
|
26
32
|
|
|
27
33
|
.blankslate-capped {
|
|
28
|
-
border-radius: 0 0
|
|
34
|
+
border-radius: 0 0 $border-radius $border-radius;
|
|
29
35
|
}
|
|
30
36
|
|
|
31
37
|
.blankslate-spacious {
|
|
38
|
+
// stylelint-disable-next-line primer/spacing
|
|
32
39
|
padding: ($spacer-6 * 2) $spacer-6;
|
|
33
40
|
}
|
|
34
41
|
|
|
@@ -38,10 +45,17 @@
|
|
|
38
45
|
}
|
|
39
46
|
|
|
40
47
|
// was .large-format
|
|
48
|
+
// QUESTION: should we deprecate this?
|
|
41
49
|
.blankslate-large {
|
|
50
|
+
img {
|
|
51
|
+
width: 80px;
|
|
52
|
+
height: 80px;
|
|
53
|
+
}
|
|
54
|
+
|
|
42
55
|
h3 {
|
|
43
56
|
margin: $spacer-3 0;
|
|
44
|
-
font-size: $h3-size;
|
|
57
|
+
//font-size: $h3-size; // This doesn't actually make the text larger. Should this be $h2-size?
|
|
58
|
+
font-size: $h2-size;
|
|
45
59
|
}
|
|
46
60
|
|
|
47
61
|
p {
|
|
@@ -50,8 +64,7 @@
|
|
|
50
64
|
}
|
|
51
65
|
|
|
52
66
|
// was .clean-background
|
|
67
|
+
// TO DO: deprecate this and use utility instead
|
|
53
68
|
.blankslate-clean-background {
|
|
54
|
-
background: none;
|
|
55
69
|
border: 0;
|
|
56
|
-
box-shadow: none;
|
|
57
70
|
}
|
package/blankslate/index.scss
CHANGED
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
@import
|
|
1
|
+
@import '../support/index.scss';
|
|
2
2
|
|
|
3
|
-
@import
|
|
3
|
+
@import './blankslate.scss';
|
package/box/README.md
CHANGED
|
@@ -1,37 +1,25 @@
|
|
|
1
|
-
|
|
1
|
+
---
|
|
2
|
+
bundle: "box"
|
|
3
|
+
generated: true
|
|
4
|
+
---
|
|
2
5
|
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
This repository is a module of the full [primer][primer] repository.
|
|
6
|
+
# Primer CSS: `box` bundle
|
|
6
7
|
|
|
7
8
|
## Usage
|
|
8
9
|
|
|
9
|
-
|
|
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:
|
|
10
11
|
|
|
11
12
|
```scss
|
|
12
|
-
@import "primer
|
|
13
|
+
@import "@primer/css/box/index.scss";
|
|
13
14
|
```
|
|
14
15
|
|
|
15
|
-
You can also import specific portions of the module by importing those partials from the `/lib/` folder. _Make sure you import any requirements along with the modules._
|
|
16
|
-
|
|
17
16
|
## Build
|
|
18
17
|
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
```
|
|
22
|
-
$ npm run build
|
|
23
|
-
```
|
|
24
|
-
|
|
25
|
-
## Documentation
|
|
26
|
-
|
|
27
|
-
Find further documentation at [primer.style/css/components/box](https://primer.style/css/components/box).
|
|
18
|
+
The `@primer/css` npm package includes a standalone CSS build of this module in `dist/box.css`.
|
|
28
19
|
|
|
29
20
|
## License
|
|
30
21
|
|
|
31
|
-
[MIT](
|
|
22
|
+
[MIT](https://github.com/primer/css/blob/main/LICENSE) © [GitHub](https://github.com/)
|
|
23
|
+
|
|
32
24
|
|
|
33
|
-
[
|
|
34
|
-
[docs]: https://primer.style/css
|
|
35
|
-
[npm]: https://www.npmjs.com/
|
|
36
|
-
[install-npm]: https://docs.npmjs.com/getting-started/installing-node
|
|
37
|
-
[sass]: http://sass-lang.com/
|
|
25
|
+
[scss]: https://sass-lang.com/documentation/syntax#scss
|
package/box/box.scss
CHANGED
|
@@ -2,8 +2,10 @@
|
|
|
2
2
|
// Intended to replace simple-box, boxed-group, and table-list
|
|
3
3
|
|
|
4
4
|
.Box {
|
|
5
|
-
background-color:
|
|
6
|
-
border:
|
|
5
|
+
background-color: var(--color-canvas-default);
|
|
6
|
+
border-color: var(--color-border-default);
|
|
7
|
+
border-style: $border-style;
|
|
8
|
+
border-width: $border-width;
|
|
7
9
|
border-radius: $border-radius;
|
|
8
10
|
}
|
|
9
11
|
|
|
@@ -26,6 +28,7 @@
|
|
|
26
28
|
.Box-btn-octicon {
|
|
27
29
|
&.btn-octicon {
|
|
28
30
|
padding: $spacer-2 $spacer-3;
|
|
31
|
+
// stylelint-disable-next-line primer/spacing
|
|
29
32
|
margin: (-$spacer-2) (-$spacer-3);
|
|
30
33
|
line-height: $lh-condensed;
|
|
31
34
|
}
|
|
@@ -34,7 +37,6 @@
|
|
|
34
37
|
.Box-row {
|
|
35
38
|
padding: $spacer-2 $spacer-3;
|
|
36
39
|
}
|
|
37
|
-
|
|
38
40
|
}
|
|
39
41
|
|
|
40
42
|
.Box--spacious {
|
|
@@ -58,6 +60,7 @@
|
|
|
58
60
|
.Box-btn-octicon {
|
|
59
61
|
&.btn-octicon {
|
|
60
62
|
padding: $spacer-4;
|
|
63
|
+
// stylelint-disable-next-line primer/spacing
|
|
61
64
|
margin: (-$spacer-4) (-$spacer-4);
|
|
62
65
|
}
|
|
63
66
|
}
|
|
@@ -65,14 +68,14 @@
|
|
|
65
68
|
.Box-row {
|
|
66
69
|
padding: $spacer-4;
|
|
67
70
|
}
|
|
68
|
-
|
|
69
71
|
}
|
|
70
72
|
|
|
71
73
|
.Box-header {
|
|
72
74
|
padding: $spacer-3;
|
|
75
|
+
// stylelint-disable-next-line primer/spacing
|
|
73
76
|
margin: (-$border-width) (-$border-width) 0;
|
|
74
|
-
background-color:
|
|
75
|
-
border-color:
|
|
77
|
+
background-color: var(--color-canvas-subtle);
|
|
78
|
+
border-color: var(--color-border-default);
|
|
76
79
|
border-style: $border-style;
|
|
77
80
|
border-width: $border-width;
|
|
78
81
|
border-top-left-radius: $border-radius;
|
|
@@ -86,32 +89,35 @@
|
|
|
86
89
|
|
|
87
90
|
.Box-body {
|
|
88
91
|
padding: $spacer-3;
|
|
89
|
-
border-bottom: $border-width $border-style
|
|
92
|
+
border-bottom: $border-width $border-style var(--color-border-default);
|
|
90
93
|
|
|
91
94
|
// Ensures bottom-border doesn't poke out when .Box-body used without box-footer
|
|
92
95
|
&:last-of-type {
|
|
96
|
+
// stylelint-disable-next-line primer/spacing
|
|
93
97
|
margin-bottom: -$border-width;
|
|
94
|
-
border-bottom-right-radius:
|
|
95
|
-
border-bottom-left-radius:
|
|
98
|
+
border-bottom-right-radius: $border-radius;
|
|
99
|
+
border-bottom-left-radius: $border-radius;
|
|
96
100
|
}
|
|
97
101
|
}
|
|
98
102
|
|
|
99
103
|
// Box rows
|
|
100
104
|
.Box-row {
|
|
101
105
|
padding: $spacer-3;
|
|
106
|
+
// stylelint-disable-next-line primer/spacing
|
|
102
107
|
margin-top: -1px;
|
|
103
108
|
list-style-type: none; // To account for applying Box component to a list
|
|
104
|
-
border-top:
|
|
109
|
+
border-top-color: var(--color-border-muted);
|
|
110
|
+
border-top-style: $border-style;
|
|
111
|
+
border-top-width: $border-width;
|
|
105
112
|
|
|
106
113
|
&:first-of-type {
|
|
107
|
-
border-top-
|
|
108
|
-
border-top-
|
|
109
|
-
border-top-right-radius: 2px;
|
|
114
|
+
border-top-left-radius: $border-radius;
|
|
115
|
+
border-top-right-radius: $border-radius;
|
|
110
116
|
}
|
|
111
117
|
|
|
112
118
|
&:last-of-type {
|
|
113
|
-
border-bottom-right-radius:
|
|
114
|
-
border-bottom-left-radius:
|
|
119
|
+
border-bottom-right-radius: $border-radius;
|
|
120
|
+
border-bottom-left-radius: $border-radius;
|
|
115
121
|
}
|
|
116
122
|
|
|
117
123
|
// Adds a blue vertical line to the left of the row
|
|
@@ -119,13 +125,14 @@
|
|
|
119
125
|
&.Box-row--unread,
|
|
120
126
|
// .unread to be deprecated with .Box-row-unread
|
|
121
127
|
&.unread {
|
|
122
|
-
box-shadow
|
|
128
|
+
// stylelint-disable-next-line primer/box-shadow
|
|
129
|
+
box-shadow: inset 2px 0 0 var(--color-accent-emphasis);
|
|
123
130
|
}
|
|
124
131
|
|
|
125
132
|
&.navigation-focus {
|
|
126
133
|
// Focus styles for when drag icon
|
|
127
134
|
.Box-row--drag-button {
|
|
128
|
-
color:
|
|
135
|
+
color: var(--color-accent-fg);
|
|
129
136
|
cursor: grab;
|
|
130
137
|
opacity: 100;
|
|
131
138
|
}
|
|
@@ -137,43 +144,42 @@
|
|
|
137
144
|
|
|
138
145
|
// Row dragging styles
|
|
139
146
|
&.sortable-chosen {
|
|
140
|
-
background-color:
|
|
147
|
+
background-color: var(--color-canvas-subtle);
|
|
141
148
|
}
|
|
142
149
|
|
|
143
150
|
// Makes dragging row background gray
|
|
144
151
|
&.sortable-ghost {
|
|
145
|
-
background-color:
|
|
152
|
+
background-color: var(--color-canvas-subtle);
|
|
146
153
|
|
|
147
154
|
// Hides contents of row while dragging so row looks solid gray
|
|
148
155
|
.Box-row--drag-hide {
|
|
149
156
|
opacity: 0;
|
|
150
157
|
}
|
|
151
158
|
}
|
|
152
|
-
|
|
153
159
|
}
|
|
154
160
|
}
|
|
155
161
|
|
|
156
162
|
.Box-row--focus-gray {
|
|
157
163
|
&.navigation-focus {
|
|
158
|
-
background-color:
|
|
164
|
+
background-color: var(--color-canvas-subtle);
|
|
159
165
|
}
|
|
160
166
|
}
|
|
161
167
|
|
|
162
168
|
.Box-row--focus-blue {
|
|
163
169
|
&.navigation-focus {
|
|
164
|
-
background-color:
|
|
170
|
+
background-color: var(--color-accent-subtle);
|
|
165
171
|
}
|
|
166
172
|
}
|
|
167
173
|
|
|
168
174
|
.Box-row--hover-gray {
|
|
169
175
|
&:hover {
|
|
170
|
-
background-color:
|
|
176
|
+
background-color: var(--color-canvas-subtle);
|
|
171
177
|
}
|
|
172
178
|
}
|
|
173
179
|
|
|
174
180
|
.Box-row--hover-blue {
|
|
175
181
|
&:hover {
|
|
176
|
-
background-color:
|
|
182
|
+
background-color: var(--color-accent-subtle);
|
|
177
183
|
}
|
|
178
184
|
}
|
|
179
185
|
|
|
@@ -182,15 +188,13 @@
|
|
|
182
188
|
// and links are dark-gray with blue hover on desktop.
|
|
183
189
|
.Box-row-link {
|
|
184
190
|
@include breakpoint(md) {
|
|
185
|
-
|
|
186
|
-
color: $text-gray-dark;
|
|
191
|
+
color: var(--color-fg-default);
|
|
187
192
|
text-decoration: none;
|
|
188
193
|
|
|
189
194
|
&:hover {
|
|
190
|
-
color:
|
|
195
|
+
color: var(--color-accent-fg);
|
|
191
196
|
text-decoration: none;
|
|
192
197
|
}
|
|
193
|
-
|
|
194
198
|
}
|
|
195
199
|
}
|
|
196
200
|
|
|
@@ -202,8 +206,12 @@
|
|
|
202
206
|
|
|
203
207
|
.Box-footer {
|
|
204
208
|
padding: $spacer-3;
|
|
209
|
+
// stylelint-disable-next-line primer/spacing
|
|
205
210
|
margin-top: -1px; // prevents double border when used with .Box-body
|
|
206
|
-
border-top:
|
|
211
|
+
border-top-color: var(--color-border-default);
|
|
212
|
+
border-top-style: $border-style;
|
|
213
|
+
border-top-width: $border-width;
|
|
214
|
+
border-radius: 0 0 $border-radius $border-radius;
|
|
207
215
|
}
|
|
208
216
|
|
|
209
217
|
// Option for a box with scrolling content
|
|
@@ -215,69 +223,69 @@
|
|
|
215
223
|
// Box themes
|
|
216
224
|
|
|
217
225
|
.Box--blue {
|
|
218
|
-
border-color:
|
|
226
|
+
border-color: var(--color-accent-muted);
|
|
219
227
|
|
|
220
228
|
.Box-header {
|
|
221
|
-
background-color:
|
|
222
|
-
border-color:
|
|
229
|
+
background-color: var(--color-accent-subtle);
|
|
230
|
+
border-color: var(--color-accent-muted);
|
|
223
231
|
}
|
|
224
232
|
|
|
225
233
|
.Box-body {
|
|
226
|
-
border-color:
|
|
234
|
+
border-color: var(--color-accent-muted);
|
|
227
235
|
}
|
|
228
236
|
|
|
229
237
|
.Box-row {
|
|
230
|
-
border-color:
|
|
238
|
+
border-color: var(--color-accent-muted);
|
|
231
239
|
}
|
|
232
240
|
|
|
233
241
|
.Box-footer {
|
|
234
|
-
border-color:
|
|
242
|
+
border-color: var(--color-accent-muted);
|
|
235
243
|
}
|
|
236
244
|
}
|
|
237
245
|
|
|
238
246
|
// Applies and red border to the outside of the box,
|
|
239
247
|
// but not to the border separating rows.
|
|
240
248
|
.Box--danger {
|
|
241
|
-
border-color:
|
|
249
|
+
border-color: var(--color-danger-emphasis);
|
|
242
250
|
|
|
243
251
|
.Box-row {
|
|
244
252
|
&:first-of-type {
|
|
245
|
-
border-color:
|
|
253
|
+
border-color: var(--color-danger-emphasis);
|
|
246
254
|
}
|
|
247
255
|
}
|
|
248
256
|
|
|
249
257
|
.Box-body {
|
|
250
258
|
&:last-of-type {
|
|
251
|
-
border-color:
|
|
259
|
+
border-color: var(--color-danger-emphasis);
|
|
252
260
|
}
|
|
253
261
|
}
|
|
254
262
|
}
|
|
255
263
|
|
|
256
264
|
.Box-header--blue {
|
|
257
|
-
background-color:
|
|
258
|
-
border-color:
|
|
265
|
+
background-color: var(--color-accent-subtle);
|
|
266
|
+
border-color: var(--color-accent-muted);
|
|
259
267
|
}
|
|
260
268
|
|
|
261
269
|
// Box row highlight themes
|
|
262
270
|
|
|
263
271
|
.Box-row--yellow {
|
|
264
|
-
background-color:
|
|
272
|
+
background-color: var(--color-attention-subtle);
|
|
265
273
|
}
|
|
266
274
|
|
|
267
275
|
.Box-row--blue {
|
|
268
|
-
background-color:
|
|
276
|
+
background-color: var(--color-accent-subtle);
|
|
269
277
|
}
|
|
270
278
|
|
|
271
279
|
.Box-row--gray {
|
|
272
|
-
background-color:
|
|
280
|
+
background-color: var(--color-canvas-subtle);
|
|
273
281
|
}
|
|
274
282
|
|
|
275
283
|
//Box with btn-octicon
|
|
276
284
|
.Box-btn-octicon {
|
|
277
|
-
|
|
278
285
|
// Increase specificity when btn-octicon is used because comes after .Box in the cascade
|
|
279
286
|
&.btn-octicon {
|
|
280
287
|
padding: $spacer-3 $spacer-3;
|
|
288
|
+
// stylelint-disable-next-line primer/spacing
|
|
281
289
|
margin: (-$spacer-3) (-$spacer-3);
|
|
282
290
|
line-height: $lh-default; // override btn-octicon line-height
|
|
283
291
|
}
|
package/box/index.scss
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
@import
|
|
2
|
-
@import
|
|
1
|
+
@import '../support/index.scss';
|
|
2
|
+
@import './box.scss';
|