-
Notifications
You must be signed in to change notification settings - Fork 4k
/
editor.scss
66 lines (59 loc) · 1.78 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
// This variable is repeated across Button, Buttons, and Buttons editor styles.
$blocks-block__margin: 0.5em;
.wp-block-buttons {
// Override editor auto block margins for button as well as the block appender.
> .wp-block {
margin: 0;
}
// Specificity needed in some themes to override editor auto block margins for the button.
> .wp-block-button.wp-block-button.wp-block-button.wp-block-button.wp-block-button {
margin: 0;
}
> .block-list-appender {
display: inline-flex;
align-items: center;
}
&.is-vertical {
> .block-list-appender .block-list-appender__toggle {
justify-content: flex-start;
}
}
> .wp-block-button {
&:focus {
box-shadow: none;
}
}
// Back compat: Inner button blocks previously had their own alignment
// options. Forcing them to 100% width in the flex container replicates
// that these were block level elements that took up the full width.
//
// This back compat rule is ignored if the user decides to use the
// newer justification options on the button block, hence the :not.
//
// Disable the stylelint rule, otherwise this selector is ugly!
/* stylelint-disable indentation */
&:not(
.is-content-justification-space-between,
.is-content-justification-right,
.is-content-justification-left,
.is-content-justification-center
) .wp-block[data-align="center"] {
/* stylelint-enable indentation */
margin-left: auto;
margin-right: auto;
margin-top: 0;
width: 100%;
.wp-block-button {
// Some margin hacks are needed, since margin doesn't seem to
// collapse in the same way when a parent layout it flex.
margin-bottom: 0;
}
}
}
.wp-block[data-align="center"] > .wp-block-buttons {
align-items: center;
justify-content: center;
}
.wp-block[data-align="right"] > .wp-block-buttons {
justify-content: flex-end;
}