Skip to content

Commit e34fe23

Browse files
committed
Bundled Themes: Expand initial block editor support.
A handful of items were missed when adding initial support for the new block editor to bundled themes in [43793]-[43800]. This adds support for those missed items. Props pento, davidakennedy, laurelfulford. Merges [43869], [43870], [43871], [43872], [43873], [43874], [43875], [43876] to trunk. Fixes #45238, #45239, #45240, #45242, #45243, #45244, #45245, #45246. git-svn-id: https://develop.svn.wordpress.org/trunk@44152 602fd350-edb4-49c9-b593-d223f7449a82
1 parent c474d19 commit e34fe23

16 files changed

Lines changed: 437 additions & 86 deletions

File tree

src/wp-content/themes/twentyeleven/blocks.css

Lines changed: 34 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -130,18 +130,21 @@ p.has-drop-cap:not(:focus)::first-letter {
130130
width: 100%;
131131
}
132132

133-
/* Cover Image */
133+
/* Cover */
134134

135-
.wp-block-cover-image.aligncenter {
135+
.wp-block-cover-image.aligncenter,
136+
.wp-block-cover.aligncenter {
136137
clear: both;
137138
display: flex;
138139
}
139140

140-
.wp-block-cover-image.alignleft {
141+
.wp-block-cover-image.alignleft,
142+
.wp-block-cover.alignleft {
141143
margin-right: 1.625em;
142144
}
143145

144-
.wp-block-cover-image.alignright {
146+
.wp-block-cover-image.alignright,
147+
.wp-block-cover.alignright {
145148
margin-left: 1.625em;
146149
}
147150

@@ -260,10 +263,37 @@ p.has-drop-cap:not(:focus)::first-letter {
260263
max-width: 100%;
261264
}
262265

266+
/* Media & Text */
267+
268+
.wp-block-media-text {
269+
margin-bottom: 1.625em;
270+
}
271+
272+
.wp-block-media-text *:last-child {
273+
margin-bottom: 0;
274+
}
275+
263276
/*--------------------------------------------------------------
264277
5.0 Blocks - Widgets
265278
--------------------------------------------------------------*/
266279

280+
/* Archives, Categories & Latest Posts */
281+
282+
.wp-block-archives.aligncenter,
283+
.wp-block-categories.aligncenter,
284+
.wp-block-latest-posts.aligncenter {
285+
list-style-position: inside;
286+
margin-left: 2.5em;
287+
text-align: center;
288+
}
289+
290+
.rtl .wp-block-archives.aligncenter,
291+
.rtl .wp-block-categories.aligncenter,
292+
.rtl .wp-block-latest-posts.aligncenter {
293+
margin-left: 0;
294+
margin-right: 2.5em;
295+
}
296+
267297
/* Latest Comments */
268298

269299
.wp-block-latest-comments {

src/wp-content/themes/twentyeleven/editor-blocks.css

Lines changed: 25 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -72,10 +72,12 @@ Description: Used to style Gutenberg Blocks in the editor.
7272

7373
/* Main column width */
7474

75-
body.gutenberg-editor-page .edit-post-visual-editor .editor-post-title__block,
76-
body.gutenberg-editor-page .edit-post-visual-editor .editor-default-block-appender,
77-
body.gutenberg-editor-page .edit-post-visual-editor .editor-block-list__block {
78-
max-width: 614px;
75+
.editor-styles-wrapper {
76+
max-width: 100% !important; /* Override where editor-style.css is affecting this. */
77+
}
78+
79+
.wp-block {
80+
max-width: 614px; /* 584px + 30px to account for padding */
7981
}
8082

8183
/* Link styles */
@@ -288,10 +290,10 @@ p.has-drop-cap:not(:focus)::first-letter {
288290
font-size: 16px;
289291
}
290292

293+
/* Cover */
291294

292-
/* Cover Image */
293-
294-
.edit-post-visual-editor .editor-block-list__block .wp-block-cover-image p.wp-block-cover-image-text {
295+
.edit-post-visual-editor .editor-block-list__block .wp-block-cover-image p.wp-block-cover-image-text,
296+
.edit-post-visual-editor .editor-block-list__block .wp-block-cover p.wp-block-cover-text {
295297
font-size: 30px;
296298
line-height: 37.5px;
297299
}
@@ -385,10 +387,26 @@ p.has-drop-cap:not(:focus)::first-letter {
385387
text-shadow: 0 -1px 0 rgba(0,0,0,0.3);
386388
}
387389

390+
/* Media & Text */
391+
392+
.wp-block-media-text *:last-child {
393+
margin-bottom: 0;
394+
}
395+
388396
/*--------------------------------------------------------------
389397
6.0 Blocks - Widgets
390398
--------------------------------------------------------------*/
391399

400+
/* Archives, Categories & Latest Posts */
401+
402+
[data-align="center"] .wp-block-archives ul,
403+
[data-align="center"] .wp-block-categories ul,
404+
[data-align="center"] .wp-block-latest-posts ul {
405+
list-style-position: inside;
406+
margin-left: 2.5em;
407+
text-align: center;
408+
}
409+
392410
/* Latest Comments */
393411

394412
.wp-block-latest-comments {

src/wp-content/themes/twentyfifteen/css/blocks.css

Lines changed: 40 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -59,6 +59,19 @@ Description: Used to style Gutenberg Blocks.
5959
}
6060
}
6161

62+
/* Alignments */
63+
64+
[class^="wp-block-"].alignleft,
65+
[class^="wp-block-"] .alignleft {
66+
margin-right: 1em;
67+
}
68+
69+
[class^="wp-block-"].alignright,
70+
[class^="wp-block-"] .alignright {
71+
margin-left: 1em;
72+
}
73+
74+
6275
/*--------------------------------------------------------------
6376
2.0 Blocks - Common Blocks
6477
--------------------------------------------------------------*/
@@ -82,10 +95,12 @@ p.has-drop-cap:not(:focus)::first-letter {
8295
width: 100%;
8396
}
8497

85-
/* Cover Image */
98+
/* Cover */
8699

87100
.wp-block-cover-image .wp-block-cover-image-text,
88-
.wp-block-cover-image h2 {
101+
.wp-block-cover .wp-block-cover-text,
102+
.wp-block-cover-image h2,
103+
.wp-block-cover h2 {
89104
font-size: 29px;
90105
line-height: 1.2069;
91106
}
@@ -187,8 +202,11 @@ p.has-drop-cap:not(:focus)::first-letter {
187202
/* Cover Image */
188203

189204
.wp-block-cover-image.aligncenter,
205+
.wp-block-cover.aligncenter,
190206
.wp-block-cover-image.alignleft,
191-
.wp-block-cover-image.alignright {
207+
.wp-block-cover.alignleft,
208+
.wp-block-cover-image.alignright,
209+
.wp-block-cover.alignright {
192210
display: flex;
193211
}
194212

@@ -439,10 +457,29 @@ p.has-drop-cap:not(:focus)::first-letter {
439457
max-width: 100%;
440458
}
441459

460+
/* Media & Text */
461+
462+
.wp-block-media-text {
463+
margin-bottom: 1.6em;
464+
}
465+
466+
.wp-block-media-text *:last-child {
467+
margin-bottom: 0;
468+
}
469+
442470
/*--------------------------------------------------------------
443471
5.0 Blocks - Widgets
444472
--------------------------------------------------------------*/
445473

474+
/* Archives, Categories & Latest Posts */
475+
476+
.wp-block-archives.aligncenter,
477+
.wp-block-categories.aligncenter,
478+
.wp-block-latest-posts.aligncenter {
479+
list-style-position: inside;
480+
text-align: center;
481+
}
482+
446483
/* Latest Comments */
447484

448485
.wp-block-latest-comments {

src/wp-content/themes/twentyfifteen/css/editor-blocks.css

Lines changed: 25 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -305,10 +305,12 @@ Description: Used to style Gutenberg Blocks in the editor.
305305

306306
/* Main column width */
307307

308-
body.gutenberg-editor-page .edit-post-visual-editor .editor-post-title__block,
309-
body.gutenberg-editor-page .edit-post-visual-editor .editor-default-block-appender,
310-
body.gutenberg-editor-page .edit-post-visual-editor .editor-block-list__block {
311-
max-width: 690px; /* 660px + 30px for the editor padding */
308+
.editor-styles-wrapper {
309+
max-width: 100% !important; /* Override where editor-style.css is affecting this. */
310+
}
311+
312+
.wp-block {
313+
max-width: 690px; /* 660px + 30px to account for padding. */
312314
}
313315

314316
/* Link styles */
@@ -556,15 +558,16 @@ p.has-drop-cap:not(:focus)::first-letter {
556558
}
557559
}
558560

559-
/* Cover Image */
561+
/* Cover */
560562

561563
.edit-post-visual-editor .editor-block-list__block .wp-block-cover-image p,
562-
.wp-block-cover-image h2 {
564+
.edit-post-visual-editor .editor-block-list__block .wp-block-cover p,
565+
.wp-block-cover-image h2,
566+
.wp-block-cover h2 {
563567
font-size: 29px;
564568
line-height: 1.2069;
565569
}
566570

567-
568571
/* File */
569572

570573
.wp-block-file .editor-rich-text__tinymce {
@@ -764,11 +767,26 @@ p.has-drop-cap:not(:focus)::first-letter {
764767
max-width: 100%;
765768
}
766769

770+
/* Media & Text */
771+
772+
.wp-block-media-text *:last-child {
773+
margin-bottom: 0;
774+
}
775+
767776

768777
/*--------------------------------------------------------------
769778
6.0 Blocks - Widgets
770779
--------------------------------------------------------------*/
771780

781+
/* Archives, Categories & Latest Posts */
782+
783+
[data-align="center"] .wp-block-archives ul,
784+
[data-align="center"] .wp-block-categories ul,
785+
[data-align="center"] .wp-block-latest-posts ul {
786+
list-style-position: inside;
787+
}
788+
789+
772790
/* Latest Comments */
773791

774792
.wp-block-latest-comments {

src/wp-content/themes/twentyfourteen/css/blocks.css

Lines changed: 14 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -127,13 +127,13 @@ p.has-drop-cap:not(:focus)::first-letter {
127127
width: 100%;
128128
}
129129

130-
/* Cover Image */
130+
/* Cover */
131131

132-
.wp-block-cover-image.aligncenter {
132+
.wp-block-cover-image.aligncenter,
133+
.wp-block-cover.aligncenter {
133134
display: flex;
134135
}
135136

136-
137137
/* File */
138138

139139
.wp-block-file .wp-block-file__button {
@@ -242,16 +242,6 @@ p.has-drop-cap:not(:focus)::first-letter {
242242
background-color: #55d737;
243243
}
244244

245-
/* Columns */
246-
247-
.wp-block-columns {
248-
margin: 0 -0.5em;
249-
}
250-
251-
.wp-block-column {
252-
margin: 0 0.5em;
253-
}
254-
255245
/* Separator */
256246

257247
.wp-block-separator {
@@ -263,6 +253,16 @@ p.has-drop-cap:not(:focus)::first-letter {
263253
max-width: 100%;
264254
}
265255

256+
/* Media & Text */
257+
258+
.wp-block-media-text {
259+
margin-bottom: 24px;
260+
}
261+
262+
.wp-block-media-text *:last-child {
263+
margin-bottom: 0;
264+
}
265+
266266
/*--------------------------------------------------------------
267267
5.0 Blocks - Widgets
268268
--------------------------------------------------------------*/
@@ -272,6 +272,7 @@ p.has-drop-cap:not(:focus)::first-letter {
272272
.wp-block-archives.aligncenter,
273273
.wp-block-categories.aligncenter,
274274
.wp-block-latest-posts.aligncenter {
275+
list-style-position: inside;
275276
margin-left: 20px;
276277
text-align: center;
277278
}

src/wp-content/themes/twentyfourteen/css/editor-blocks.css

Lines changed: 22 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -21,9 +21,14 @@ Description: Used to style Gutenberg Blocks in the editor.
2121
.edit-post-visual-editor .editor-block-list__block,
2222
.edit-post-visual-editor .editor-block-list__block p,
2323
.editor-default-block-appender input[type="text"].editor-default-block-appender__content {
24+
font-size: 16px;
2425
line-height: 1.5;
2526
}
2627

28+
.editor-default-block-appender input[type="text"].editor-default-block-appender__content {
29+
font-family: Lato, sans-serif;
30+
}
31+
2732
.edit-post-visual-editor .editor-block-list__block {
2833
color: #2b2b2b;
2934
}
@@ -68,10 +73,8 @@ Description: Used to style Gutenberg Blocks in the editor.
6873

6974
/* Main column width */
7075

71-
body.gutenberg-editor-page .edit-post-visual-editor .editor-post-title__block,
72-
body.gutenberg-editor-page .edit-post-visual-editor .editor-default-block-appender,
73-
body.gutenberg-editor-page .edit-post-visual-editor .editor-block-list__block {
74-
max-width: 504px; /* 474 + 30 for editor block padding */
76+
.wp-block {
77+
max-width: 504px; /* 474px + 30px to account for padding */
7578
}
7679

7780
/* Link styles */
@@ -307,9 +310,10 @@ p.has-drop-cap:not(:focus)::first-letter {
307310
}
308311
}
309312

310-
/* Cover Image */
313+
/* Cover */
311314

312-
.wp-block-cover-image.aligncenter {
315+
.wp-block-cover-image.aligncenter,
316+
.wp-block-cover.aligncenter {
313317
display: flex;
314318
}
315319

@@ -400,12 +404,24 @@ p.has-drop-cap:not(:focus)::first-letter {
400404
line-height: normal;
401405
}
402406

407+
/* Media & Text */
408+
409+
.wp-block-media-text *:last-child {
410+
margin-bottom: 0;
411+
}
412+
403413
/*--------------------------------------------------------------
404414
6.0 Blocks - Widgets
405415
--------------------------------------------------------------*/
406416

407417
/* Archives, Categories & Latest Posts */
408418

419+
[data-align="center"] .wp-block-archives ul,
420+
[data-align="center"] .wp-block-categories ul,
421+
[data-align="center"] .wp-block-categories ul {
422+
list-style-position: inside;
423+
}
424+
409425
.wp-block-archives li a,
410426
.wp-block-categories__list li a,
411427
.wp-block-latest-posts li a {

0 commit comments

Comments
 (0)