@primer/css 0.0.0-1ea75fe → 0.0.0-202110100305
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +1231 -132
- package/CODE_OF_CONDUCT.md +1 -1
- package/CONTRIBUTING.md +85 -0
- package/DEVELOP.md +11 -69
- package/LICENSE +1 -1
- package/README.md +13 -15
- package/RELEASING.md +5 -72
- package/actionlist/action-list-item-divider.scss +42 -0
- package/actionlist/action-list-item.scss +444 -0
- package/actionlist/action-list-variables.scss +8 -0
- package/actionlist/action-list.scss +33 -0
- package/actionlist/index.scss +5 -0
- package/alerts/README.md +11 -22
- package/alerts/flash.scss +91 -21
- package/alerts/index.scss +2 -2
- package/autocomplete/README.md +25 -0
- package/autocomplete/autocomplete.scss +58 -0
- package/autocomplete/index.scss +4 -0
- package/autocomplete/suggester.scss +92 -0
- package/avatars/README.md +11 -23
- package/avatars/avatar-parent-child.scss +4 -3
- package/avatars/avatar-stack.scss +21 -13
- package/avatars/avatar.scss +31 -3
- package/avatars/circle-badge.scss +5 -4
- package/avatars/index.scss +5 -5
- package/base/README.md +11 -22
- package/base/base.scss +5 -4
- package/base/index.scss +6 -4
- package/base/kbd.scss +20 -0
- package/base/normalize.scss +5 -5
- package/base/octicons.scss +6 -0
- package/base/typography-base.scss +2 -0
- package/blankslate/README.md +11 -23
- package/blankslate/blankslate.scss +25 -12
- package/blankslate/index.scss +2 -2
- package/box/README.md +11 -23
- package/box/box.scss +52 -44
- package/box/index.scss +2 -2
- package/branch-name/README.md +11 -23
- package/branch-name/branch-name.scss +18 -8
- package/branch-name/index.scss +2 -2
- package/breadcrumb/README.md +17 -13
- package/breadcrumb/breadcrumb.scss +15 -5
- package/breadcrumb/index.scss +2 -2
- package/buttons/README.md +11 -23
- package/buttons/button-group.scss +2 -0
- package/buttons/button.scss +243 -143
- package/buttons/index.scss +4 -3
- package/buttons/misc.scss +222 -0
- package/color-modes/index.scss +9 -0
- package/color-modes/native.scss +10 -0
- package/color-modes/themes/dark.scss +7 -0
- package/color-modes/themes/dark_colorblind.scss +7 -0
- package/color-modes/themes/dark_dimmed.scss +7 -0
- package/color-modes/themes/dark_high_contrast.scss +7 -0
- package/color-modes/themes/light.scss +7 -0
- package/color-modes/themes/light_colorblind.scss +7 -0
- package/core/README.md +11 -23
- package/core/index.scss +19 -20
- package/deprecations.js +24 -0
- package/deprecations.json +539 -0
- package/dist/actionlist.css +2 -0
- package/dist/actionlist.css.map +1 -0
- package/dist/actionlist.js +1 -0
- package/dist/alerts.css +1 -2
- package/dist/alerts.css.map +1 -1
- package/dist/alerts.js +1 -1
- package/dist/autocomplete.css +2 -0
- package/dist/autocomplete.css.map +1 -0
- package/dist/autocomplete.js +1 -0
- package/dist/avatars.css +1 -2
- package/dist/avatars.css.map +1 -1
- package/dist/avatars.js +1 -1
- package/dist/base.css +1 -2
- package/dist/base.css.map +1 -1
- package/dist/base.js +1 -1
- package/dist/blankslate.css +1 -2
- package/dist/blankslate.css.map +1 -1
- package/dist/blankslate.js +1 -1
- package/dist/box.css +1 -2
- package/dist/box.css.map +1 -1
- package/dist/box.js +1 -1
- package/dist/branch-name.css +1 -2
- package/dist/branch-name.css.map +1 -1
- package/dist/branch-name.js +1 -1
- package/dist/breadcrumb.css +1 -2
- package/dist/breadcrumb.css.map +1 -1
- package/dist/breadcrumb.js +1 -1
- package/dist/buttons.css +1 -2
- package/dist/buttons.css.map +1 -1
- package/dist/buttons.js +1 -1
- package/dist/color-modes.css +2 -0
- package/dist/color-modes.css.map +1 -0
- package/dist/color-modes.js +1 -0
- package/dist/core.css +3 -4
- package/dist/core.css.map +1 -1
- package/dist/core.js +1 -1
- package/dist/deprecations.json +539 -0
- package/dist/dropdown.css +2 -0
- package/dist/dropdown.css.map +1 -0
- package/dist/dropdown.js +1 -0
- package/dist/forms.css +1 -2
- package/dist/forms.css.map +1 -1
- package/dist/forms.js +1 -1
- package/dist/header.css +2 -0
- package/dist/header.css.map +1 -0
- package/dist/header.js +1 -0
- package/dist/labels.css +1 -2
- package/dist/labels.css.map +1 -1
- package/dist/labels.js +1 -1
- package/dist/layout.css +1 -2
- package/dist/layout.css.map +1 -1
- package/dist/layout.js +1 -1
- package/dist/links.css +2 -0
- package/dist/links.css.map +1 -0
- package/dist/links.js +1 -0
- package/dist/loaders.css +2 -0
- package/dist/loaders.css.map +1 -0
- package/dist/loaders.js +1 -0
- package/dist/markdown.css +1 -2
- package/dist/markdown.css.map +1 -1
- package/dist/markdown.js +1 -1
- package/dist/marketing-buttons.css +1 -2
- package/dist/marketing-buttons.css.map +1 -1
- package/dist/marketing-buttons.js +1 -1
- package/dist/marketing-support.css +1 -2
- package/dist/marketing-support.js +1 -1
- package/dist/marketing-type.css +1 -2
- package/dist/marketing-type.css.map +1 -1
- package/dist/marketing-type.js +1 -1
- package/dist/marketing-utilities.css +1 -2
- package/dist/marketing-utilities.css.map +1 -1
- package/dist/marketing-utilities.js +1 -1
- package/dist/marketing.css +3 -4
- package/dist/marketing.css.map +1 -1
- package/dist/marketing.js +1 -1
- package/dist/meta.json +316 -273
- package/dist/navigation.css +1 -2
- package/dist/navigation.css.map +1 -1
- package/dist/navigation.js +1 -1
- package/dist/pagination.css +1 -2
- package/dist/pagination.css.map +1 -1
- package/dist/pagination.js +1 -1
- package/dist/popover.css +1 -2
- package/dist/popover.css.map +1 -1
- package/dist/popover.js +1 -1
- package/dist/primer.css +13 -14
- package/dist/primer.css.map +1 -1
- package/dist/primer.js +1 -1
- package/dist/product.css +3 -4
- package/dist/product.css.map +1 -1
- package/dist/product.js +1 -1
- package/dist/progress.css +1 -2
- package/dist/progress.css.map +1 -1
- package/dist/progress.js +1 -1
- package/dist/select-menu.css +2 -0
- package/dist/select-menu.css.map +1 -0
- package/dist/select-menu.js +1 -0
- package/dist/stats/actionlist.json +1 -0
- package/dist/stats/alerts.json +1 -1
- package/dist/stats/autocomplete.json +1 -0
- package/dist/stats/avatars.json +1 -1
- package/dist/stats/base.json +1 -1
- package/dist/stats/blankslate.json +1 -1
- package/dist/stats/box.json +1 -1
- package/dist/stats/branch-name.json +1 -1
- package/dist/stats/breadcrumb.json +1 -1
- package/dist/stats/buttons.json +1 -1
- package/dist/stats/color-modes.json +1 -0
- package/dist/stats/core.json +1 -1
- package/dist/stats/dropdown.json +1 -0
- package/dist/stats/forms.json +1 -1
- package/dist/stats/header.json +1 -0
- package/dist/stats/labels.json +1 -1
- package/dist/stats/layout.json +1 -1
- package/dist/stats/links.json +1 -0
- package/dist/stats/loaders.json +1 -0
- package/dist/stats/markdown.json +1 -1
- package/dist/stats/marketing-buttons.json +1 -1
- package/dist/stats/marketing-support.json +1 -1
- package/dist/stats/marketing-type.json +1 -1
- package/dist/stats/marketing-utilities.json +1 -1
- package/dist/stats/marketing.json +1 -1
- package/dist/stats/navigation.json +1 -1
- package/dist/stats/pagination.json +1 -1
- package/dist/stats/popover.json +1 -1
- package/dist/stats/primer.json +1 -1
- package/dist/stats/product.json +1 -1
- package/dist/stats/progress.json +1 -1
- package/dist/stats/select-menu.json +1 -0
- package/dist/stats/subhead.json +1 -1
- package/dist/stats/support.json +1 -1
- package/dist/stats/table-object.json +1 -1
- package/dist/stats/timeline.json +1 -0
- package/dist/stats/toasts.json +1 -0
- package/dist/stats/tooltips.json +1 -1
- package/dist/stats/truncate.json +1 -1
- package/dist/stats/utilities.json +1 -1
- package/dist/subhead.css +1 -2
- package/dist/subhead.css.map +1 -1
- package/dist/subhead.js +1 -1
- package/dist/support.css +1 -1
- package/dist/support.js +1 -1
- package/dist/table-object.css +0 -1
- package/dist/table-object.css.map +1 -1
- package/dist/table-object.js +1 -1
- package/dist/timeline.css +2 -0
- package/dist/timeline.css.map +1 -0
- package/dist/timeline.js +1 -0
- package/dist/toasts.css +2 -0
- package/dist/toasts.css.map +1 -0
- package/dist/toasts.js +1 -0
- package/dist/tooltips.css +1 -2
- package/dist/tooltips.css.map +1 -1
- package/dist/tooltips.js +1 -1
- package/dist/truncate.css +1 -2
- package/dist/truncate.css.map +1 -1
- package/dist/truncate.js +1 -1
- package/dist/utilities.css +1 -2
- package/dist/utilities.css.map +1 -1
- package/dist/utilities.js +1 -1
- package/dist/variables.json +1352 -0
- package/dropdown/README.md +25 -0
- package/dropdown/dropdown.scss +272 -0
- package/dropdown/index.scss +2 -0
- package/forms/README.md +11 -23
- package/forms/form-control.scss +76 -32
- package/forms/form-group.scss +83 -46
- package/forms/form-select.scss +17 -5
- package/forms/form-validation.scss +51 -32
- package/forms/index.scss +7 -6
- package/forms/input-group.scss +2 -0
- package/forms/radio-group.scss +62 -0
- package/header/README.md +25 -0
- package/header/header.scss +47 -0
- package/header/index.scss +2 -0
- package/index.scss +7 -4
- package/labels/README.md +11 -23
- package/labels/counters.scss +24 -13
- package/labels/diffstat.scss +37 -0
- package/labels/index.scss +8 -4
- package/labels/issue-labels.scss +23 -0
- package/labels/labels.scss +59 -40
- package/labels/mixins.scss +32 -0
- package/labels/states.scss +40 -19
- package/layout/README.md +11 -23
- package/layout/container.scss +0 -8
- package/layout/grid-offset.scss +11 -11
- package/layout/grid.scss +23 -23
- package/layout/index.scss +8 -5
- package/layout/layout-beta.scss +339 -0
- package/layout/layout.scss +185 -0
- package/layout/mixins.scss +79 -0
- package/links/README.md +25 -0
- package/links/index.scss +3 -0
- package/links/link.scss +55 -0
- package/loaders/README.md +25 -0
- package/loaders/index.scss +2 -0
- package/loaders/loaders.scss +19 -0
- package/markdown/README.md +11 -23
- package/markdown/blob-csv.scss +4 -2
- package/markdown/code.scss +11 -3
- package/markdown/footnotes.scss +37 -0
- package/markdown/headings.scss +13 -4
- package/markdown/images.scss +15 -4
- package/markdown/index.scss +9 -8
- package/markdown/lists.scss +19 -5
- package/markdown/markdown-body.scss +15 -18
- package/markdown/tables.scss +8 -5
- package/marketing/README.md +11 -23
- package/marketing/buttons/button.scss +82 -61
- package/marketing/index.scss +6 -11
- package/marketing/support/index.scss +1 -0
- package/marketing/support/mixins.scss +66 -0
- package/marketing/support/variables.scss +110 -51
- package/marketing/type/typography.scss +100 -62
- package/marketing/utilities/animations.scss +9 -0
- package/marketing/utilities/filters.scss +0 -1
- package/marketing/utilities/index.scss +2 -3
- package/marketing/utilities/layout.scss +32 -11
- package/navigation/README.md +11 -23
- package/navigation/filter-list.scss +16 -14
- package/navigation/index.scss +7 -6
- package/navigation/menu.scss +44 -35
- package/navigation/sidenav.scss +108 -0
- package/navigation/subnav.scss +28 -21
- package/navigation/tabnav.scss +45 -21
- package/navigation/underline-nav.scss +36 -22
- package/package.json +78 -107
- package/pagination/README.md +12 -14
- package/pagination/index.scss +2 -2
- package/pagination/pagination.scss +61 -37
- package/popover/README.md +11 -24
- package/popover/index.scss +2 -2
- package/popover/popover.scss +18 -9
- package/postcss.config.cjs +22 -0
- package/prettier.config.cjs +1 -0
- package/product/README.md +11 -23
- package/product/index.scss +19 -17
- package/progress/README.md +11 -23
- package/progress/index.scss +2 -2
- package/progress/progress.scss +11 -1
- package/select-menu/README.md +25 -0
- package/select-menu/index.scss +3 -0
- package/select-menu/select-menu.scss +464 -0
- package/stylelint.config.cjs +16 -0
- package/subhead/README.md +11 -25
- package/subhead/index.scss +2 -2
- package/subhead/subhead.scss +10 -4
- package/support/README.md +12 -18
- package/support/index.scss +7 -8
- package/support/mixins/color-modes.scss +106 -0
- package/support/mixins/misc.scss +9 -12
- package/support/mixins/typography.scss +1 -1
- package/support/variables/layout.scss +103 -11
- package/support/variables/misc.scss +7 -30
- package/support/variables/typography.scss +4 -4
- package/table-object/README.md +11 -24
- package/table-object/index.scss +1 -1
- package/timeline/README.md +25 -0
- package/timeline/index.scss +2 -0
- package/timeline/timeline-item.scss +95 -0
- package/toasts/README.md +25 -0
- package/toasts/index.scss +2 -0
- package/toasts/toasts.scss +124 -0
- package/tooltips/README.md +11 -24
- package/tooltips/index.scss +2 -2
- package/tooltips/tooltips.scss +17 -8
- package/truncate/README.md +11 -24
- package/truncate/index.scss +2 -1
- package/truncate/truncate.scss +41 -7
- package/utilities/README.md +11 -23
- package/utilities/animations.scss +14 -2
- package/utilities/borders.scss +29 -65
- package/utilities/box-shadow.scss +8 -9
- package/utilities/colors.scss +71 -110
- package/utilities/details.scss +12 -4
- package/utilities/flexbox.scss +14 -14
- package/utilities/index.scss +12 -12
- package/utilities/layout.scss +28 -22
- package/utilities/margin.scss +34 -17
- package/utilities/padding.scss +13 -9
- package/utilities/typography.scss +54 -25
- package/utilities/visibility-display.scss +0 -13
- package/.browserslistrc +0 -6
- package/.eslintrc.json +0 -13
- package/.stylelintrc.json +0 -9
- package/MIGRATING.md +0 -70
- package/bin/primer-migrate +0 -86
- package/build/build.css +0 -23
- package/build/build.json +0 -1
- package/build/index.js +0 -1
- package/dist/marketing-support.css.map +0 -1
- package/dist/support.css.map +0 -1
- package/fonts/Inter-Medium.woff +0 -0
- package/fonts/Inter-Regular.woff +0 -0
- package/layout/columns.scss +0 -56
- package/marketing/buttons/README.md +0 -39
- package/marketing/support/README.md +0 -31
- package/marketing/type/README.md +0 -39
- package/marketing/utilities/README.md +0 -36
- package/marketing/utilities/margin.scss +0 -18
- package/marketing/utilities/padding.scss +0 -28
- package/postcss.config.js +0 -14
- package/prettier.config.js +0 -1
- package/support/mixins/buttons.scss +0 -160
- package/support/variables/color-system.scss +0 -243
- package/support/variables/colors.scss +0 -70
|
@@ -0,0 +1,339 @@
|
|
|
1
|
+
// Component className
|
|
2
|
+
|
|
3
|
+
$Layout: "LayoutBeta";
|
|
4
|
+
$Layout-divider-color: red; // var(--color-border-default)
|
|
5
|
+
|
|
6
|
+
// Property modifier names
|
|
7
|
+
|
|
8
|
+
// -- Wrapper
|
|
9
|
+
$Layout-prop-wrapperSizing: "wrapper-sizing"; // size?
|
|
10
|
+
|
|
11
|
+
$Layout-prop-outerSpacing: "outer-spacing"; // outer-m?
|
|
12
|
+
$Layout-prop-innerSpacing: "inner-spacing"; // inner-p?
|
|
13
|
+
$Layout-prop-columnGap: "column-gap";
|
|
14
|
+
$Layout-prop-rowGap: "row-gap";
|
|
15
|
+
|
|
16
|
+
$Layout-prop-paneDivider: "pane-divider";
|
|
17
|
+
$Layout-prop-headerDivider: "header-divider";
|
|
18
|
+
$Layout-prop-footerDivider: "footer-divider";
|
|
19
|
+
|
|
20
|
+
$Layout-prop-panePosition: "pane-position"; // pane-pos?
|
|
21
|
+
$Layout-prop-paneWidth: "pane-width"; // pane-w?
|
|
22
|
+
$Layout-prop-contentWidth: "content-width"; // content-w?
|
|
23
|
+
|
|
24
|
+
$Layout-prop-flowHorizontal: "flow-horizontal"; // flow-h?
|
|
25
|
+
$Layout-prop-responsiveBehavior: "responsive-behavior"; // r?
|
|
26
|
+
$Layout-prop-responsiveAt: "responsive-at"; // r-at?
|
|
27
|
+
|
|
28
|
+
$Layout-prop-hasHeader: "has-header";
|
|
29
|
+
$Layout-prop-hasFooter: "has-footer";
|
|
30
|
+
|
|
31
|
+
|
|
32
|
+
.#{$Layout} {
|
|
33
|
+
--Layout-pane-width: #{map-get($sidebar-width, 'sm')};
|
|
34
|
+
--Layout-template-columns: 1fr var(--Layout-pane-width);
|
|
35
|
+
--Layout-template-rows: min-content;
|
|
36
|
+
--Layout-template-areas: "content pane";
|
|
37
|
+
|
|
38
|
+
--Layout-column-gap: #{$spacer-3};
|
|
39
|
+
--Layout-row-gap: #{$spacer-3};
|
|
40
|
+
|
|
41
|
+
--Layout-outer-spacing-x: 0; // wrapper margin x
|
|
42
|
+
--Layout-outer-spacing-y: 0; // wrapper margin y
|
|
43
|
+
|
|
44
|
+
--Layout-inner-spacing-min: 0;
|
|
45
|
+
--Layout-inner-spacing-max: 0;
|
|
46
|
+
|
|
47
|
+
// spacing: none,
|
|
48
|
+
|
|
49
|
+
// `flowHorizontal` determines whether `Layout` can render desktop-friendly
|
|
50
|
+
// two-column layouts. It should appear by default for compatibility
|
|
51
|
+
// with desktop browsers that have JavaScript disabled.
|
|
52
|
+
|
|
53
|
+
// Use `responsiveBehaviorAt` to determine in which breakpoint `Layout` will
|
|
54
|
+
// stop flowing horizontally. In these cases `flowHorizontal` class will be
|
|
55
|
+
// removed.
|
|
56
|
+
|
|
57
|
+
// The reason this is not a media query is because it's still not possible to
|
|
58
|
+
// use CSS variables to determine the breakpoint dinamically. (And the other
|
|
59
|
+
// option would be to duplicate too much code.)
|
|
60
|
+
|
|
61
|
+
&.#{$Layout}--#{$Layout-prop-flowHorizontal} {
|
|
62
|
+
|
|
63
|
+
margin: var(--Layout-outer-spacing-x);
|
|
64
|
+
|
|
65
|
+
> .#{$Layout}-regions {
|
|
66
|
+
display: grid;
|
|
67
|
+
column-gap: var(--Layout-column-gap);
|
|
68
|
+
row-gap: var(--Layout-row-gap);
|
|
69
|
+
grid-template-columns: var(--Layout-template-columns);
|
|
70
|
+
grid-template-rows: var(--Layout-template-rows);
|
|
71
|
+
grid-template-areas: var(--Layout-template-areas);
|
|
72
|
+
}
|
|
73
|
+
|
|
74
|
+
// panePosition
|
|
75
|
+
|
|
76
|
+
&.#{$Layout}--#{$Layout-prop-panePosition}-start {
|
|
77
|
+
--Layout-template-columns: var(--Layout-pane-width) 1fr;
|
|
78
|
+
--Layout-template-areas: "pane content";
|
|
79
|
+
|
|
80
|
+
&.#{$Layout}--#{$Layout-prop-hasHeader} {
|
|
81
|
+
--Layout-template-areas: "header header"
|
|
82
|
+
"pane content";
|
|
83
|
+
}
|
|
84
|
+
|
|
85
|
+
&.#{$Layout}--#{$Layout-prop-hasFooter} {
|
|
86
|
+
--Layout-template-areas: "pane content"
|
|
87
|
+
"footer footer";
|
|
88
|
+
}
|
|
89
|
+
|
|
90
|
+
&.#{$Layout}--#{$Layout-prop-hasHeader}.#{$Layout}--#{$Layout-prop-hasFooter} {
|
|
91
|
+
--Layout-template-areas: "header header"
|
|
92
|
+
"pane content"
|
|
93
|
+
"footer footer";
|
|
94
|
+
}
|
|
95
|
+
}
|
|
96
|
+
|
|
97
|
+
&.#{$Layout}--#{$Layout-prop-panePosition}-end {
|
|
98
|
+
--Layout-template-columns: 1fr var(--Layout-pane-width);
|
|
99
|
+
--Layout-template-areas: "content pane";
|
|
100
|
+
|
|
101
|
+
&.#{$Layout}--#{$Layout-prop-hasHeader} {
|
|
102
|
+
--Layout-template-areas: "header header"
|
|
103
|
+
"content pane";
|
|
104
|
+
}
|
|
105
|
+
|
|
106
|
+
&.#{$Layout}--#{$Layout-prop-hasFooter} {
|
|
107
|
+
--Layout-template-areas: "content pane"
|
|
108
|
+
"footer footer";
|
|
109
|
+
}
|
|
110
|
+
|
|
111
|
+
&.#{$Layout}--#{$Layout-prop-hasHeader}.#{$Layout}--#{$Layout-prop-hasFooter} {
|
|
112
|
+
--Layout-template-areas: "header header"
|
|
113
|
+
"content pane"
|
|
114
|
+
"footer footer";
|
|
115
|
+
}
|
|
116
|
+
}
|
|
117
|
+
|
|
118
|
+
// Template rows
|
|
119
|
+
|
|
120
|
+
&.#{$Layout}--#{$Layout-prop-hasHeader} {
|
|
121
|
+
--Layout-template-rows: min-content 1fr;
|
|
122
|
+
}
|
|
123
|
+
|
|
124
|
+
&.#{$Layout}--#{$Layout-prop-hasFooter} {
|
|
125
|
+
--Layout-template-rows: 1fr min-content;
|
|
126
|
+
}
|
|
127
|
+
|
|
128
|
+
&.#{$Layout}--#{$Layout-prop-hasHeader}.#{$Layout}--#{$Layout-prop-hasFooter} {
|
|
129
|
+
--Layout-template-rows: min-content 1fr min-content;
|
|
130
|
+
}
|
|
131
|
+
|
|
132
|
+
// Outer spacing
|
|
133
|
+
|
|
134
|
+
&.#{$Layout}--#{$Layout-prop-outerSpacing}-normal {
|
|
135
|
+
--Layout-outer-spacing-x: #{$spacer-3}; // 16px
|
|
136
|
+
--Layout-outer-spacing-y: #{$spacer-3}; // 16px
|
|
137
|
+
|
|
138
|
+
@include breakpoint(lg) {
|
|
139
|
+
--Layout-outer-spacing-x: #{$spacer-4}; // 24px
|
|
140
|
+
--Layout-outer-spacing-y: #{$spacer-4}; // 24px
|
|
141
|
+
}
|
|
142
|
+
}
|
|
143
|
+
|
|
144
|
+
&.#{$Layout}--#{$Layout-prop-outerSpacing}-condensed {
|
|
145
|
+
--Layout-outer-spacing-x: #{$spacer-3}; // 16px
|
|
146
|
+
--Layout-outer-spacing-y: #{$spacer-3}; // 16px
|
|
147
|
+
}
|
|
148
|
+
|
|
149
|
+
// Inner spacing
|
|
150
|
+
|
|
151
|
+
&.#{$Layout}--#{$Layout-prop-innerSpacing}-normal {
|
|
152
|
+
--Layout-inner-spacing-min: #{$spacer-3}; // 16px
|
|
153
|
+
--Layout-inner-spacing-max: #{$spacer-3}; // 16px
|
|
154
|
+
|
|
155
|
+
@include breakpoint(lg) {
|
|
156
|
+
--Layout-inner-spacing-max: #{$spacer-4}; // 24px
|
|
157
|
+
}
|
|
158
|
+
}
|
|
159
|
+
|
|
160
|
+
&.#{$Layout}--#{$Layout-prop-innerSpacing}-condensed {
|
|
161
|
+
--Layout-inner-spacing-min: #{$spacer-3}; // 16px
|
|
162
|
+
--Layout-inner-spacing-max: #{$spacer-3}; // 16px
|
|
163
|
+
}
|
|
164
|
+
|
|
165
|
+
// Pane divider
|
|
166
|
+
|
|
167
|
+
&.#{$Layout}--#{$Layout-prop-paneDivider} {
|
|
168
|
+
&.#{$Layout}--#{$Layout-prop-panePosition}-start {
|
|
169
|
+
.#{$Layout}-pane {
|
|
170
|
+
border-right: 1px solid $Layout-divider-color;
|
|
171
|
+
}
|
|
172
|
+
|
|
173
|
+
&:not(.#{$Layout}--#{$Layout-prop-columnGap}-none) {
|
|
174
|
+
.#{$Layout}-pane {
|
|
175
|
+
margin-right: calc(var(--Layout-column-gap) * -1);
|
|
176
|
+
padding-right: calc(var(--Layout-column-gap) - 1px);
|
|
177
|
+
}
|
|
178
|
+
.#{$Layout}-content {
|
|
179
|
+
margin-left: var(--Layout-column-gap);
|
|
180
|
+
}
|
|
181
|
+
}
|
|
182
|
+
}
|
|
183
|
+
|
|
184
|
+
&.#{$Layout}--#{$Layout-prop-panePosition}-end {
|
|
185
|
+
.#{$Layout}-pane {
|
|
186
|
+
border-left: 1px solid $Layout-divider-color;
|
|
187
|
+
}
|
|
188
|
+
|
|
189
|
+
&:not(.#{$Layout}--#{$Layout-prop-columnGap}-none) {
|
|
190
|
+
.#{$Layout}-pane {
|
|
191
|
+
margin-left: calc(var(--Layout-column-gap) * -1);
|
|
192
|
+
padding-left: calc(var(--Layout-column-gap) - 1px);
|
|
193
|
+
}
|
|
194
|
+
.#{$Layout}-content {
|
|
195
|
+
margin-right: var(--Layout-column-gap);
|
|
196
|
+
}
|
|
197
|
+
}
|
|
198
|
+
}
|
|
199
|
+
}
|
|
200
|
+
|
|
201
|
+
// Header divider
|
|
202
|
+
|
|
203
|
+
&.#{$Layout}--#{$Layout-prop-headerDivider} {
|
|
204
|
+
.#{$Layout}-header {
|
|
205
|
+
border-bottom: 1px solid $Layout-divider-color;
|
|
206
|
+
}
|
|
207
|
+
}
|
|
208
|
+
|
|
209
|
+
// Footer divider
|
|
210
|
+
|
|
211
|
+
&.#{$Layout}--#{$Layout-prop-footerDivider} {
|
|
212
|
+
.#{$Layout}-footer {
|
|
213
|
+
border-top: 1px solid $Layout-divider-color;
|
|
214
|
+
}
|
|
215
|
+
}
|
|
216
|
+
|
|
217
|
+
// Column gap
|
|
218
|
+
|
|
219
|
+
&.#{$Layout}--#{$Layout-prop-columnGap}-normal {
|
|
220
|
+
--Layout-column-gap: #{$spacer-3}; // 16px
|
|
221
|
+
|
|
222
|
+
@include breakpoint(lg) {
|
|
223
|
+
--Layout-column-gap: #{$spacer-4}; // 24px
|
|
224
|
+
}
|
|
225
|
+
}
|
|
226
|
+
|
|
227
|
+
&.#{$Layout}--#{$Layout-prop-columnGap}-condensed {
|
|
228
|
+
--Layout-column-gap: #{$spacer-3}; // 16px
|
|
229
|
+
}
|
|
230
|
+
|
|
231
|
+
&.#{$Layout}--#{$Layout-prop-columnGap}-none {
|
|
232
|
+
--Layout-column-gap: 0;
|
|
233
|
+
}
|
|
234
|
+
|
|
235
|
+
// Row gap
|
|
236
|
+
|
|
237
|
+
&.#{$Layout}--#{$Layout-prop-rowGap}-normal {
|
|
238
|
+
--Layout-row-gap: #{$spacer-3}; // 16px
|
|
239
|
+
|
|
240
|
+
@include breakpoint(lg) {
|
|
241
|
+
--Layout-row-gap: #{$spacer-4}; // 24px
|
|
242
|
+
}
|
|
243
|
+
}
|
|
244
|
+
|
|
245
|
+
&.#{$Layout}--#{$Layout-prop-rowGap}-none {
|
|
246
|
+
--Layout-row-gap: 0;
|
|
247
|
+
}
|
|
248
|
+
|
|
249
|
+
&.#{$Layout}--#{$Layout-prop-rowGap}-condensed {
|
|
250
|
+
--Layout-row-gap: #{$spacer-3}; // 16px
|
|
251
|
+
}
|
|
252
|
+
}
|
|
253
|
+
|
|
254
|
+
// paneWidth
|
|
255
|
+
|
|
256
|
+
@each $breakpoint in map-keys($sidebar-width) {
|
|
257
|
+
@include breakpoint($breakpoint) {
|
|
258
|
+
--Layout-pane-width: #{map-get($sidebar-width, $breakpoint)};
|
|
259
|
+
}
|
|
260
|
+
}
|
|
261
|
+
|
|
262
|
+
&.#{$Layout}--#{$Layout-prop-paneWidth}-narrow {
|
|
263
|
+
@each $breakpoint in map-keys($sidebar-narrow-width) {
|
|
264
|
+
@include breakpoint($breakpoint) {
|
|
265
|
+
--Layout-pane-width: #{map-get($sidebar-narrow-width, $breakpoint)};
|
|
266
|
+
}
|
|
267
|
+
}
|
|
268
|
+
}
|
|
269
|
+
|
|
270
|
+
&.#{$Layout}--#{$Layout-prop-paneWidth}-wide {
|
|
271
|
+
@each $breakpoint in map-keys($sidebar-wide-width) {
|
|
272
|
+
@include breakpoint($breakpoint) {
|
|
273
|
+
--Layout-pane-width: #{map-get($sidebar-wide-width, $breakpoint)};
|
|
274
|
+
}
|
|
275
|
+
}
|
|
276
|
+
}
|
|
277
|
+
|
|
278
|
+
// responsiveBehavior
|
|
279
|
+
|
|
280
|
+
&.#{$Layout}--#{$Layout-prop-responsiveBehavior}-flowVertical:not(.#{$Layout}--#{$Layout-prop-flowHorizontal}) {
|
|
281
|
+
> .#{$Layout}-regions {
|
|
282
|
+
display: grid;
|
|
283
|
+
grid-template-columns: 1fr;
|
|
284
|
+
grid-template-areas: var(--Layout-template-areas);
|
|
285
|
+
}
|
|
286
|
+
}
|
|
287
|
+
|
|
288
|
+
/*
|
|
289
|
+
&.#{$Layout}--#{$Layout-prop-responsiveBehavior}-flowVertical:not(.#{$Layout}--#{$Layout-prop-flowHorizontal}) {
|
|
290
|
+
// flow vertically on mobile
|
|
291
|
+
|
|
292
|
+
> .#{$Layout}-regions {
|
|
293
|
+
row-gap: var(--Layout-row-gap);
|
|
294
|
+
}
|
|
295
|
+
|
|
296
|
+
.#{$Layout}-header, .#{$Layout}-content, .#{$Layout}-pane, .#{$Layout}-footer {
|
|
297
|
+
margin-bottom: var(--Layout-row-gap);
|
|
298
|
+
}
|
|
299
|
+
}
|
|
300
|
+
|
|
301
|
+
&.#{$Layout}--#{$Layout-prop-responsiveBehavior}-splitAsPages:not(.#{$Layout}--#{$Layout-prop-flowHorizontal}) {
|
|
302
|
+
// split as pages on mobile
|
|
303
|
+
//background: yellow;
|
|
304
|
+
}
|
|
305
|
+
*/
|
|
306
|
+
|
|
307
|
+
// Regions
|
|
308
|
+
|
|
309
|
+
.#{$Layout}-header, .#{$Layout}-content, .#{$Layout}-pane, .#{$Layout}-footer {
|
|
310
|
+
padding: var(--Layout-inner-spacing-min);
|
|
311
|
+
}
|
|
312
|
+
|
|
313
|
+
.#{$Layout}-header {
|
|
314
|
+
grid-area: header;
|
|
315
|
+
background: lightpink;
|
|
316
|
+
}
|
|
317
|
+
|
|
318
|
+
.#{$Layout}-content {
|
|
319
|
+
padding-left: var(--Layout-inner-spacing-max);
|
|
320
|
+
padding-right: var(--Layout-inner-spacing-max);
|
|
321
|
+
grid-area: content;
|
|
322
|
+
background: rgb(255, 197, 253);
|
|
323
|
+
}
|
|
324
|
+
|
|
325
|
+
.#{$Layout}-pane {
|
|
326
|
+
grid-area: pane;
|
|
327
|
+
background: rgb(215, 255, 233);
|
|
328
|
+
}
|
|
329
|
+
|
|
330
|
+
.#{$Layout}-footer {
|
|
331
|
+
grid-area: footer;
|
|
332
|
+
background: lightyellow;
|
|
333
|
+
}
|
|
334
|
+
|
|
335
|
+
}
|
|
336
|
+
|
|
337
|
+
// contentWidth
|
|
338
|
+
// FIXME
|
|
339
|
+
// content-centered
|
|
@@ -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
|
+
}
|
package/links/README.md
ADDED
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
---
|
|
2
|
+
bundle: "links"
|
|
3
|
+
generated: true
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
# Primer CSS: `links` bundle
|
|
7
|
+
|
|
8
|
+
## Usage
|
|
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:
|
|
11
|
+
|
|
12
|
+
```scss
|
|
13
|
+
@import "@primer/css/links/index.scss";
|
|
14
|
+
```
|
|
15
|
+
|
|
16
|
+
## Build
|
|
17
|
+
|
|
18
|
+
The `@primer/css` npm package includes a standalone CSS build of this module in `dist/links.css`.
|
|
19
|
+
|
|
20
|
+
## License
|
|
21
|
+
|
|
22
|
+
[MIT](https://github.com/primer/css/blob/main/LICENSE) © [GitHub](https://github.com/)
|
|
23
|
+
|
|
24
|
+
|
|
25
|
+
[scss]: https://sass-lang.com/documentation/syntax#scss
|
package/links/index.scss
ADDED
package/links/link.scss
ADDED
|
@@ -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
|
+
}
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
---
|
|
2
|
+
bundle: "loaders"
|
|
3
|
+
generated: true
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
# Primer CSS: `loaders` bundle
|
|
7
|
+
|
|
8
|
+
## Usage
|
|
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:
|
|
11
|
+
|
|
12
|
+
```scss
|
|
13
|
+
@import "@primer/css/loaders/index.scss";
|
|
14
|
+
```
|
|
15
|
+
|
|
16
|
+
## Build
|
|
17
|
+
|
|
18
|
+
The `@primer/css` npm package includes a standalone CSS build of this module in `dist/loaders.css`.
|
|
19
|
+
|
|
20
|
+
## License
|
|
21
|
+
|
|
22
|
+
[MIT](https://github.com/primer/css/blob/main/LICENSE) © [GitHub](https://github.com/)
|
|
23
|
+
|
|
24
|
+
|
|
25
|
+
[scss]: https://sass-lang.com/documentation/syntax#scss
|