@primer/css 0.0.0-2021102331850 → 0.0.0-2021102434749
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 +31 -3
- package/DEVELOP.md +15 -0
- package/base/normalize.scss +1 -1
- package/box/box-overlay.scss +40 -0
- package/box/index.scss +1 -0
- package/color-modes/index.scss +1 -0
- 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/color-modes/themes/light_high_contrast.scss +7 -0
- package/deprecations.json +4 -0
- 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.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 +4 -0
- 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.map +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 +76 -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/base.json +1 -1
- package/dist/stats/box.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.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/labels.scss +0 -1
- package/layout/index.scss +0 -1
- package/marketing/buttons/button.scss +95 -53
- package/marketing/buttons/index.scss +2 -2
- package/marketing/support/index.scss +2 -3
- package/marketing/support/variables.scss +4 -5
- package/marketing/type/index.scss +2 -2
- package/marketing/type/typography.scss +23 -23
- package/marketing/utilities/index.scss +5 -5
- package/marketing/utilities/layout.scss +1 -1
- package/navigation/underline-nav.scss +56 -28
- package/package.json +10 -10
- package/popover/popover.scss +42 -4
- package/support/mixins/layout.scss +5 -5
- package/support/mixins/misc.scss +25 -1
- package/support/variables/layout.scss +8 -7
- package/support/variables/typography.scss +1 -1
- package/layout/layout-beta.scss +0 -497
- package/marketing/support/mixins.scss +0 -66
package/labels/labels.scss
CHANGED
package/layout/index.scss
CHANGED
|
@@ -2,95 +2,137 @@
|
|
|
2
2
|
position: relative;
|
|
3
3
|
z-index: 1;
|
|
4
4
|
display: inline-block;
|
|
5
|
-
appearance: none !important;
|
|
6
5
|
// stylelint-disable-next-line primer/spacing
|
|
7
6
|
padding: 0.9rem 1.5rem 1.1rem;
|
|
8
7
|
// stylelint-disable-next-line primer/typography
|
|
9
8
|
font-size: 1rem;
|
|
10
9
|
font-weight: $font-weight-bold;
|
|
11
10
|
line-height: 1;
|
|
11
|
+
color: var(--color-canvas-default);
|
|
12
|
+
text-align: center;
|
|
12
13
|
white-space: nowrap;
|
|
13
14
|
vertical-align: middle;
|
|
14
15
|
user-select: none;
|
|
16
|
+
background: linear-gradient(180deg, rgba(255 255 255 / 0.15) 0%, rgba(255 255 255 / 0) 100%), var(--color-mktg-btn-bg) !important;
|
|
15
17
|
border: 0;
|
|
16
18
|
// stylelint-disable-next-line primer/borders
|
|
17
19
|
border-radius: 0.375rem;
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
var(--color-mktg-btn-text),
|
|
21
|
-
var(--color-mktg-btn-bg-top),
|
|
22
|
-
var(--color-mktg-btn-bg-bottom),
|
|
23
|
-
var(--color-mktg-btn-bg-overlay-top),
|
|
24
|
-
var(--color-mktg-btn-bg-overlay-bottom),
|
|
25
|
-
);
|
|
20
|
+
transition: box-shadow 0.2s;
|
|
21
|
+
appearance: none !important;
|
|
26
22
|
|
|
27
23
|
&::before {
|
|
28
|
-
background-blend-mode: overlay, normal;
|
|
29
24
|
position: absolute;
|
|
30
25
|
top: 0;
|
|
31
26
|
right: 0;
|
|
32
27
|
bottom: 0;
|
|
33
28
|
left: 0;
|
|
34
29
|
z-index: -1;
|
|
35
|
-
content:
|
|
36
|
-
// stylelint-disable-next-line primer/
|
|
37
|
-
|
|
30
|
+
content: '';
|
|
31
|
+
// stylelint-disable-next-line primer/colors
|
|
32
|
+
background: linear-gradient(180deg, rgba(255 255 255 / 0.15) 0%, rgba(255 255 255 / 0) 100%) !important;
|
|
33
|
+
border-radius: inherit;
|
|
38
34
|
opacity: 0;
|
|
39
|
-
|
|
35
|
+
opacity: 0;
|
|
36
|
+
transition: opacity 0.2s;
|
|
37
|
+
background-blend-mode: normal;
|
|
40
38
|
}
|
|
41
39
|
|
|
42
40
|
&:hover {
|
|
43
|
-
|
|
41
|
+
box-shadow: var(--color-mktg-btn-shadow-hover) !important;
|
|
42
|
+
}
|
|
44
43
|
|
|
44
|
+
&:focus,
|
|
45
|
+
&.focus {
|
|
46
|
+
outline: 0;
|
|
47
|
+
box-shadow: var(--color-mktg-btn-shadow-focus), var(--color-mktg-btn-shadow-hover) !important;
|
|
48
|
+
}
|
|
49
|
+
|
|
50
|
+
&:hover,
|
|
51
|
+
&:focus,
|
|
52
|
+
&.focus {
|
|
45
53
|
&::before {
|
|
46
54
|
opacity: 1;
|
|
47
|
-
|
|
55
|
+
}
|
|
56
|
+
|
|
57
|
+
&:disabled {
|
|
58
|
+
box-shadow: none !important;
|
|
48
59
|
}
|
|
49
60
|
}
|
|
50
|
-
}
|
|
51
61
|
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
62
|
+
&:active {
|
|
63
|
+
outline: none;
|
|
64
|
+
// stylelint-disable-next-line primer/box-shadow
|
|
65
|
+
box-shadow: 0 0 0 transparent;
|
|
66
|
+
|
|
67
|
+
&::before {
|
|
68
|
+
opacity: 0.5 !important;
|
|
69
|
+
}
|
|
70
|
+
}
|
|
60
71
|
}
|
|
61
72
|
|
|
62
|
-
.btn-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
73
|
+
.btn-muted-mktg {
|
|
74
|
+
color: var(--color-fg-default) !important;
|
|
75
|
+
background: none !important;
|
|
76
|
+
box-shadow: var(--color-mktg-btn-shadow-outline);
|
|
77
|
+
|
|
78
|
+
&::before {
|
|
79
|
+
display: none;
|
|
80
|
+
}
|
|
81
|
+
|
|
82
|
+
&:hover {
|
|
83
|
+
box-shadow: var(--color-mktg-btn-shadow-hover-muted) !important;
|
|
84
|
+
}
|
|
85
|
+
|
|
86
|
+
&:focus,
|
|
87
|
+
&.focus {
|
|
88
|
+
box-shadow: var(--color-mktg-btn-shadow-hover-muted), var(--color-mktg-btn-shadow-focus) !important;
|
|
89
|
+
}
|
|
90
|
+
|
|
91
|
+
&:active {
|
|
92
|
+
// stylelint-disable-next-line primer/box-shadow
|
|
93
|
+
box-shadow: var(--color-fg-default) 0 0 0 3px inset !important;
|
|
94
|
+
}
|
|
95
|
+
|
|
96
|
+
&:disabled {
|
|
97
|
+
// stylelint-disable-next-line primer/box-shadow
|
|
98
|
+
box-shadow: var(--color-fg-subtle) 0 0 0 1px inset !important;
|
|
99
|
+
}
|
|
70
100
|
}
|
|
71
101
|
|
|
72
|
-
.btn-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
102
|
+
.btn-subtle-mktg {
|
|
103
|
+
color: var(--color-fg-default) !important;
|
|
104
|
+
background: none !important;
|
|
105
|
+
box-shadow: none !important;
|
|
106
|
+
|
|
107
|
+
&::before {
|
|
108
|
+
background: none !important;
|
|
109
|
+
}
|
|
110
|
+
|
|
111
|
+
&:hover {
|
|
112
|
+
box-shadow: var(--color-mktg-btn-shadow-hover-muted) !important;
|
|
113
|
+
}
|
|
114
|
+
|
|
115
|
+
&:focus,
|
|
116
|
+
.focus {
|
|
117
|
+
box-shadow: var(--color-mktg-btn-shadow-hover-muted), var(--color-mktg-btn-shadow-focus) !important;
|
|
118
|
+
}
|
|
82
119
|
}
|
|
83
120
|
|
|
84
|
-
.btn-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
121
|
+
.btn-signup-mktg {
|
|
122
|
+
// stylelint-disable-next-line primer/colors
|
|
123
|
+
color: #fff;
|
|
124
|
+
// stylelint-disable-next-line primer/colors
|
|
125
|
+
background: linear-gradient(180deg, rgba(52, 183, 89, 0.15) 0%, rgba(46, 164, 79, 0) 100%), rgb(46, 164, 79) !important;
|
|
126
|
+
|
|
127
|
+
&::before {
|
|
128
|
+
// stylelint-disable-next-line primer/colors
|
|
129
|
+
background: linear-gradient(180deg, rgba(52, 183, 89, 0.15) 0%, rgba(46, 164, 79, 0) 100%) !important;
|
|
130
|
+
}
|
|
131
|
+
|
|
132
|
+
&:focus {
|
|
133
|
+
// stylelint-disable-next-line primer/box-shadow
|
|
134
|
+
box-shadow: rgba(46, 164, 79, 0.45) 0 0 0 4px !important;
|
|
135
|
+
}
|
|
94
136
|
}
|
|
95
137
|
|
|
96
138
|
// Size modifiers
|
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
// support files
|
|
2
|
-
@import
|
|
3
|
-
@import
|
|
2
|
+
@import '../support/index.scss';
|
|
3
|
+
@import './button.scss';
|
|
@@ -1,3 +1,2 @@
|
|
|
1
|
-
@import
|
|
2
|
-
@import
|
|
3
|
-
@import "./variables.scss";
|
|
1
|
+
@import '../../support/index.scss';
|
|
2
|
+
@import './variables.scss';
|
|
@@ -1,6 +1,5 @@
|
|
|
1
|
-
// stylelint-disable unit-no-unknown
|
|
2
1
|
// Typography
|
|
3
|
-
$marketing-font-path:
|
|
2
|
+
$marketing-font-path: '/fonts/' !default;
|
|
4
3
|
|
|
5
4
|
$font-mktg: $body-font !default;
|
|
6
5
|
$font-weight-medium: 450 !default;
|
|
@@ -122,7 +121,7 @@ $transition-time: 0.4s !default;
|
|
|
122
121
|
$ease-mktg: cubic-bezier(0.16, 1, 0.3, 1) !default;
|
|
123
122
|
|
|
124
123
|
$marketing-position-variants: (
|
|
125
|
-
|
|
126
|
-
md:
|
|
127
|
-
lg:
|
|
124
|
+
'': '',
|
|
125
|
+
md: '-md',
|
|
126
|
+
lg: '-lg',
|
|
128
127
|
) !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
|
}
|
|
@@ -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,18 +1,21 @@
|
|
|
1
|
+
$nav-height: $spacer-3 * 3; // 48px
|
|
2
|
+
|
|
1
3
|
.UnderlineNav {
|
|
2
4
|
display: flex;
|
|
3
|
-
overflow-x: auto;
|
|
4
|
-
overflow-y: hidden;
|
|
5
5
|
// stylelint-disable-next-line primer/box-shadow
|
|
6
6
|
box-shadow: inset 0 -1px 0 var(--color-border-muted);
|
|
7
7
|
justify-content: space-between;
|
|
8
|
+
min-height: $nav-height;
|
|
8
9
|
}
|
|
9
10
|
|
|
10
11
|
.UnderlineNav-body {
|
|
11
12
|
display: flex;
|
|
13
|
+
align-items: center;
|
|
14
|
+
gap: $spacer-2;
|
|
12
15
|
}
|
|
13
16
|
|
|
14
17
|
.UnderlineNav-item {
|
|
15
|
-
padding: $spacer-2
|
|
18
|
+
padding: 0 $spacer-2;
|
|
16
19
|
font-size: $body-font-size;
|
|
17
20
|
// stylelint-disable-next-line primer/typography
|
|
18
21
|
line-height: 30px;
|
|
@@ -21,32 +24,63 @@
|
|
|
21
24
|
white-space: nowrap;
|
|
22
25
|
background-color: transparent;
|
|
23
26
|
border: 0;
|
|
24
|
-
|
|
25
|
-
|
|
27
|
+
border-radius: $border-radius;
|
|
28
|
+
position: relative;
|
|
26
29
|
|
|
27
|
-
|
|
28
|
-
|
|
30
|
+
// increase touch target area
|
|
31
|
+
&::before {
|
|
32
|
+
@include minTouchTarget($min-height: $nav-height);
|
|
33
|
+
}
|
|
34
|
+
|
|
35
|
+
&:hover {
|
|
29
36
|
color: var(--color-fg-default);
|
|
30
37
|
text-decoration: none;
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
outline-offset: -1px;
|
|
34
|
-
transition: border-bottom-color 0.12s ease-out;
|
|
38
|
+
background: var(--color-neutral-muted);
|
|
39
|
+
transition: background 0.12s ease-out;
|
|
35
40
|
}
|
|
36
41
|
|
|
37
42
|
&.selected,
|
|
38
|
-
&[role=tab][aria-selected=true],
|
|
39
|
-
&[aria-current]:not([aria-current=false]) {
|
|
43
|
+
&[role='tab'][aria-selected='true'],
|
|
44
|
+
&[aria-current]:not([aria-current='false']) {
|
|
40
45
|
font-weight: $font-weight-bold;
|
|
41
46
|
color: var(--color-fg-default);
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
47
|
+
|
|
48
|
+
// current/selected underline
|
|
49
|
+
&:after {
|
|
50
|
+
position: absolute;
|
|
51
|
+
width: 100%;
|
|
52
|
+
height: 2px;
|
|
53
|
+
content: '';
|
|
54
|
+
background: var(--color-primer-border-active);
|
|
55
|
+
border-radius: $border-radius;
|
|
56
|
+
right: 50%;
|
|
57
|
+
// 48px total height / 2 (24px) + 1px
|
|
58
|
+
bottom: calc(50% - 25px);
|
|
59
|
+
transform: translate(50%, -50%);
|
|
60
|
+
}
|
|
45
61
|
|
|
46
62
|
.UnderlineNav-octicon {
|
|
47
63
|
color: var(--color-fg-muted);
|
|
48
64
|
}
|
|
49
65
|
}
|
|
66
|
+
|
|
67
|
+
// remove when global focus state is merged
|
|
68
|
+
&.focus,
|
|
69
|
+
&:focus {
|
|
70
|
+
@include focusOutline;
|
|
71
|
+
outline-offset: 0;
|
|
72
|
+
}
|
|
73
|
+
|
|
74
|
+
.Counter {
|
|
75
|
+
margin-left: $spacer-2;
|
|
76
|
+
color: var(--color-fg-default);
|
|
77
|
+
background-color: var(--color-neutral-muted);
|
|
78
|
+
|
|
79
|
+
&--primary {
|
|
80
|
+
color: var(--color-fg-on-emphasis);
|
|
81
|
+
background-color: var(--color-neutral-emphasis);
|
|
82
|
+
}
|
|
83
|
+
}
|
|
50
84
|
}
|
|
51
85
|
|
|
52
86
|
.UnderlineNav--right {
|
|
@@ -63,24 +97,18 @@
|
|
|
63
97
|
|
|
64
98
|
.UnderlineNav--full {
|
|
65
99
|
display: block;
|
|
100
|
+
|
|
101
|
+
// required for underline to align with additional wrapper element
|
|
102
|
+
.UnderlineNav-body {
|
|
103
|
+
min-height: $nav-height;
|
|
104
|
+
}
|
|
66
105
|
}
|
|
67
106
|
|
|
68
107
|
.UnderlineNav-octicon {
|
|
69
|
-
margin-right: $spacer-
|
|
108
|
+
margin-right: $spacer-2;
|
|
70
109
|
color: var(--color-fg-subtle);
|
|
71
110
|
}
|
|
72
111
|
|
|
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
|
-
}
|
|
82
|
-
}
|
|
83
|
-
|
|
84
112
|
.UnderlineNav-container {
|
|
85
113
|
display: flex;
|
|
86
114
|
justify-content: space-between;
|
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-2021102434749",
|
|
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 src/**/*.scss",
|
|
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,19 +35,19 @@
|
|
|
35
35
|
"storybook": "cd docs && yarn && yarn storybook"
|
|
36
36
|
},
|
|
37
37
|
"dependencies": {
|
|
38
|
-
"@primer/primitives": "^
|
|
38
|
+
"@primer/primitives": "^7.1.0"
|
|
39
39
|
},
|
|
40
40
|
"devDependencies": {
|
|
41
41
|
"@changesets/changelog-github": "0.4.1",
|
|
42
|
-
"@changesets/cli": "2.
|
|
42
|
+
"@changesets/cli": "2.18.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.1",
|
|
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.2.
|
|
48
|
+
"eslint": "8.3.0",
|
|
49
|
+
"eslint-plugin-github": "4.3.5",
|
|
50
|
+
"eslint-plugin-jest": "25.2.4",
|
|
51
51
|
"eslint-plugin-prettier": "4.0.0",
|
|
52
52
|
"filesize": "8.0.6",
|
|
53
53
|
"front-matter": "4.0.2",
|
|
@@ -63,9 +63,9 @@
|
|
|
63
63
|
"postcss-simple-vars": "6.0.3",
|
|
64
64
|
"prettier": "2.4.1",
|
|
65
65
|
"semver": "7.3.5",
|
|
66
|
-
"stylelint": "14.0
|
|
66
|
+
"stylelint": "14.1.0",
|
|
67
67
|
"stylelint-scss": "4.0.0",
|
|
68
|
-
"table": "6.7.
|
|
68
|
+
"table": "6.7.3"
|
|
69
69
|
},
|
|
70
70
|
"jest": {
|
|
71
71
|
"testEnvironment": "node",
|
package/popover/popover.scss
CHANGED
|
@@ -8,6 +8,9 @@
|
|
|
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;
|
|
11
14
|
|
|
12
15
|
// Carets
|
|
13
16
|
&::before,
|
|
@@ -34,10 +37,13 @@
|
|
|
34
37
|
border: 7px $border-style transparent;
|
|
35
38
|
border-bottom-color: var(--color-canvas-overlay);
|
|
36
39
|
}
|
|
40
|
+
}
|
|
37
41
|
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
42
|
+
// No caret
|
|
43
|
+
.Popover-message--no-caret {
|
|
44
|
+
&::before,
|
|
45
|
+
&::after {
|
|
46
|
+
display: none;
|
|
41
47
|
}
|
|
42
48
|
}
|
|
43
49
|
|
|
@@ -182,8 +188,40 @@
|
|
|
182
188
|
}
|
|
183
189
|
|
|
184
190
|
.Popover-message--large {
|
|
185
|
-
|
|
186
191
|
@include breakpoint(sm) {
|
|
187
192
|
min-width: 320px;
|
|
188
193
|
}
|
|
189
194
|
}
|
|
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;
|
|
203
|
+
right: 0;
|
|
204
|
+
bottom: 0;
|
|
205
|
+
left: 0;
|
|
206
|
+
}
|
|
207
|
+
|
|
208
|
+
.Popover-message {
|
|
209
|
+
top: auto;
|
|
210
|
+
right: auto;
|
|
211
|
+
bottom: auto;
|
|
212
|
+
left: auto;
|
|
213
|
+
width: auto;
|
|
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
|
}
|