-
Notifications
You must be signed in to change notification settings - Fork 1.2k
/
Copy pathbase.scss
160 lines (135 loc) · 2.72 KB
/
base.scss
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
// stylelint-disable selector-max-type, selector-no-qualifying-type, primer/typography
* {
box-sizing: border-box;
}
input,
select,
textarea,
button {
font-family: inherit;
font-size: inherit;
line-height: inherit;
}
body {
font-family: $body-font;
font-size: var(--body-font-size, $body-font-size);
line-height: $body-line-height;
color: var(--fgColor-default, var(--color-fg-default));
background-color: var(--bgColor-default, var(--color-canvas-default));
}
a {
color: var(--fgColor-accent, var(--color-accent-fg));
text-decoration: none;
&:hover {
text-decoration: underline;
}
}
b,
strong {
font-weight: $font-weight-bold;
}
fieldset {
padding: 0;
margin: 0;
border: 0;
}
label {
font-weight: $font-weight-bold;
}
// Custom styling for HTML5 validation bubbles (WebKit only)
::placeholder {
color: var(--fgColor-muted, var(--color-fg-subtle));
opacity: 1; // override opacity in normalize.css
}
// Horizontal lines
//
// TODO-MDO: Remove `.rule` from everywhere and replace with `<hr>`s
hr,
.rule {
height: 0;
// stylelint-disable-next-line primer/spacing
margin: 15px 0;
overflow: hidden;
background: transparent;
border: 0;
border-bottom: $border-width $border-style var(--borderColor-muted, var(--color-border-muted));
@include clearfix();
}
//
// Remove most spacing between table cells.
//
table {
border-spacing: 0;
border-collapse: collapse;
}
td,
th {
padding: 0;
}
button {
cursor: pointer;
// Remove border radius added by Chrome macOS
border-radius: 0;
}
// increase the selector specificity for [hidden]
// so that it always overrides utility classes (.d-block, etc.)
[hidden][hidden] {
display: none !important;
}
details {
summary {
cursor: pointer;
}
&:not([open]) {
// Set details content hidden by default for browsers that don't do this
> *:not(summary) {
display: none;
}
}
}
// global focus styles
a,
button,
[role='button'],
input[type='radio'],
input[type='checkbox'] {
// fallback :focus state
&:focus {
@include focusOutline;
// remove fallback :focus if :focus-visible is supported
&:not(:focus-visible) {
outline: solid 1px transparent;
}
}
// default focus state
&:focus-visible {
@include focusOutline;
}
}
a:not([class]),
input[type='radio'],
input[type='checkbox'] {
&:focus,
&:focus-visible {
outline-offset: 0;
}
}
// for handling focus conditionally
.focus {
@include focusBoxShadowInset;
}
// Windows High Contrast mode
@media (forced-colors: active) {
*:focus,
*:focus-visible {
outline: solid 1px transparent;
}
input:not([type='radio'], [type='checkbox']),
textarea,
select {
&:focus,
&:focus-visible {
outline-offset: 2px;
}
}
}