-
Notifications
You must be signed in to change notification settings - Fork 4.2k
/
reset.scss
128 lines (113 loc) · 2.41 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
120
121
122
123
124
125
126
127
128
/**
* Editor Normalization Styles
*
* These are only output in the editor, but styles here are prefixed .editor-styles-wrapper and affect the theming
* of the editor by themes.
*/
// We use :where to keep specificity minimal.
// https://css-tricks.com/almanac/selectors/w/where/
:where(.editor-styles-wrapper) {
/**
* The following styles revert to the browser defaults overriding the WPAdmin styles.
* This is only needed while the block editor is not being loaded in an iframe.
*/
font-family: serif; // unfortunately initial doesn't work for font-family.
font-size: initial;
line-height: initial;
color: initial;
// Many themes with white backgrounds load editor styles but fail to also provide
// an explicit white background color, assuming a white editing canvas.
// So to match browser defaults, we provide a white default here as well.
background: #fff;
.wp-align-wrapper {
max-width: $content-width;
> .wp-block,
&.wp-align-full {
max-width: none;
}
&.wp-align-wide {
max-width: $content-width;
}
}
a {
// This inherits the blue link color set by wp-admin, which is unfortunate.
// However both inherit and unset properties set the color to black.
transition: none;
}
code,
kbd {
padding: 0;
margin: 0;
background: inherit;
font-size: inherit;
font-family: monospace;
}
p {
font-size: revert;
line-height: revert;
margin: revert;
}
ul,
ol {
margin: revert;
padding: revert;
list-style-type: revert;
box-sizing: border-box;
// Remove bottom margin from nested lists.
ul,
ol {
margin: revert;
}
li {
margin: revert;
}
}
ul ul,
ol ul {
list-style-type: revert;
}
h1,
h2,
h3,
h4,
h5,
h6 {
font-size: revert;
margin: revert;
color: revert;
line-height: revert;
font-weight: revert;
}
select {
font-family: system-ui;
-webkit-appearance: revert;
color: revert;
border: revert;
border-radius: revert;
background: revert;
box-shadow: revert;
text-shadow: revert;
outline: revert;
cursor: revert;
transform: revert;
font-size: revert;
line-height: revert;
padding: revert;
margin: revert;
min-height: revert;
max-width: revert;
vertical-align: revert;
font-weight: revert;
}
select:disabled,
select:focus {
color: revert;
border-color: revert;
background-color: revert;
background-image: revert;
box-shadow: revert;
text-shadow: revert;
cursor: revert;
transform: revert;
}
}