This repository has been archived by the owner on Dec 2, 2020. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 117
/
_editor.scss
140 lines (116 loc) · 3.23 KB
/
_editor.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
/**
* Editor Post Title
* - Needs a special styles
*/
// Post title style
.wp-block.editor-post-title__block {
border-bottom: 3px solid var(--global--color-border);
padding-bottom: calc(2 * var(--global--spacing-vertical));
margin-bottom: calc(3 * var(--global--spacing-vertical));
max-width: var(--responsive--alignwide-width);
.editor-post-title__input {
color: var(--global--color-secondary);
font-family: var(--heading--font-family);
font-size: var(--global--font-size-page-title);
font-weight: var(--heading--font-weight-page-title);
line-height: var(--heading--line-height-h1);
}
}
// Editor UI font styles
.wp-block.block-editor-default-block-appender > textarea {
font-family: var(--global--font-secondary);
font-size: var(--global--font-size-md);
}
// Gutenberg text color options
.has-primary-color[class] {
color: var(--global--color-primary);
}
.has-secondary-color[class] {
color: var(--global--color-secondary);
}
// Gutenberg background-color options
.has-background {
&:not(.has-background-background-color) a:not(.wp-block-button__link),
p,
h1,
h2,
h3,
h4,
h5,
h6 {
color: currentColor;
}
}
.has-primary-background-color[class] {
background-color: var(--global--color-primary);
color: var(--global--color-background);
}
.has-secondary-background-color[class] {
background-color: var(--global--color-secondary);
color: var(--global--color-background);
}
.has-white-background-color[class] {
background-color: var(--global--color-white);
color: var(--global--color-secondary);
}
.has-black-background-color[class] {
background-color: var(--global--color-black);
color: var(--global--color-primary);
}
// Spacing Overrides
[data-block] {
margin-top: var(--global--spacing-vertical);
margin-bottom: var(--global--spacing-vertical);
}
// Block Alignments
.wp-block {
// Gutenberg injects a rule that limits the max width of .wp-block to 580px
// This line overrides it to use the responsive spacing rules for default width content
max-width: var(--responsive--aligndefault-width);
// Use the theme's max-width for wide alignment.
&[data-align="wide"],
&.alignwide {
max-width: var(--responsive--alignwide-width);
}
&[data-align="full"],
&.alignfull {
max-width: none;
}
}
.alignleft {
margin: 0;
margin-right: var(--global--spacing-horizontal);
}
.alignright {
margin: 0;
margin-left: var(--global--spacing-horizontal);
}
// Drop cap
.has-drop-cap:not(:focus)::first-letter {
font-family: var(--heading--font-family);
font-weight: var(--heading--font-weight);
line-height: 0.66;
text-transform: uppercase;
font-style: normal;
float: left;
margin: 0.1em 0.1em 0 0;
font-size: calc(1.2 * var(--heading--font-size-h1));
}
@media only screen and (min-width: 482px) {
.wp-block[data-align="left"] > * {
max-width: 290px;
margin-right: var(--global--spacing-horizontal);
}
.wp-block[data-align="right"] > * {
max-width: 290px;
margin-left: var(--global--spacing-horizontal);
}
}
// Remove the border of blockquotes inside the classic block.
.wp-block-freeform.block-library-rich-text__tinymce blockquote {
border: none;
}
// Adjust the position of the quote symbol for blockquotes inside the classic block.
.wp-block-freeform.block-library-rich-text__tinymce blockquote:before {
left: 5px;
}