-
Notifications
You must be signed in to change notification settings - Fork 4k
/
editor.scss
117 lines (98 loc) · 2.48 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
.wp-block[data-align="center"] > .wp-block-button {
text-align: center;
margin-left: auto;
margin-right: auto;
}
.wp-block[data-align="right"] > .wp-block-button {
/*!rtl:ignore*/
text-align: right;
}
.wp-block-button {
position: relative;
cursor: text;
// Add outline to button on focus to indicate focus-state
&:focus {
box-shadow: 0 0 0 1px $white, 0 0 0 3px var(--wp-admin-theme-color);
// Windows' High Contrast mode will show this outline, but not the box-shadow.
outline: 2px solid transparent;
outline-offset: -2px;
}
// Increase placeholder opacity to meet contrast ratios.
&[data-rich-text-placeholder]::after {
opacity: 0.8;
}
}
.wp-block-button__inline-link {
color: $gray-700;
height: 0;
overflow: hidden;
max-width: 290px;
&-input__suggestions {
max-width: 290px;
}
@include break-medium() {
max-width: 260px;
&-input__suggestions {
max-width: 260px;
}
}
@include break-large() {
max-width: 290px;
&-input__suggestions {
max-width: 290px;
}
}
.is-selected & {
height: auto;
overflow: visible;
}
}
.wp-button-label__width {
.components-button-group {
display: block;
}
.components-base-control__field {
margin-bottom: 12px;
}
}
// Display "table" is used because the button container should only wrap the content and not takes the full width.
div[data-type="core/button"] {
display: table;
}
.editor-styles-wrapper .wp-block-button[style*="text-decoration"] .wp-block-button__link {
text-decoration: inherit;
}
.editor-styles-wrapper .wp-block-button .wp-block-button__link {
// The following styles ensure a default border is applied when the user selects only a border color or style in the editor,
// but no width. They override the `border-width: 0;` applied by core's theme.json via the Elements API button.
&:where(.has-border-color) {
border-width: initial;
}
&:where([style*="border-top-color"]) {
border-top-width: initial;
}
&:where([style*="border-right-color"]) {
border-right-width: initial;
}
&:where([style*="border-bottom-color"]) {
border-bottom-width: initial;
}
&:where([style*="border-left-color"]) {
border-left-width: initial;
}
&:where([style*="border-style"]) {
border-width: initial;
}
&:where([style*="border-top-style"]) {
border-top-width: initial;
}
&:where([style*="border-right-style"]) {
border-right-width: initial;
}
&:where([style*="border-bottom-style"]) {
border-bottom-width: initial;
}
&:where([style*="border-left-style"]) {
border-left-width: initial;
}
}