-
Notifications
You must be signed in to change notification settings - Fork 7
/
editor.scss
597 lines (468 loc) · 14 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
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
/*
Theme Name: Business
Description: Used to style Gutenberg Blocks in the editor.
*/
/*--------------------------------------------------------------
>>> TABLE OF CONTENTS:
----------------------------------------------------------------
1.0 General Typography
2.0 General Block Settings
3.0 Blocks - Common Blocks
4.0 Blocks - Formatting
5.0 Blocks - Layout Elements
6.0 Blocks - Widgets
--------------------------------------------------------------*/
@import "stylesheets/variables/index";
@import "stylesheets/inc/index";
$font-size-value: 18.672;
:root {}
@mixin alignleft {
margin-right: $x-space-md;
margin-bottom: $x-space-sm;
}
@mixin alignright {
margin-left: $x-space-md;
margin-bottom: $x-space-sm;
}
@mixin block-quote-citation-style() {
color: $x-color-words-subtle !important;
font-size: $x-font-size-sm;
font-family: $x-font-family-heading;
font-style: normal;
text-transform: none;
}
@mixin button-style() {
background-color: $x-color-accent-base;
text-transform: uppercase;
text-decoration: none;
font-weight: 600;
letter-spacing: $x-font-letter-spacing;
font-size: (15.56em / $font-size-value);
padding: 0.68em 1.2em;
border-radius: 3px;
&:hover {
background-color: lighten( $accent-color, 6% );
}
}
/*--------------------------------------------------------------
1.0 General Typography
--------------------------------------------------------------*/
/* Links */
.editor-rich-text__tinymce a {
color: $x-color-secondary-base;
}
/* font-family */
.edit-post-visual-editor .editor-block-list__block,
.editor-default-block-appender input[type="text"].editor-default-block-appender__content {
font-family: $x-font-family-body;
}
/* font size & line height */
.edit-post-visual-editor .editor-block-list__block,
.edit-post-visual-editor .editor-block-list__block p,
.editor-default-block-appender input[type="text"].editor-default-block-appender__content {
line-height: $x-font-leading-body;
font-size: $font-size-value * 1px;
font-weight: 400;
}
/* font color */
.edit-post-visual-editor .editor-block-list__block {
color: $x-color-words-base;
}
/* Post title fonts and colors */
.editor-post-title__block .editor-post-title__input {
font-family: $x-font-family-heading;
line-height: $x-font-leading-heading;
color: $x-color-words-heading;
font-size: 2.90386875em;
font-weight: 800;
}
/* Headings - applies to both Classic and Header blocks */
.edit-post-visual-editor h1,
.wp-block-freeform.block-library-rich-text__tinymce h1,
.edit-post-visual-editor h2,
.wp-block-freeform.block-library-rich-text__tinymce h2,
.edit-post-visual-editor h3,
.wp-block-freeform.block-library-rich-text__tinymce h3,
.edit-post-visual-editor h4,
.wp-block-freeform.block-library-rich-text__tinymce h4,
.edit-post-visual-editor h5,
.wp-block-freeform.block-library-rich-text__tinymce h5,
.edit-post-visual-editor h6,
.wp-block-freeform.block-library-rich-text__tinymce h6 {
color: $x-color-words-heading;
font-weight: 800;
}
.edit-post-visual-editor h1,
.wp-block-freeform.block-library-rich-text__tinymce h1 {
font-size: (38.7183em / $font-size-value );
}
.edit-post-visual-editor h2,
.wp-block-freeform.block-library-rich-text__tinymce h2 {
font-size: (32.2652em / $font-size-value );
}
.edit-post-visual-editor h3,
.wp-block-freeform.block-library-rich-text__tinymce h3 {
font-size: (26.8877em / $font-size-value);
}
.edit-post-visual-editor h4,
.wp-block-freeform.block-library-rich-text__tinymce h4 {
font-size: (22.4064em / $font-size-value );
}
.edit-post-visual-editor h5,
.wp-block-freeform.block-library-rich-text__tinymce h5 {
font-size: (15.498em / $font-size-value );
letter-spacing: 0.125em;
text-transform: uppercase;
}
.edit-post-visual-editor h6,
.wp-block-freeform.block-library-rich-text__tinymce h6 {
font-size: (12.5102em / $font-size-value );
letter-spacing: 0.125em;
text-transform: uppercase;
}
/*--------------------------------------------------------------
2.0 General Block Settings
--------------------------------------------------------------*/
/* Main content width */
.wp-block {
/* max-width: XXX -- content width plus 30px to account for editor padding */
max-width: 740px;
}
/* Link styles */
.edit-post-visual-editor a,
.editor-block-list__block a,
.wp-block-freeform.block-library-rich-text__tinymce a {}
/*
* General HTML selectors, used for the Classic Block
*/
/* Table styles */
.wp-block-freeform.block-library-rich-text__tinymce table {}
.rtl .wp-block-freeform.block-library-rich-text__tinymce td,
.rtl .wp-block-freeform.block-library-rich-text__tinymce th {}
/* Quote styles */
.wp-block-freeform.block-library-rich-text__tinymce blockquote {}
.wp-block-freeform.block-library-rich-text__tinymce blockquote p {}
.wp-block-freeform.block-library-rich-text__tinymce blockquote cite {}
.rtl .wp-block-freeform.block-library-rich-text__tinymce blockquote {}
/* List styles */
.wp-block-freeform.block-library-rich-text__tinymce li,
.editor-styles-wrapper li {
margin-bottom: 0;
}
.wp-block-freeform.block-library-rich-text__tinymce ol,
.wp-block-freeform.block-library-rich-text__tinymce ul,
.editor-styles-wrapper ol,
.editor-styles-wrapper ul {
&.editor-rich-text__tinymce {
padding-left: 0;
}
}
.block-library-list .editor-rich-text__tinymce,
.block-library-list .editor-rich-text__tinymce ol,
.block-library-list .editor-rich-text__tinymce ul {
padding-left: 0.1em;
}
.wp-block-freeform.block-library-rich-text__tinymce ol,
.editor-styles-wrapper ol:not([class^="wp-block"]) {
counter-reset: sans-counter;
margin-left: 0 !important;
> li {
position: relative;
counter-increment: sans-counter;
padding-left: $x-space-md;
list-style: none;
&:before {
content: counter(sans-counter, decimal-leading-zero) "\00a0";
left: 0;
position: absolute;
top: $x-space-xxs;
color: $x-color-primary-base;
font-family: $x-font-family-heading;
font-size: $x-font-size-xs;
line-height: $x-font-leading-md;
}
}
}
/* Code styles */
.wp-block-freeform.block-library-rich-text__tinymce code {}
/* Caption styles */
[class^="wp-block-"] figcaption {
color: $x-color-words-subtle;
font-size: $x-font-size-sm;
font-family: $x-font-family-heading;
}
.wp-block-gallery .blocks-gallery-image figcaption,
.wp-block-gallery .blocks-gallery-item figcaption {
color: $x-color-shade-white;
}
/* Definition List styles */
.wp-block-freeform.block-library-rich-text__tinymce dt {
font-weight: bold;
}
/* Pre styles */
.wp-block-freeform.block-library-rich-text__tinymce pre {}
/*--------------------------------------------------------------
3.0 Blocks - Common Blocks
--------------------------------------------------------------*/
/* Paragraph */
p.has-drop-cap:not(:focus)::first-letter {}
/* Quote */
.wp-block-quote {
border-left: solid 4px $x-color-accent-base !important;
padding-left: 1.7em !important;
padding-right: 2em !important;
p {
font-size: $x-font-size-base;
color: $x-color-secondary-base;
font-style: italic;
}
}
.wp-block-quote:not(.is-large):not(.is-style-large) {}
.wp-block-quote .wp-block-quote__citation {
@include block-quote-citation-style;
}
.wp-block-quote.is-large p,
.wp-block-quote.is-style-large p {
font-size: (26.89em/$font-size-value);
}
.wp-block-quote.is-large .wp-block-quote__citation,
.wp-block-quote.is-style-large .wp-block-quote__citation {
font-size: (20.61em/$font-size-value);
margin-top: -0.8em;
}
.rtl .editor-styles-wrapper .wp-block-quote,
.rtl .wp-block-quote:not(.is-large):not(.is-style-large) {}
/* Cover */
.wp-block-cover {}
.edit-post-visual-editor .editor-block-list__block .wp-block-cover-image .wp-block-cover-image-text,
.edit-post-visual-editor .editor-block-list__block .wp-block-cover-image .wp-block-cover-text,
.edit-post-visual-editor .editor-block-list__block .wp-block-cover-image h2,
.edit-post-visual-editor .editor-block-list__block .wp-block-cover .wp-block-cover-image-text,
.edit-post-visual-editor .editor-block-list__block .wp-block-cover .wp-block-cover-text,
.edit-post-visual-editor .editor-block-list__block .wp-block-cover h2 {
font-size: 2.0em; /* Cover images inherit the paragraph size; this resets it */
}
/* File */
.wp-block-file__textlink {
text-decoration: underline;
color: $x-color-secondary-base;
}
.wp-block-file .wp-block-file__button,
.wp-block-file .wp-block-file__button:visited {
@include button-style;
}
.wp-block-file .wp-block-file__button:hover,
.wp-block-file .wp-block-file__button:focus,
.wp-block-file .wp-block-file__button:active {}
/*--------------------------------------------------------------
4.0 Blocks - Formatting
--------------------------------------------------------------*/
.wp-block-verse pre {
padding: 0;
}
/* Code */
.wp-block-code {
background-color: $x-color-shade-gray-2;
border: none;
border-radius: 0;
.editor-plain-text {
color: $x-color-words-base;
padding: 0.5em 0.5em 0.2em;
}
}
.wp-block-code textarea {
background: transparent;
}
/* Verse */
.wp-block-verse {
font-family: $x-font-family-code;
background-color: $x-color-shade-gray-2;
padding: 1em 1em;
.editor-rich-text__tinymce {
color: $x-color-words-base;
font-size: (15.56em/$font-size-value);
line-height: 1.6 !important;
}
}
/* Preformatted */
.wp-block-preformatted {
background-color: $x-color-shade-gray-2;
padding: 1em 1em;
.editor-rich-text__tinymce {
color: $x-color-words-base;
}
}
/* Pullquote */
.wp-block-pullquote {
border: none;
margin-top: 0;
border-left: solid 4px $x-color-accent-base;
padding: 0;
text-align: left;
blockquote {
margin-top: 0;
}
}
.wp-block-pullquote blockquote > .block-library-pullquote__content .editor-rich-text__tinymce[data-is-empty=true]::before,
.wp-block-pullquote blockquote >.editor-rich-text p {
font-size: 22.4064em / $font-size-value;
color: $x-color-secondary-base;
font-style: italic;
margin-bottom: 0.45em;
padding-top: 0.2em;
line-height: 1.6
}
.wp-block-pullquote.alignleft blockquote > .block-library-pullquote__content .editor-rich-text__tinymce[data-is-empty="true"]::before,
.wp-block-pullquote.alignright blockquote > .block-library-pullquote__content .editor-rich-text__tinymce[data-is-empty="true"]::before,
.wp-block-pullquote.alignleft blockquote > .editor-rich-text p,
.wp-block-pullquote.alignright blockquote > .editor-rich-text p {
/* Font size */
margin-bottom: 0 !important;
}
.wp-block-pullquote cite,
.wp-block-pullquote footer,
.wp-block-pullquote__citation {
@include block-quote-citation-style;
}
/* Table */
.wp-block-table {
overflow-x: auto;
td,
th {
padding: .5em;
text-align: left;
border-color: transparent;
}
tr:nth-child(even) {
background-color: $x-color-shade-gray-2;
}
thead tr:nth-child(odd) {
background-color: $x-color-primary-bg;
}
}
.rtl .wp-block-table th {
text-align: right;
}
.wp-block-table__cell-content {
padding: 0; /* removes/adjusts padding in editor per cell */
}
/*--------------------------------------------------------------
5.0 Blocks - Layout Elements
--------------------------------------------------------------*/
/* Buttons */
.wp-block-button {
margin-bottom: 0;
}
.wp-block-button .wp-block-button__link {
@include button-style;
}
.wp-block-button.is-style-squared .wp-block-button__link {
border-radius: 0;
}
.wp-block-button.is-style-outline .wp-block-button__link {
background: transparent;
border: solid 2px $x-color-accent-base;
color: $x-color-accent-base;
&:hover {
background: $x-color-accent-base;
color: white;
}
}
.wp-block-button .wp-block-button__link:hover,
.wp-block-button .wp-block-button__link:focus,
.wp-block-button .wp-block-button__link:active {}
.wp-block-button .editor-rich-text__tinymce.mce-content-body {
/* Set a line-height here, if the button height changes when you edit it */
}
/* Separator */
.wp-block-separator {
margin-top: $x-space-md !important;
margin-bottom: $x-space-md !important;
padding: 0;
width: 100px;
background-color: $x-color-shade-gray-2;
border: 0;
height: 3px;
margin-bottom: 1.5em;
&.is-style-wide {
width: 100%;
}
&.is-style-dots {
background-color: $x-color-shade-white;
width: auto;
&:before {
content: "\00b7 \00b7 \00b7 \00b7 \00b7";
color: $x-color-shade-gray-4;
font-family: $body-font; /* family@include globalvar(font-family, body); */
font-size: $x-font-size-lg;
letter-spacing: 1em;
padding-left: 1em;
}
}
@include media( tablet ) {
&.is-style-dots {
max-width: $x-grid-column-6;
}
}
}
/*--------------------------------------------------------------
6.0 Blocks - Widgets
--------------------------------------------------------------*/
/* Latest Posts, Categories, Archives – Link Styles */
/* Latest Posts */
.wp-block-latest-posts,
.wp-block-categories,
.wp-block-archives {
li {
margin: 0.3em 0;
a {
color: $x-color-secondary-base;
}
}
[data-align="full"] &.is-grid {
padding-left: $x-space-sm;
padding-right: $x-space-sm;
}
}
/* Categories, Latest Posts & Archives */
[data-align="center"] .wp-block-categories ul,
[data-align="center"] ul.wp-block-latest-posts,
[data-align="center"] ul.wp-block-archives {
list-style-position: inside; /* makes sure bullets are centred with centred lists */
padding-left: 0;
}
/* Latest Comments */
.wp-block-latest-comments {
margin-left: 0;
margin-right: 0;
}
.wp-block-latest-comments.aligncenter.has-avatars {}
.wp-block-latest-comments.alignfull {}
.wp-block-latest-comments__comment-meta,
.wp-block-latest-comments__comment-excerpt p {
/* change font size */
}
.wp-block-latest-comments__comment-meta a {
color: $x-color-secondary-base;
font-size: $x-font-size-md;
text-decoration: underline;
}
.wp-block-latest-comments__comment-date {
/* change comment date styles */
}
.wp-block-latest-comments .wp-block-latest-comments__comment {
/* selector for each individual comment - good for borders, padding */
}
.edit-post-visual-editor .wp-block-latest-posts.is-grid {
list-style: none;
margin-left: 0;
margin-right: 0;
}
/* Left aligned block */
.editor-block-list__layout .editor-block-list__block[data-align=left] .editor-block-list__block-edit {
@include alignleft;
}
/* Right aligned block */
.editor-block-list__layout .editor-block-list__block[data-align=right] .editor-block-list__block-edit {
@include alignright;
}