-
Notifications
You must be signed in to change notification settings - Fork 4.3k
/
Copy pathstyle.scss
90 lines (77 loc) · 2.03 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
// This variable is repeated across Button, Buttons, and Buttons editor styles.
$blocks-block__margin: 0.5em;
.wp-block-buttons {
// This block has customizable padding, border-box makes that more predictable.
box-sizing: border-box;
&.is-vertical {
flex-direction: column;
> .wp-block-button {
&:last-child {
margin-bottom: 0;
}
}
}
// Increased specificity to override blocks default margin.
> .wp-block-button {
display: inline-block;
margin: 0;
}
&.is-content-justification-left {
justify-content: flex-start;
&.is-vertical {
align-items: flex-start;
}
}
&.is-content-justification-center {
justify-content: center;
&.is-vertical {
align-items: center;
}
}
&.is-content-justification-right {
justify-content: flex-end;
&.is-vertical {
align-items: flex-end;
}
}
&.is-content-justification-space-between {
justify-content: space-between;
}
// Kept for backward compatibility.
&.aligncenter {
text-align: center;
}
// 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.
/* stylelint-disable @stylistic/indentation -- Disable the stylelint rule, otherwise this selector is ugly! */
&:not(
.is-content-justification-space-between,
.is-content-justification-right,
.is-content-justification-left,
.is-content-justification-center
) .wp-block-button.aligncenter {
/* stylelint-enable @stylistic/indentation */
margin-left: auto;
margin-right: auto;
width: 100%;
}
&[style*="text-decoration"] {
.wp-block-button,
.wp-block-button__link {
text-decoration: inherit;
}
}
&.has-custom-font-size {
.wp-block-button__link {
font-size: inherit;
}
}
}
// Legacy buttons that did not come in a wrapping container.
.wp-block-button.aligncenter {
text-align: center;
}