/
style.scss
963 lines (797 loc) · 21.9 KB
/
style.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
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
.editor-block-list__layout .components-draggable__clone {
& > .editor-block-list__block > .editor-block-list__block-draggable {
background: $white; // @todo: ensure this works with themes that invert the color
box-shadow: $shadow-popover;
@include break-small {
left: -$block-parent-side-ui-clearance - $border-width;
right: -$block-parent-side-ui-clearance - $border-width;
.editor-block-list__layout & {
left: -$border-width;
right: -$border-width;
}
}
}
// Hide the Block UI when dragging the block
// This ensures the page scroll properly (no sticky elements)
.editor-block-contextual-toolbar,
.editor-block-mover,
.editor-block-settings-menu {
// I think important is fine here to avoid over complexing the selector
display: none !important;
}
}
.editor-block-list__layout .editor-block-list__block-draggable {
position: absolute;
top: 0;
right: 0;
bottom: 0;
left: 0;
z-index: z-index( '.editor-block-list__block-draggable' );
> .editor-block-list__block-draggable-inner {
position: absolute;
top: 0;
right: 0;
bottom: 0;
left: 0;
visibility: hidden;
// use opacity to work in various editor styles
background-color: $dark-opacity-light-200;
.is-dark-theme & {
background-color: $light-opacity-light-200;
}
@include break-small {
margin: 0 48px;
}
}
&.is-visible > .editor-block-list__block-draggable-inner {
visibility: visible;
}
@include break-small {
// use a wider available space for hovering/selecting/dragging on top level blocks
left: -$parent-block-padding - $block-padding;
right: -$parent-block-padding - $block-padding;
// use smaller space for hovering/selecting/dragging on child blocks
.editor-block-list__layout & {
left: 0;
right: 0;
}
// Full width blocks don't have the place to expand on the side
.editor-block-list__block[data-align="full"] & {
left: 0;
right: 0;
}
}
cursor: move; // Fallback for IE/Edge < 14
cursor: grab;
}
// Allow Drag & Drop when clicking on the empty area of the mover and the settings menu
.editor-block-list__layout .editor-block-list__block .editor-block-mover,
.editor-block-list__layout .editor-block-list__block .editor-block-settings-menu {
pointer-events: none;
// Nested blocks don't have any side affordance for drag and drop
.editor-block-list__layout &,
> * {
pointer-events: auto;
}
}
.editor-block-list__block {
&.is-hidden *,
&.is-hidden > * {
visibility: hidden;
}
.editor-block-list__block-edit .shared-block-edit-panel * {
z-index: z-index( '.editor-block-list__block-edit .shared-block-edit-panel *' );
}
}
.editor-block-list__layout {
// Make room in the main content column for the side UI.
// The side UI uses negative margins to position itself so as to not affect the block width.
@include break-small() {
padding-left: $block-container-side-padding;
padding-right: $block-container-side-padding;
}
// Don't add side padding for nested blocks, and compensate for block padding
.editor-block-list__block & {
// Compensate for side UI.
padding-left: 0;
padding-right: 0;
// Compensate for block padding horizontally.
margin-left: -$block-padding;
margin-right: -$block-padding;
// Compensate for block padding and collapsing margins vertically.
margin-top: -$block-padding + $border-width;
margin-bottom: -$block-padding + $border-width;
}
}
/**
* General layout
*/
.editor-block-list__layout .editor-block-list__block {
position: relative;
padding-left: $block-padding;
padding-right: $block-padding;
// Break long strings of text without spaces so they don't overflow the block.
overflow-wrap: break-word;
@include break-small() {
// The block mover needs to stay inside the block to allow clicks when hovering the block
padding-left: $block-padding + $block-side-ui-padding - $border-width;
padding-right: $block-padding + $block-side-ui-padding - $border-width;
}
// Prevent collapsing margins @todo try and revisit this, it's conducive to theming to allow these to collapse
padding-top: 1px;
padding-bottom: 1px;
// Space every block using margins instead of padding
// This allows margins to collapse, which gives a better representation of how it looks on the frontend
.editor-block-list__block-edit {
margin-top: $block-padding;
margin-bottom: $block-padding;
// Prevent collapsing margins @todo try and revisit this, it's conducive to theming to allow these to collapse
padding-top: 1px;
padding-bottom: 1px;
}
margin-bottom: $block-spacing;
/**
* Notices
*/
.components-placeholder .components-with-notices-ui {
margin: -10px 20px 12px 20px;
width: calc( 100% - 40px );
}
.components-with-notices-ui {
margin: 0 0 12px 0;
width: 100%;
.notice {
margin-left: 0px;
margin-right: 0px;
p {
font-size: $default-font-size;
}
}
}
/**
* Warnings
*/
&.has-warning .editor-block-list__block-edit {
position: relative;
min-height: 250px;
max-height: 500px;
overflow: hidden;
> :not( .editor-warning ) {
pointer-events: none;
user-select: none;
}
}
&.has-warning .editor-block-list__block-edit:after {
content: '';
position: absolute;
top: 0;
right: 0;
bottom: 0;
left: 0;
background-color: rgba( $white, 0.6 );
background-image: linear-gradient( to bottom, transparent, $white );
}
/**
* Block outline layout
*/
.editor-block-list__block-edit {
position: relative;
&:before {
z-index: z-index( '.editor-block-list__block-edit:before' );
content: '';
position: absolute;
outline: $border-width solid transparent;
transition: outline .1s linear;
pointer-events: none;
top: -$block-padding;
bottom: -$block-padding;
right: -$block-padding;
left: -$block-padding;
// Show wider padding for top level blocks.
@include break-small() {
right: -$parent-block-padding;
left: -$parent-block-padding;
}
}
// Show smaller padding for child blocks.
.editor-block-list__block-edit:before {
right: -$block-padding;
left: -$block-padding;
top: -$block-padding;
bottom: -$block-padding;
}
}
// Selected style
&.is-selected > .editor-block-list__block-edit:before {
// use opacity to work in various editor styles
outline: $border-width solid $dark-opacity-light-500;
top: -$block-padding;
bottom: -$block-padding;
.is-dark-theme & {
outline-color: $light-opacity-light-500;
}
}
// Hover style
&.is-hovered > .editor-block-list__block-edit:before {
outline: $border-width solid theme( outlines );
}
}
/**
* Cross-block selection
*/
.editor-block-list__layout .editor-block-list__block {
::-moz-selection {
background-color: $blue-medium-highlight;
}
::selection {
background-color: $blue-medium-highlight;
}
// selection style for multiple blocks
&.is-multi-selected *::selection {
background-color: transparent;
}
&.is-multi-selected .editor-block-list__block-edit:before {
background: $blue-medium-highlight;
// use opacity to work in various editor styles
mix-blend-mode: multiply;
// Collapse extra vertical padding on selection
top: -$block-padding;
bottom: -$block-padding;
.is-dark-theme & {
mix-blend-mode: soft-light;
}
}
}
/**
* Block styles and alignments
*/
.editor-block-list__layout .editor-block-list__block {
// Warnings
&.has-warning .editor-block-list__block-edit {
position: relative;
min-height: 250px;
max-height: 500px;
overflow: hidden;
> :not( .editor-warning ) {
pointer-events: none;
user-select: none;
}
}
&.has-warning .editor-block-list__block-edit:after {
content: '';
position: absolute;
top: 0;
right: 0;
bottom: 0;
left: 0;
background-color: rgba( $white, 0.6 );
background-image: linear-gradient( to bottom, transparent, $white );
}
// Appender
&.is-typing .editor-block-list__empty-block-inserter,
&.is-typing .editor-block-list__side-inserter {
opacity: 0;
}
.editor-block-list__empty-block-inserter,
.editor-block-list__side-inserter {
opacity: 1;
transition: opacity 0.2s;
}
// Shared blocks
&.is-shared > .editor-block-list__block-edit:before {
// use opacity to work in various editor styles
outline: $border-width dashed $dark-opacity-light-500;
.is-dark-theme & {
outline-color: $light-opacity-light-500;
}
}
// Alignments
&[data-align="left"],
&[data-align="right"] {
// Without z-index, won't be clickable as "above" adjacent content.
z-index: z-index( '.editor-block-list__block {core/image aligned left or right}' );
width: 100%;
// When images are floated, the block itself should collapse to zero height.
margin-bottom: 0;
height: 0;
// Hide block outline when an image is floated.
.editor-block-list__block-edit {
&:before {
content: none;
}
}
// The padding collapses, but the outline is still 1px to compensate for.
.editor-block-contextual-toolbar {
margin-bottom: 1px;
}
}
// Left
&[data-align="left"] {
.editor-block-list__block-edit { // This is in the editor only, on the frontend, the img should be floated
float: left;
margin-right: 2em;
}
}
// Right
&[data-align="right"] {
.editor-block-list__block-edit { // This is in the editor only, on the frontend, the img should be floated
float: right;
margin-left: 2em;
}
.editor-block-toolbar {
float: right;
}
}
// Wide and full-wide
&[data-align="full"],
&[data-align="wide"] {
clear: both;
// Without z-index, the block toolbar will be below an adjecent float
z-index: z-index( '.editor-block-list__block {core/image aligned wide or fullwide}' );
// Mover and settings above
> .editor-block-mover,
> .editor-block-settings-menu {
top: -$block-side-ui-width - $border-width; // This moves the menu up by the height of the button + border.
bottom: auto;
min-height: 0;
height: auto;
width: auto;
z-index: inherit;
&:before {
content: none;
}
}
> .editor-block-mover {
left: 10px;
}
> .editor-block-settings-menu {
right: 10px;
width: $block-side-ui-width * 2;
flex-direction: row;
}
> .editor-block-mover .editor-block-mover__control,
> .editor-block-settings-menu > * {
float: left;
}
// There is no side UI clearance on fullwide elements, so they are simply not draggable on the sides
> .editor-block-list__block-draggable {
left: 0;
right: 0;
}
// Position hover label on the right
> .editor-block-list__breadcrumb {
right: -$border-width;
}
// Hide mover until wide breakpoints, or it might be covered by toolbar
> .editor-block-mover {
display: none;
}
@include break-wide() {
> .editor-block-mover {
display: block;
}
}
}
// Wide
&[data-align="wide"] {
// Position hover label on the right
> .editor-block-list__breadcrumb {
right: -$block-padding;
}
}
// Full-wide
&[data-align="full"] {
// Position hover label on the right
> .editor-block-list__breadcrumb {
right: -$border-width;
}
// Compensate for main container padding and subtract border.
@include break-small() {
margin-left: -$block-side-ui-width - $block-padding - $block-side-ui-clearance - $border-width;
margin-right: -$block-side-ui-width - $block-padding - $block-side-ui-clearance - $border-width;
}
> .editor-block-list__block-edit {
margin-left: -$block-padding;
margin-right: -$block-padding;
@include break-small() {
margin-left: -$block-side-ui-padding - $block-padding;
margin-right: -$block-side-ui-padding - $block-padding;
}
// This explicitly sets the width of the block, to override the fit-content from the image block.
figure {
width: 100%;
}
}
> .editor-block-list__block-edit:before {
left: 0;
right: 0;
border-left-width: 0;
border-right-width: 0;
}
}
// Clear floats
&[data-clear="true"] {
float: none;
}
// Dropzones
.editor-block-drop-zone {
top: -4px;
bottom: -3px;
margin: 0 $block-padding;
}
// Hide appender shortcuts in nested blocks
// This essentially duplicates the mobile styles for the appender component
// It would be nice to be able to use element queries in that component instead https://github.com/tomhodgins/element-queries-spec
.editor-block-list__layout {
.editor-inserter-with-shortcuts {
display: none;
}
.editor-block-list__empty-block-inserter,
.editor-default-block-appender .editor-inserter {
left: auto;
right: $item-spacing;
}
}
}
/**
* Left and right side UI
*/
.editor-block-list__block {
// Left and right
> .editor-block-settings-menu,
> .editor-block-mover {
position: absolute;
top: 0;
width: $block-side-ui-width + $block-side-ui-clearance;
height: 100%; // stretch to fill half of the available space to increase hoverable area
max-height: $block-side-ui-width * 4; // stretch to fill half of the available space to increase hoverable area
}
// Elevate when selected or hovered
@include break-small() {
&.is-multi-selected,
&.is-selected,
&.is-hovered {
.editor-block-settings-menu,
.editor-block-mover {
z-index: z-index( '.editor-block-list__block.is-{selected,hovered} .editor-block-{settings-menu,mover}' );
}
}
}
// Right side UI
> .editor-block-settings-menu {
padding-left: $block-side-ui-clearance;
// Position for top level blocks
right: -$block-side-ui-width - $block-side-ui-clearance - $block-parent-side-ui-clearance;
// Position for nested blocks
.editor-block-list__block & {
right: -$block-side-ui-width - $block-side-ui-clearance;
}
// Mobile
display: none;
@include break-small() {
display: flex;
flex-direction: column;
}
}
// Left side UI
> .editor-block-mover {
padding-right: $block-side-ui-clearance;
// Position for top level blocks
left: -$block-side-ui-width - $block-side-ui-clearance - $block-parent-side-ui-clearance;
// Position for nested blocks
.editor-block-list__block & {
left: -$block-side-ui-width - $block-side-ui-clearance;
}
// Mobile
display: none;
@include break-small() {
display: block;
}
}
}
/**
* Mobile unified toolbar.
*/
.editor-block-list__block {
// Show side UI inline below the block on mobile.
.editor-block-list__block-mobile-toolbar {
display: flex;
flex-direction: row;
margin-top: $item-spacing + $block-toolbar-height; // Make room for the height of the block toolbar above.
margin-right: -$block-padding;
margin-bottom: -$block-padding - $border-width;
margin-left: -$block-padding;
border-top: $border-width solid $light-gray-500;
@include break-small() {
display: none;
}
// Show a shadow below the selected block to imply separation.
box-shadow: $shadow-below-only;
@include break-mobile() {
box-shadow: none;
}
// Movers, inserter, trash, and ellipsis.
.editor-inserter {
position: relative;
left: auto;
top: auto;
margin: 0;
}
.editor-inserter__toggle,
.editor-block-mover__control,
.editor-block-settings-menu .components-button {
width: $icon-button-size;
height: $icon-button-size;
border-radius: $button-style__radius-roundrect;
padding: 3px;
margin: 0;
justify-content: center;
align-items: center;
.dashicon {
margin: auto;
}
}
// Movers
.editor-block-mover {
display: flex;
margin-right: auto;
.editor-inserter,
.editor-block-mover__control {
float: left;
}
}
// Block Settings
.editor-block-settings-menu > * {
float: left;
}
}
// sth
&[data-align="full"] .editor-block-list__block-mobile-toolbar {
margin-left: 0;
margin-right: 0;
}
}
/**
* In-Canvas Inserter
*/
.editor-block-list .editor-inserter {
margin: $item-spacing;
cursor: move;/* Fallback for IE/Edge < 14 */
cursor: grab;
}
// Insertion point (includes inbetween inserter and insertion indicator)
.editor-block-list__insertion-point {
position: relative;
z-index: z-index( '.editor-block-list__insertion-point' );
}
.editor-block-list__insertion-point-indicator {
position: absolute;
top: calc( 50% - $border-width );
height: 2px;
left: 0;
right: 0;
background: theme( primary );
}
.editor-block-list__insertion-point-inserter {
// Don't show on mobile.
display: none;
@include break-mobile() {
display: flex;
}
position: absolute;
top: 0;
bottom: auto;
left: 0;
right: 0;
height: $block-padding * 2; // Matches the whole empty space between two blocks
justify-content: center;
// Show a clickable plus.
.editor-block-list__insertion-point-button {
margin-top: -4px;
border-radius: 50%;
color: $blue-medium-focus;
background: $white;
height: $block-padding * 2 + 8px;
width: $block-padding * 2 + 8px;
&:not(:disabled):not([aria-disabled="true"]):hover {
box-shadow: none;
}
}
// Hide both the button until hovered.
opacity: 0;
transition: opacity 0.1s linear 0.1s;
&:hover,
&.is-visible {
opacity: 1;
}
}
// Don't show the sibling inserter before the selected block.
.edit-post-layout:not( .has-fixed-toolbar ) {
// The child selector is necessary for this to work properly in nested contexts.
.is-selected > .editor-block-list__insertion-point > .editor-block-list__insertion-point-inserter {
opacity: 0;
pointer-events: none;
&.is-visible {
opacity: 1;
pointer-events: auto;
}
}
}
.editor-block-list__block {
> .editor-block-list__insertion-point {
position: absolute;
top: -$block-padding - $block-spacing / 2;
height: $block-padding * 2; // Matches the whole empty space between two blocks
bottom: auto;
left: -$border-width;
right: -$border-width;
}
&[data-align="full"] > .editor-block-list__insertion-point {
left: 0;
right: 0;
}
}
.editor-block-list__block .editor-block-list__block-html-textarea {
display: block;
margin: 0;
width: 100%;
border: none;
outline: none;
box-shadow: none;
resize: none;
overflow: hidden;
font-family: $editor-html-font;
font-size: $text-editor-font-size;
line-height: 150%;
transition: padding .2s linear;
&:focus {
box-shadow: none;
}
}
/**
* Block Toolbar
*/
.editor-block-list__block .editor-block-contextual-toolbar {
position: sticky;
z-index: z-index( '.editor-block-contextual-toolbar' );
white-space: nowrap;
text-align: left;
pointer-events: none;
height: $block-toolbar-height;
// Position toolbar below the block on mobile.
position: absolute;
bottom: $block-toolbar-height;
left: $block-padding;
right: $block-padding;
@include break-small() {
top: -$border-width;
}
// Position the contextual toolbar above the block.
@include break-mobile() {
position: relative;
top: auto;
bottom: auto;
left: auto;
right: auto;
margin-top: -$block-toolbar-height - $border-width;
margin-bottom: $block-padding + $border-width;
// IE11 does not support `position: sticky`.
@supports (position: sticky) {
position: sticky;
// Avoid appearance of double border when toolbar sticks at the top of the editor.
top: -$border-width;
}
}
// Floated items have special needs for the contextual toolbar position.
.editor-block-list__block[data-align="left"] &,
.editor-block-list__block[data-align="right"] & {
margin-bottom: $border-width;
margin-top: -$block-toolbar-height - $border-width;
}
// Make block toolbar full width on mobile.
margin-left: -$block-padding - $border-width;
margin-right: -$block-padding - $border-width;
@include break-small() {
margin-left: -$parent-block-padding - $block-side-ui-width - $border-width;
margin-right: -$parent-block-padding - $block-side-ui-width - $border-width;
// Position toolbar for nested contexts.
.editor-block-list__block & {
margin-left: -$block-padding - $block-side-ui-width - $border-width;
margin-right: -$block-padding - $block-side-ui-padding - $border-width;
}
// Except for wide elements, this causes a horizontal scrollbar.
[data-align="full"] & {
margin-left: -$block-padding - $block-side-ui-width;
margin-right: -$block-padding - $block-side-ui-width;
}
}
// Reset pointer-events on children.
& > * {
pointer-events: auto;
}
}
.editor-block-contextual-toolbar .editor-block-toolbar {
width: 100%;
background: $white;
border: $border-width solid $light-gray-500;
// Hide right border on desktop, where the .components-toolbar instead has a right border.
@include break-small() {
border-right: none;
}
// This prevents floats from messing up the position.
position: absolute;
left: 0;
.editor-block-list__block[data-align="right"] & {
left: auto;
right: 0;
}
@include break-small() {
width: auto;
}
}
/**
* Hover label
*/
.editor-block-list__breadcrumb {
position: absolute;
line-height: 1;
z-index: z-index( '.editor-block-list__breadcrumb' );
// Position in the top right of the border
right: -$block-side-ui-clearance;
@include break-small() {
right: -$block-parent-side-ui-clearance;
}
top: 0;
// Nested
.editor-block-list__block-edit & {
right: $parent-block-padding - $block-padding - $block-parent-side-ui-clearance;
}
.components-toolbar {
padding: 0;
border: none;
background: transparent;
line-height: 1;
font-family: $default-font;
font-size: 11px;
padding: 4px 4px;
background: theme( outlines );
color: $white;
// Animate in
.editor-block-list__block:hover & {
@include fade_in( .1s );
}
}
}
.editor-block-list__descendant-arrow:before {
content: '→';
display: inline-block;
padding: 0 4px;
.rtl & {
content: '←';
}
}
.editor-block-list__block {
@include break-small {
// Increase the hover and selection area around blocks.
// This makes the blue hover line and the settings button appear even if
// the mouse cursor is technically outside the block.
// This improves usability by making it possible to click somewhat outside
// the block and select it. (eg. A fuzzy click target.)
&:before {
bottom: 0;
content: '';
left: -$parent-block-padding - $block-padding;
position: absolute;
right: -$parent-block-padding - $block-padding;
top: 0;
}
// Remove the fuzzy click area effect set above on nested blocks.
// It should only applies to top-level blocks; applying this rule to
// nested blocks will result in difficult-to-use and possibly overlapping
// click targets.
& &:before {
left: 0;
right: 0;
}
}
}