@primer/css 0.0.0-202111820121 → 0.0.0-2021118211841
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 +3 -55
- package/DEVELOP.md +0 -15
- package/actionlist/action-list-item.scss +18 -50
- package/actionlist/action-list.scss +0 -5
- package/base/normalize.scss +1 -1
- package/box/index.scss +0 -1
- package/buttons/misc.scss +3 -7
- package/color-modes/index.scss +0 -1
- package/color-modes/themes/dark.scss +2 -2
- package/color-modes/themes/dark_colorblind.scss +2 -2
- package/color-modes/themes/dark_dimmed.scss +2 -2
- package/color-modes/themes/dark_high_contrast.scss +2 -2
- package/color-modes/themes/light.scss +2 -2
- package/color-modes/themes/light_colorblind.scss +2 -2
- package/deprecations.json +0 -4
- package/dist/actionlist.css +1 -1
- package/dist/actionlist.css.map +1 -1
- package/dist/alerts.css.map +1 -1
- package/dist/autocomplete.css.map +1 -1
- package/dist/avatars.css.map +1 -1
- package/dist/base.css +1 -1
- package/dist/base.css.map +1 -1
- package/dist/blankslate.css.map +1 -1
- package/dist/box.css +1 -1
- package/dist/box.css.map +1 -1
- package/dist/branch-name.css.map +1 -1
- package/dist/breadcrumb.css.map +1 -1
- package/dist/buttons.css +1 -1
- package/dist/buttons.css.map +1 -1
- package/dist/color-modes.css +1 -1
- package/dist/color-modes.css.map +1 -1
- package/dist/core.css +1 -1
- package/dist/core.css.map +1 -1
- package/dist/deprecations.json +0 -4
- package/dist/dropdown.css.map +1 -1
- package/dist/forms.css.map +1 -1
- package/dist/header.css.map +1 -1
- package/dist/labels.css +1 -1
- package/dist/labels.css.map +1 -1
- package/dist/layout.css +1 -1
- package/dist/layout.css.map +1 -1
- package/dist/links.css.map +1 -1
- package/dist/loaders.css.map +1 -1
- package/dist/markdown.css.map +1 -1
- package/dist/marketing-buttons.css +1 -1
- package/dist/marketing-buttons.css.map +1 -1
- package/dist/marketing-type.css +1 -1
- package/dist/marketing-type.css.map +1 -1
- package/dist/marketing-utilities.css +1 -1
- package/dist/marketing-utilities.css.map +1 -1
- package/dist/marketing.css +1 -1
- package/dist/marketing.css.map +1 -1
- package/dist/meta.json +91 -89
- package/dist/navigation.css +1 -1
- package/dist/navigation.css.map +1 -1
- package/dist/pagination.css.map +1 -1
- package/dist/popover.css +1 -1
- package/dist/popover.css.map +1 -1
- package/dist/primer.css +4 -4
- package/dist/primer.css.map +1 -1
- package/dist/product.css +1 -1
- package/dist/product.css.map +1 -1
- package/dist/progress.css.map +1 -1
- package/dist/select-menu.css.map +1 -1
- package/dist/stats/actionlist.json +1 -1
- package/dist/stats/base.json +1 -1
- package/dist/stats/box.json +1 -1
- package/dist/stats/buttons.json +1 -1
- package/dist/stats/color-modes.json +1 -1
- package/dist/stats/core.json +1 -1
- package/dist/stats/labels.json +1 -1
- package/dist/stats/layout.json +1 -1
- package/dist/stats/marketing-buttons.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/popover.json +1 -1
- package/dist/stats/primer.json +1 -1
- package/dist/stats/product.json +1 -1
- package/dist/subhead.css.map +1 -1
- package/dist/timeline.css.map +1 -1
- package/dist/toasts.css.map +1 -1
- package/dist/tooltips.css.map +1 -1
- package/dist/truncate.css.map +1 -1
- package/dist/utilities.css.map +1 -1
- package/dist/variables.json +62 -62
- package/index.scss +4 -4
- package/labels/counters.scss +1 -1
- package/labels/labels.scss +1 -0
- package/layout/index.scss +1 -0
- package/layout/mixins.scss +27 -1
- package/layout/page-layout.scss +370 -0
- package/marketing/buttons/button.scss +52 -102
- package/marketing/buttons/index.scss +2 -2
- package/marketing/index.scss +0 -1
- package/marketing/support/index.scss +3 -2
- package/marketing/support/mixins.scss +66 -0
- package/marketing/support/variables.scss +5 -4
- package/marketing/type/index.scss +2 -2
- package/marketing/type/typography.scss +49 -23
- package/marketing/utilities/animations.scss +0 -42
- package/marketing/utilities/index.scss +5 -5
- package/marketing/utilities/layout.scss +1 -1
- package/navigation/underline-nav.scss +31 -76
- package/package.json +14 -14
- package/popover/popover.scss +4 -42
- package/support/mixins/layout.scss +5 -5
- package/support/mixins/misc.scss +1 -25
- package/support/variables/layout.scss +7 -8
- package/support/variables/typography.scss +1 -1
- package/box/box-overlay.scss +0 -40
- package/color-modes/themes/light_high_contrast.scss +0 -7
- package/dist/marketing-links.css +0 -2
- package/dist/marketing-links.css.map +0 -1
- package/dist/marketing-links.js +0 -1
- package/dist/stats/marketing-links.json +0 -1
- package/marketing/links/index.scss +0 -3
- package/marketing/links/link.scss +0 -50
|
@@ -0,0 +1,66 @@
|
|
|
1
|
+
@mixin btn-solid-mktg($color, $bg, $bg2, $bg3, $bg4) {
|
|
2
|
+
color: $color;
|
|
3
|
+
background-color: $bg2;
|
|
4
|
+
background-image: linear-gradient(-180deg, $bg 0%, $bg2 100%);
|
|
5
|
+
|
|
6
|
+
&::before {
|
|
7
|
+
background-image: linear-gradient(-180deg, $bg3 0%, $bg4 100%);
|
|
8
|
+
}
|
|
9
|
+
|
|
10
|
+
&:hover,
|
|
11
|
+
&.hover,
|
|
12
|
+
&:active,
|
|
13
|
+
&.selected,
|
|
14
|
+
&[aria-selected=true],
|
|
15
|
+
[open] > & {
|
|
16
|
+
background-color: $bg2;
|
|
17
|
+
background-image: linear-gradient(-180deg, $bg 0%, $bg2 100%);
|
|
18
|
+
}
|
|
19
|
+
|
|
20
|
+
&:focus,
|
|
21
|
+
&.focus {
|
|
22
|
+
outline: 0;
|
|
23
|
+
box-shadow: 0 0 0 0.2em rgba($bg2, 0.4);
|
|
24
|
+
}
|
|
25
|
+
|
|
26
|
+
&:disabled,
|
|
27
|
+
&.disabled,
|
|
28
|
+
&[aria-disabled=true] {
|
|
29
|
+
pointer-events: none;
|
|
30
|
+
cursor: default;
|
|
31
|
+
opacity: 0.5;
|
|
32
|
+
}
|
|
33
|
+
}
|
|
34
|
+
|
|
35
|
+
@mixin btn-outline-mktg($color, $color2, $border, $borderHover, $borderFocus, $borderFocusInset) {
|
|
36
|
+
color: $color;
|
|
37
|
+
background: none;
|
|
38
|
+
box-shadow: 0 0 0 1px $border inset;
|
|
39
|
+
|
|
40
|
+
&::before {
|
|
41
|
+
display: none;
|
|
42
|
+
}
|
|
43
|
+
|
|
44
|
+
&:hover,
|
|
45
|
+
&.hover,
|
|
46
|
+
&:active,
|
|
47
|
+
&.selected,
|
|
48
|
+
&[aria-selected=true],
|
|
49
|
+
[open] > & {
|
|
50
|
+
color: $color2;
|
|
51
|
+
background: none;
|
|
52
|
+
box-shadow: 0 0 0 2px $borderHover inset;
|
|
53
|
+
}
|
|
54
|
+
|
|
55
|
+
&:focus,
|
|
56
|
+
&.focus {
|
|
57
|
+
outline: 0;
|
|
58
|
+
box-shadow: 0 0 0 2px $borderFocus inset, 0 0 0 4px $borderFocusInset;
|
|
59
|
+
}
|
|
60
|
+
|
|
61
|
+
&:disabled,
|
|
62
|
+
&.disabled,
|
|
63
|
+
&[aria-disabled=true] {
|
|
64
|
+
opacity: 0.5;
|
|
65
|
+
}
|
|
66
|
+
}
|
|
@@ -1,5 +1,6 @@
|
|
|
1
|
+
// stylelint-disable unit-no-unknown
|
|
1
2
|
// Typography
|
|
2
|
-
$marketing-font-path:
|
|
3
|
+
$marketing-font-path: "/fonts/" !default;
|
|
3
4
|
|
|
4
5
|
$font-mktg: $body-font !default;
|
|
5
6
|
$font-weight-medium: 450 !default;
|
|
@@ -121,7 +122,7 @@ $transition-time: 0.4s !default;
|
|
|
121
122
|
$ease-mktg: cubic-bezier(0.16, 1, 0.3, 1) !default;
|
|
122
123
|
|
|
123
124
|
$marketing-position-variants: (
|
|
124
|
-
|
|
125
|
-
md:
|
|
126
|
-
lg:
|
|
125
|
+
"": "",
|
|
126
|
+
md: "-md",
|
|
127
|
+
lg: "-lg",
|
|
127
128
|
) !default;
|
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
// support files
|
|
2
|
-
@import
|
|
3
|
-
@import
|
|
2
|
+
@import "../support/index.scss";
|
|
3
|
+
@import "./typography.scss";
|
|
@@ -19,20 +19,20 @@
|
|
|
19
19
|
$pairing-md: map-get($mktg-header-pairings, nth($sizes, 2));
|
|
20
20
|
$pairing-lg: map-get($mktg-header-pairings, nth($sizes, 3));
|
|
21
21
|
|
|
22
|
-
font-size: map-get($pairing,
|
|
23
|
-
line-height: map-get($pairing,
|
|
24
|
-
@if (map-get($pairing,
|
|
22
|
+
font-size: map-get($pairing, "size") !important;
|
|
23
|
+
line-height: map-get($pairing, "lh") !important;
|
|
24
|
+
@if (map-get($pairing, "size") >= $mktg-header-weight-threshold) { font-weight: $mktg-header-weight-large !important; }
|
|
25
25
|
|
|
26
26
|
@if (nth($sizes, 1) != nth($sizes, 2)) {
|
|
27
27
|
@include breakpoint(md) {
|
|
28
|
-
font-size: map-get($pairing-md,
|
|
29
|
-
line-height: map-get($pairing-md,
|
|
28
|
+
font-size: map-get($pairing-md, "size") !important;
|
|
29
|
+
line-height: map-get($pairing-md, "lh") !important;
|
|
30
30
|
|
|
31
|
-
@if (map-get($pairing-md,
|
|
31
|
+
@if (map-get($pairing-md, "size") >= $mktg-header-spacing-threshold and map-get($pairing, "size") < $mktg-header-spacing-threshold) {
|
|
32
32
|
letter-spacing: $mktg-header-spacing-large !important;
|
|
33
33
|
}
|
|
34
34
|
|
|
35
|
-
@if (map-get($pairing-md,
|
|
35
|
+
@if (map-get($pairing-md, "size") >= $mktg-header-weight-threshold and map-get($pairing, "size") < $mktg-header-weight-threshold) {
|
|
36
36
|
font-weight: $mktg-header-weight-large !important;
|
|
37
37
|
}
|
|
38
38
|
}
|
|
@@ -40,14 +40,14 @@
|
|
|
40
40
|
|
|
41
41
|
@if (nth($sizes, 2) != nth($sizes, 3)) {
|
|
42
42
|
@include breakpoint(lg) {
|
|
43
|
-
font-size: map-get($pairing-lg,
|
|
44
|
-
line-height: map-get($pairing-lg,
|
|
43
|
+
font-size: map-get($pairing-lg, "size") !important;
|
|
44
|
+
line-height: map-get($pairing-lg, "lh") !important;
|
|
45
45
|
|
|
46
|
-
@if (map-get($pairing-lg,
|
|
46
|
+
@if (map-get($pairing-lg, "size") >= $mktg-header-spacing-threshold and map-get($pairing-md, "size") < $mktg-header-spacing-threshold) {
|
|
47
47
|
letter-spacing: $mktg-header-spacing-large !important;
|
|
48
48
|
}
|
|
49
49
|
|
|
50
|
-
@if (map-get($pairing-lg,
|
|
50
|
+
@if (map-get($pairing-lg, "size") >= $mktg-header-weight-threshold and map-get($pairing-md, "size") < $mktg-header-weight-threshold) {
|
|
51
51
|
font-weight: $mktg-header-weight-large !important;
|
|
52
52
|
}
|
|
53
53
|
}
|
|
@@ -73,21 +73,21 @@
|
|
|
73
73
|
$pairing-md: map-get($mktg-body-pairings, nth($sizes, 2));
|
|
74
74
|
$pairing-lg: map-get($mktg-body-pairings, nth($sizes, 3));
|
|
75
75
|
|
|
76
|
-
font-size: map-get($pairing,
|
|
77
|
-
line-height: map-get($pairing,
|
|
78
|
-
@if (map-get($pairing,
|
|
79
|
-
@if (map-get($pairing,
|
|
76
|
+
font-size: map-get($pairing, "size") !important;
|
|
77
|
+
line-height: map-get($pairing, "lh") !important;
|
|
78
|
+
@if (map-get($pairing, "size") >= $mktg-body-spacing-threshold) { letter-spacing: $mktg-body-spacing-large !important; }
|
|
79
|
+
@if (map-get($pairing, "size") >= $mktg-body-weight-threshold) { font-weight: $font-weight-semibold; }
|
|
80
80
|
|
|
81
81
|
@if (nth($sizes, 1) != nth($sizes, 2)) {
|
|
82
82
|
@include breakpoint(md) {
|
|
83
|
-
font-size: map-get($pairing-md,
|
|
84
|
-
line-height: map-get($pairing-md,
|
|
83
|
+
font-size: map-get($pairing-md, "size") !important;
|
|
84
|
+
line-height: map-get($pairing-md, "lh") !important;
|
|
85
85
|
|
|
86
|
-
@if (map-get($pairing-md,
|
|
86
|
+
@if (map-get($pairing-md, "size") >= $mktg-body-spacing-threshold and map-get($pairing, "size") < $mktg-body-spacing-threshold) {
|
|
87
87
|
letter-spacing: $mktg-body-spacing-large !important;
|
|
88
88
|
}
|
|
89
89
|
|
|
90
|
-
@if (map-get($pairing-md,
|
|
90
|
+
@if (map-get($pairing-md, "size") >= $mktg-body-weight-threshold and map-get($pairing, "size") < $mktg-body-weight-threshold) {
|
|
91
91
|
font-weight: $font-weight-medium;
|
|
92
92
|
}
|
|
93
93
|
}
|
|
@@ -95,14 +95,14 @@
|
|
|
95
95
|
|
|
96
96
|
@if (nth($sizes, 2) != nth($sizes, 3)) {
|
|
97
97
|
@include breakpoint(lg) {
|
|
98
|
-
font-size: map-get($pairing-lg,
|
|
99
|
-
line-height: map-get($pairing-lg,
|
|
98
|
+
font-size: map-get($pairing-lg, "size") !important;
|
|
99
|
+
line-height: map-get($pairing-lg, "lh") !important;
|
|
100
100
|
|
|
101
|
-
@if (map-get($pairing-lg,
|
|
101
|
+
@if (map-get($pairing-lg, "size") >= $mktg-body-spacing-threshold and map-get($pairing-md, "size") < $mktg-body-spacing-threshold) {
|
|
102
102
|
letter-spacing: $mktg-body-spacing-large !important;
|
|
103
103
|
}
|
|
104
104
|
|
|
105
|
-
@if (map-get($pairing-lg,
|
|
105
|
+
@if (map-get($pairing-lg, "size") >= $mktg-body-weight-threshold and map-get($pairing-md, "size") < $mktg-body-weight-threshold) {
|
|
106
106
|
font-weight: $font-weight-medium;
|
|
107
107
|
}
|
|
108
108
|
}
|
|
@@ -113,3 +113,29 @@
|
|
|
113
113
|
.text-medium {
|
|
114
114
|
font-weight: $font-weight-medium !important;
|
|
115
115
|
}
|
|
116
|
+
|
|
117
|
+
// Pullquote
|
|
118
|
+
|
|
119
|
+
@mixin pullquote {
|
|
120
|
+
padding-top: 0;
|
|
121
|
+
padding-bottom: 0;
|
|
122
|
+
padding-left: $spacer;
|
|
123
|
+
margin-bottom: $spacer-4;
|
|
124
|
+
font-family: $mono-font;
|
|
125
|
+
font-size: $h4-size;
|
|
126
|
+
line-height: 1.4;
|
|
127
|
+
color: var(--color-color-text-secondary);
|
|
128
|
+
border-left: 3px solid var(--color-border-default);
|
|
129
|
+
|
|
130
|
+
@include breakpoint(md) {
|
|
131
|
+
padding-left: $spacer * 1.5;
|
|
132
|
+
margin-bottom: $spacer-5;
|
|
133
|
+
margin-left: (-$spacer * 1.5) - 3px;
|
|
134
|
+
font-size: 18px;
|
|
135
|
+
line-height: $lh-default;
|
|
136
|
+
}
|
|
137
|
+
}
|
|
138
|
+
|
|
139
|
+
.pullquote {
|
|
140
|
+
@include pullquote;
|
|
141
|
+
}
|
|
@@ -7,45 +7,3 @@
|
|
|
7
7
|
transform: scale3d(1.025, 1.025, 1.025);
|
|
8
8
|
}
|
|
9
9
|
}
|
|
10
|
-
|
|
11
|
-
// Animated arrow symbol, used in marketing links, buttons, etc.
|
|
12
|
-
.btn-mktg,
|
|
13
|
-
.link-mktg,
|
|
14
|
-
.arrow-target-mktg {
|
|
15
|
-
.octicon {
|
|
16
|
-
width: 1em;
|
|
17
|
-
height: 1em;
|
|
18
|
-
}
|
|
19
|
-
|
|
20
|
-
.arrow-symbol-mktg {
|
|
21
|
-
transition: transform 0.2s;
|
|
22
|
-
transform: translateX(0);
|
|
23
|
-
|
|
24
|
-
// stylelint-disable-next-line selector-max-type
|
|
25
|
-
path:last-child {
|
|
26
|
-
stroke-dasharray: 10;
|
|
27
|
-
stroke-dashoffset: 10;
|
|
28
|
-
transition: stroke-dashoffset 0.2s;
|
|
29
|
-
}
|
|
30
|
-
}
|
|
31
|
-
|
|
32
|
-
@media screen and (prefers-reduced-motion: no-preference) {
|
|
33
|
-
&:hover,
|
|
34
|
-
&:focus {
|
|
35
|
-
.arrow-symbol-mktg {
|
|
36
|
-
transform: translateX(4px);
|
|
37
|
-
|
|
38
|
-
// stylelint-disable-next-line selector-max-type, selector-max-specificity, max-nesting-depth
|
|
39
|
-
path:last-child {
|
|
40
|
-
stroke-dashoffset: 20;
|
|
41
|
-
}
|
|
42
|
-
}
|
|
43
|
-
}
|
|
44
|
-
|
|
45
|
-
&:active {
|
|
46
|
-
.arrow-symbol-mktg {
|
|
47
|
-
transform: translateX(6px);
|
|
48
|
-
}
|
|
49
|
-
}
|
|
50
|
-
}
|
|
51
|
-
}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
@import
|
|
1
|
+
@import "../support/index.scss";
|
|
2
2
|
// utilities
|
|
3
|
-
@import
|
|
4
|
-
@import
|
|
5
|
-
@import
|
|
6
|
-
@import
|
|
3
|
+
@import "./animations.scss";
|
|
4
|
+
@import "./borders.scss";
|
|
5
|
+
@import "./filters.scss";
|
|
6
|
+
@import "./layout.scss";
|
|
@@ -6,7 +6,7 @@
|
|
|
6
6
|
@each $breakpoint, $variant in $marketing-position-variants {
|
|
7
7
|
@include breakpoint($breakpoint) {
|
|
8
8
|
@each $scale, $size in $spacer-map-extended {
|
|
9
|
-
@if ($size != 0 or $variant !=
|
|
9
|
+
@if ($size != 0 or $variant != "") {
|
|
10
10
|
.top#{$variant}-#{$scale} { top: $size !important; }
|
|
11
11
|
.right#{$variant}-#{$scale} { right: $size !important; }
|
|
12
12
|
.bottom#{$variant}-#{$scale} { bottom: $size !important; }
|
|
@@ -1,99 +1,50 @@
|
|
|
1
|
-
$nav-height: $spacer-3 * 3 !default; // 48px
|
|
2
|
-
|
|
3
1
|
.UnderlineNav {
|
|
4
2
|
display: flex;
|
|
5
|
-
min-height: $nav-height;
|
|
6
3
|
overflow-x: auto;
|
|
7
4
|
overflow-y: hidden;
|
|
8
5
|
// stylelint-disable-next-line primer/box-shadow
|
|
9
6
|
box-shadow: inset 0 -1px 0 var(--color-border-muted);
|
|
10
|
-
-webkit-overflow-scrolling: auto;
|
|
11
7
|
justify-content: space-between;
|
|
12
8
|
}
|
|
13
9
|
|
|
14
10
|
.UnderlineNav-body {
|
|
15
11
|
display: flex;
|
|
16
|
-
align-items: center;
|
|
17
|
-
gap: $spacer-2;
|
|
18
|
-
list-style: none;
|
|
19
12
|
}
|
|
20
13
|
|
|
21
14
|
.UnderlineNav-item {
|
|
22
|
-
|
|
23
|
-
display: flex;
|
|
24
|
-
padding: 0 $spacer-2;
|
|
15
|
+
padding: $spacer-2 $spacer-3;
|
|
25
16
|
font-size: $body-font-size;
|
|
26
17
|
// stylelint-disable-next-line primer/typography
|
|
27
18
|
line-height: 30px;
|
|
28
19
|
color: var(--color-fg-default);
|
|
29
20
|
text-align: center;
|
|
30
21
|
white-space: nowrap;
|
|
31
|
-
cursor: pointer;
|
|
32
22
|
background-color: transparent;
|
|
33
23
|
border: 0;
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
// renders a visibly hidden "copy" of the label in bold, reserving box space for when label becomes bold on selected
|
|
38
|
-
[data-content]::before {
|
|
39
|
-
display: block;
|
|
40
|
-
height: 0;
|
|
41
|
-
font-weight: $font-weight-bold;
|
|
42
|
-
visibility: hidden;
|
|
43
|
-
content: attr(data-content);
|
|
44
|
-
}
|
|
45
|
-
|
|
46
|
-
// increase touch target area
|
|
47
|
-
&::before {
|
|
48
|
-
@include minTouchTarget($min-height: $nav-height);
|
|
49
|
-
}
|
|
24
|
+
// stylelint-disable-next-line primer/borders
|
|
25
|
+
border-bottom: 2px $border-style transparent;
|
|
50
26
|
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
27
|
+
&:hover,
|
|
28
|
+
&:focus {
|
|
29
|
+
color: var(--color-fg-default);
|
|
30
|
+
text-decoration: none;
|
|
31
|
+
border-bottom-color: var(--color-neutral-muted);
|
|
32
|
+
outline: 1px dotted transparent; // Support Firefox custom colors
|
|
33
|
+
outline-offset: -1px;
|
|
34
|
+
transition: border-bottom-color 0.12s ease-out;
|
|
59
35
|
}
|
|
60
36
|
|
|
61
37
|
&.selected,
|
|
62
|
-
&[role=
|
|
63
|
-
&[aria-current]:not([aria-current=
|
|
38
|
+
&[role=tab][aria-selected=true],
|
|
39
|
+
&[aria-current]:not([aria-current=false]) {
|
|
64
40
|
font-weight: $font-weight-bold;
|
|
65
41
|
color: var(--color-fg-default);
|
|
42
|
+
border-bottom-color: var(--color-primer-border-active);
|
|
43
|
+
outline: 1px dotted transparent; // Support Firefox custom colors
|
|
44
|
+
outline-offset: -1px;
|
|
66
45
|
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
position: absolute;
|
|
70
|
-
right: 50%;
|
|
71
|
-
// 48px total height / 2 (24px) + 1px
|
|
72
|
-
bottom: calc(50% - 25px);
|
|
73
|
-
width: 100%;
|
|
74
|
-
height: 2px;
|
|
75
|
-
content: '';
|
|
76
|
-
background: var(--color-primer-border-active);
|
|
77
|
-
border-radius: $border-radius;
|
|
78
|
-
transform: translate(50%, -50%);
|
|
79
|
-
}
|
|
80
|
-
}
|
|
81
|
-
|
|
82
|
-
// remove when global focus state is merged
|
|
83
|
-
&.focus,
|
|
84
|
-
&:focus {
|
|
85
|
-
@include focusOutline;
|
|
86
|
-
outline-offset: -2px;
|
|
87
|
-
}
|
|
88
|
-
|
|
89
|
-
.Counter {
|
|
90
|
-
margin-left: $spacer-2;
|
|
91
|
-
color: var(--color-fg-default);
|
|
92
|
-
background-color: var(--color-neutral-muted);
|
|
93
|
-
|
|
94
|
-
&--primary {
|
|
95
|
-
color: var(--color-fg-on-emphasis);
|
|
96
|
-
background-color: var(--color-neutral-emphasis);
|
|
46
|
+
.UnderlineNav-octicon {
|
|
47
|
+
color: var(--color-fg-muted);
|
|
97
48
|
}
|
|
98
49
|
}
|
|
99
50
|
}
|
|
@@ -112,18 +63,22 @@ $nav-height: $spacer-3 * 3 !default; // 48px
|
|
|
112
63
|
|
|
113
64
|
.UnderlineNav--full {
|
|
114
65
|
display: block;
|
|
115
|
-
|
|
116
|
-
// required for underline to align with additional wrapper element
|
|
117
|
-
.UnderlineNav-body {
|
|
118
|
-
min-height: $nav-height;
|
|
119
|
-
}
|
|
120
66
|
}
|
|
121
67
|
|
|
122
68
|
.UnderlineNav-octicon {
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
69
|
+
margin-right: $spacer-1;
|
|
70
|
+
color: var(--color-fg-subtle);
|
|
71
|
+
}
|
|
72
|
+
|
|
73
|
+
.UnderlineNav .Counter {
|
|
74
|
+
margin-left: $spacer-1;
|
|
75
|
+
color: var(--color-fg-default);
|
|
76
|
+
background-color: var(--color-neutral-muted);
|
|
77
|
+
|
|
78
|
+
&--primary {
|
|
79
|
+
color: var(--color-fg-on-emphasis);
|
|
80
|
+
background-color: var(--color-neutral-emphasis);
|
|
81
|
+
}
|
|
127
82
|
}
|
|
128
83
|
|
|
129
84
|
.UnderlineNav-container {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@primer/css",
|
|
3
|
-
"version": "0.0.0-
|
|
3
|
+
"version": "0.0.0-2021118211841",
|
|
4
4
|
"description": "The CSS implementation of GitHub's Primer Design System",
|
|
5
5
|
"homepage": "https://primer.style/css",
|
|
6
6
|
"author": "GitHub, Inc.",
|
|
@@ -24,7 +24,7 @@
|
|
|
24
24
|
],
|
|
25
25
|
"scripts": {
|
|
26
26
|
"dist": "script/dist.js",
|
|
27
|
-
"stylelint": "stylelint --quiet
|
|
27
|
+
"stylelint": "stylelint --quiet src/**/*.scss",
|
|
28
28
|
"eslint": "eslint deprecations.js __tests__ script",
|
|
29
29
|
"prepublishOnly": "script/prepublish",
|
|
30
30
|
"start": "yarn dev",
|
|
@@ -35,37 +35,37 @@
|
|
|
35
35
|
"storybook": "cd docs && yarn && yarn storybook"
|
|
36
36
|
},
|
|
37
37
|
"dependencies": {
|
|
38
|
-
"@primer/primitives": "^
|
|
38
|
+
"@primer/primitives": "^6.1.0"
|
|
39
39
|
},
|
|
40
40
|
"devDependencies": {
|
|
41
|
-
"@changesets/changelog-github": "0.4.
|
|
42
|
-
"@changesets/cli": "2.
|
|
41
|
+
"@changesets/changelog-github": "0.4.1",
|
|
42
|
+
"@changesets/cli": "2.17.0",
|
|
43
43
|
"@github/prettier-config": "0.0.4",
|
|
44
44
|
"@koddsson/postcss-sass": "5.0.0",
|
|
45
|
-
"@primer/stylelint-config": "12.1.
|
|
45
|
+
"@primer/stylelint-config": "12.1.0",
|
|
46
46
|
"autoprefixer": "10.4.0",
|
|
47
47
|
"cssstats": "4.0.2",
|
|
48
|
-
"eslint": "8.
|
|
49
|
-
"eslint-plugin-github": "4.3.
|
|
50
|
-
"eslint-plugin-jest": "25.
|
|
48
|
+
"eslint": "8.1.0",
|
|
49
|
+
"eslint-plugin-github": "4.3.3",
|
|
50
|
+
"eslint-plugin-jest": "25.2.2",
|
|
51
51
|
"eslint-plugin-prettier": "4.0.0",
|
|
52
52
|
"filesize": "8.0.6",
|
|
53
53
|
"front-matter": "4.0.2",
|
|
54
54
|
"fs-extra": "10.0.0",
|
|
55
55
|
"globby": "12.0.2",
|
|
56
|
-
"jest": "27.
|
|
56
|
+
"jest": "27.3.1",
|
|
57
57
|
"js-yaml": "4.1.0",
|
|
58
|
-
"postcss": "8.
|
|
58
|
+
"postcss": "8.3.11",
|
|
59
59
|
"postcss-calc": "8.0.0",
|
|
60
60
|
"postcss-import": "14.0.2",
|
|
61
61
|
"postcss-load-config": "3.1.0",
|
|
62
62
|
"postcss-scss": "4.0.2",
|
|
63
63
|
"postcss-simple-vars": "6.0.3",
|
|
64
|
-
"prettier": "2.
|
|
64
|
+
"prettier": "2.4.1",
|
|
65
65
|
"semver": "7.3.5",
|
|
66
|
-
"stylelint": "14.1
|
|
66
|
+
"stylelint": "14.0.1",
|
|
67
67
|
"stylelint-scss": "4.0.0",
|
|
68
|
-
"table": "6.7.
|
|
68
|
+
"table": "6.7.2"
|
|
69
69
|
},
|
|
70
70
|
"jest": {
|
|
71
71
|
"testEnvironment": "node",
|
package/popover/popover.scss
CHANGED
|
@@ -8,9 +8,6 @@
|
|
|
8
8
|
width: 232px;
|
|
9
9
|
margin-right: auto;
|
|
10
10
|
margin-left: auto;
|
|
11
|
-
background-color: var(--color-canvas-overlay);
|
|
12
|
-
border: $border-width $border-style var(--color-border-default);
|
|
13
|
-
border-radius: $border-radius;
|
|
14
11
|
|
|
15
12
|
// Carets
|
|
16
13
|
&::before,
|
|
@@ -37,13 +34,10 @@
|
|
|
37
34
|
border: 7px $border-style transparent;
|
|
38
35
|
border-bottom-color: var(--color-canvas-overlay);
|
|
39
36
|
}
|
|
40
|
-
}
|
|
41
37
|
|
|
42
|
-
//
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
&::after {
|
|
46
|
-
display: none;
|
|
38
|
+
// TODO: Refactor so that .Popover is not dependant on .Box
|
|
39
|
+
&.Box {
|
|
40
|
+
background-color: var(--color-canvas-overlay);
|
|
47
41
|
}
|
|
48
42
|
}
|
|
49
43
|
|
|
@@ -188,40 +182,8 @@
|
|
|
188
182
|
}
|
|
189
183
|
|
|
190
184
|
.Popover-message--large {
|
|
185
|
+
|
|
191
186
|
@include breakpoint(sm) {
|
|
192
187
|
min-width: 320px;
|
|
193
188
|
}
|
|
194
189
|
}
|
|
195
|
-
|
|
196
|
-
// Responsive Popover
|
|
197
|
-
// For < md it will show full-width anchored to the bottom
|
|
198
|
-
|
|
199
|
-
@media (max-width: ($width-md - 1px)) {
|
|
200
|
-
.Popover {
|
|
201
|
-
position: fixed;
|
|
202
|
-
top: auto !important;
|
|
203
|
-
right: 0 !important;
|
|
204
|
-
bottom: 0 !important;
|
|
205
|
-
left: 0 !important;
|
|
206
|
-
}
|
|
207
|
-
|
|
208
|
-
.Popover-message {
|
|
209
|
-
top: auto;
|
|
210
|
-
right: auto;
|
|
211
|
-
bottom: auto;
|
|
212
|
-
left: auto;
|
|
213
|
-
width: auto !important;
|
|
214
|
-
margin: $spacer-2;
|
|
215
|
-
}
|
|
216
|
-
|
|
217
|
-
// Increase tap area for touch input
|
|
218
|
-
.Popover-message > .btn-octicon {
|
|
219
|
-
padding: $spacer-2 + $spacer-1 !important;
|
|
220
|
-
}
|
|
221
|
-
|
|
222
|
-
// Remove caret
|
|
223
|
-
.Popover-message::after,
|
|
224
|
-
.Popover-message::before {
|
|
225
|
-
display: none;
|
|
226
|
-
}
|
|
227
|
-
}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
// Responsive media queries
|
|
2
2
|
|
|
3
3
|
@mixin breakpoint($breakpoint) {
|
|
4
|
-
@if $breakpoint ==
|
|
4
|
+
@if $breakpoint == "" {
|
|
5
5
|
@content;
|
|
6
6
|
}
|
|
7
7
|
|
|
@@ -19,8 +19,8 @@
|
|
|
19
19
|
|
|
20
20
|
// If the key doesn't exist in the map
|
|
21
21
|
@else {
|
|
22
|
-
@warn
|
|
23
|
-
+
|
|
22
|
+
@warn "Unfortunately, no value could be retrieved from `#{$breakpoint}`. "
|
|
23
|
+
+ "Please make sure it is defined in `$breakpoints` map.";
|
|
24
24
|
}
|
|
25
25
|
}
|
|
26
26
|
}
|
|
@@ -47,12 +47,12 @@
|
|
|
47
47
|
@mixin clearfix {
|
|
48
48
|
&::before {
|
|
49
49
|
display: table;
|
|
50
|
-
content:
|
|
50
|
+
content: "";
|
|
51
51
|
}
|
|
52
52
|
|
|
53
53
|
&::after {
|
|
54
54
|
display: table;
|
|
55
55
|
clear: both;
|
|
56
|
-
content:
|
|
56
|
+
content: "";
|
|
57
57
|
}
|
|
58
58
|
}
|
package/support/mixins/misc.scss
CHANGED
|
@@ -10,7 +10,7 @@
|
|
|
10
10
|
width: 8px;
|
|
11
11
|
height: 16px;
|
|
12
12
|
pointer-events: none;
|
|
13
|
-
content:
|
|
13
|
+
content: " ";
|
|
14
14
|
clip-path: polygon(0 50%, 100% 0, 100% 100%);
|
|
15
15
|
}
|
|
16
16
|
|
|
@@ -24,27 +24,3 @@
|
|
|
24
24
|
background-color: $border;
|
|
25
25
|
}
|
|
26
26
|
}
|
|
27
|
-
|
|
28
|
-
// global focus styles
|
|
29
|
-
|
|
30
|
-
@mixin focusOutline {
|
|
31
|
-
z-index: 1;
|
|
32
|
-
outline: 2px solid var(--color-accent-fg);
|
|
33
|
-
outline-offset: 2px;
|
|
34
|
-
}
|
|
35
|
-
|
|
36
|
-
// if min-width is undefined, return only min-height
|
|
37
|
-
@mixin minTouchTarget($min-height: 32px, $min-width: '') {
|
|
38
|
-
position: absolute;
|
|
39
|
-
top: 50%;
|
|
40
|
-
left: 50%;
|
|
41
|
-
width: 100%;
|
|
42
|
-
height: 100%;
|
|
43
|
-
min-height: $min-height;
|
|
44
|
-
content: '';
|
|
45
|
-
transform: translateX(-50%) translateY(-50%);
|
|
46
|
-
|
|
47
|
-
@if $min-width != '' {
|
|
48
|
-
min-width: $min-width;
|
|
49
|
-
}
|
|
50
|
-
}
|
|
@@ -150,11 +150,11 @@ $breakpoints: (
|
|
|
150
150
|
// breakpoints and create both responsive and non-responsive classes in one
|
|
151
151
|
// loop:
|
|
152
152
|
$responsive-variants: (
|
|
153
|
-
|
|
154
|
-
sm:
|
|
155
|
-
md:
|
|
156
|
-
lg:
|
|
157
|
-
xl:
|
|
153
|
+
"": "",
|
|
154
|
+
sm: "-sm",
|
|
155
|
+
md: "-md",
|
|
156
|
+
lg: "-lg",
|
|
157
|
+
xl: "-xl",
|
|
158
158
|
) !default;
|
|
159
159
|
|
|
160
160
|
// responive utility position values
|
|
@@ -178,9 +178,8 @@ $sidebar-narrow-width: (
|
|
|
178
178
|
) !default;
|
|
179
179
|
|
|
180
180
|
$sidebar-wide-width: (
|
|
181
|
-
md: 296px,
|
|
182
181
|
lg: 320px,
|
|
183
|
-
xl:
|
|
182
|
+
xl: 336px
|
|
184
183
|
) !default;
|
|
185
184
|
|
|
186
185
|
$gutter: (
|
|
@@ -199,4 +198,4 @@ $gutter-spacious: (
|
|
|
199
198
|
md: $spacer-4,
|
|
200
199
|
lg: $spacer-5,
|
|
201
200
|
xl: $spacer-6
|
|
202
|
-
) !default;
|
|
201
|
+
) !default;
|