This repository has been archived by the owner on Feb 17, 2025. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 360
/
Copy path_reset.scss
119 lines (105 loc) · 2.28 KB
/
_reset.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
/**
* Reset specific elements to make them easier to style in other contexts.
*/
html,
body,
p,
ol,
ul,
li,
dl,
dt,
dd,
blockquote,
figure,
fieldset,
form,
legend,
textarea,
pre,
iframe,
hr,
h1,
h2,
h3,
h4,
h5,
h6 {
padding: 0;
margin: 0;
-moz-osx-font-smoothing: grayscale;
-webkit-font-smoothing: antialiased;
}
/**
* Apply generic border-box to all elements.
* See:
* https://css-tricks.com/inheriting-box-sizing-probably-slightly-better-best-practice/
*/
/**
* Apply border-box across the entire page.
*/
html {
box-sizing: border-box;
}
/**
* Relax the definition a bit, to allow components to override it manually.
*/
* {
&,
&::before,
&::after {
box-sizing: inherit;
}
}
// HTML resets
html {
// Set mobile font-size to one step lower for mobile
font-size: calc(var(--global--font-size-root) / var(--global--font-size-ratio)); /* #{$typescale-root / $typescale-ratio}; */
font-family: var(--global--font-secondary);
line-height: var(--global--line-height-body);
// Set mobile and ^ font-size to normal root
@include media(mobile) {
font-size: var(--global--font-size-root);
}
}
// body resets
body {
font-size: var(--global--font-size-base); /* #{$typescale-base}; */
font-weight: normal;
color: var(--global--color-foreground);
text-align: left;
background-color: var(--global--color-background);
}
// Links styles
a {
border-bottom: 1px solid var(--global--color-secondary);
color: var( --wp--style--color--link, var(--global--color-primary) );
text-decoration: none;
&:hover,
&:focus {
color: var(--global--color-primary-hover);
}
&:active {
color: var(--wp--style--color--link);
}
// Enforce the custom link color even if a custom background color has been set.
// The extra specificity here is required to override the background color styles.
p.has-background.has-link-color:not(.has-background-background-color) & {
color: var( --wp--style--color--link, var(--global--color-primary) );
}
// If a custom link color has been assigned,
// switch the color of the bottom border too.
.has-link-color & {
border-bottom: 1px solid var( --wp--style--color--link, var(--global--color-primary) );
}
}
// Focus styles
*:focus {
outline-width: 1px;
outline-style: dotted;
outline-color: var(--global--color-secondary);
}
button,
a {
cursor: pointer;
}