-
Notifications
You must be signed in to change notification settings - Fork 4.3k
/
Copy pathstyle.scss
170 lines (140 loc) · 4 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
.block-editor-global-styles-background-panel__inspector-media-replace-container {
border: $border-width solid $gray-300;
border-radius: $radius-small;
// Full width. ToolsPanel lays out children in a grid.
grid-column: 1 / -1;
&.is-open {
background-color: $gray-100;
}
.block-editor-global-styles-background-panel__image-tools-panel-item {
flex-grow: 1;
border: 0;
.components-dropdown {
display: block;
}
}
.block-editor-global-styles-background-panel__inspector-preview-inner {
height: 100%;
}
.components-dropdown {
display: block;
height: 36px;
}
}
.block-editor-global-styles-background-panel__image-tools-panel-item {
border: $border-width solid $gray-300;
// Full width. ToolsPanel lays out children in a grid.
grid-column: 1 / -1;
// Ensure the dropzone is positioned to the size of the item.
position: relative;
// Since there is no option to skip rendering the drag'n'drop icon in drop
// zone, we hide it for now.
.components-drop-zone__content-icon {
display: none;
}
.components-dropdown {
display: block;
height: 36px;
}
button.components-button {
color: $gray-900;
width: 100%;
display: block;
&:hover {
color: var(--wp-admin-theme-color);
}
&:focus {
box-shadow: inset 0 0 0 var(--wp-admin-border-width-focus) var(--wp-admin-theme-color);
}
}
.block-editor-global-styles-background-panel__loading {
height: 100%;
position: absolute;
z-index: 1;
width: 100%;
padding: 10px 0 0 0;
svg {
margin: 0;
}
}
}
.block-editor-global-styles-background-panel__image-preview-content,
.block-editor-global-styles-background-panel__dropdown-toggle {
height: 100%;
width: 100%;
padding-left: $grid-unit-15;
}
.block-editor-global-styles-background-panel__dropdown-toggle {
cursor: pointer;
background: transparent;
border: none;
}
.block-editor-global-styles-background-panel__inspector-media-replace-title {
word-break: break-all;
// The Button component is white-space: nowrap, and that won't work with line-clamp.
white-space: normal;
// Without this, the ellipsis can sometimes be partially hidden by the Button padding.
text-align: start;
text-align-last: center;
}
.block-editor-global-styles-background-panel__inspector-preview-inner {
.block-editor-global-styles-background-panel__inspector-image-indicator-wrapper {
width: 20px;
height: 20px;
min-width: auto;
}
}
.block-editor-global-styles-background-panel__inspector-image-indicator {
background-size: cover;
border-radius: $radius-round;
width: 20px;
height: 20px;
display: block;
position: relative;
}
.block-editor-global-styles-background-panel__inspector-image-indicator::after {
content: "";
position: absolute;
top: -1px;
left: -1px;
bottom: -1px;
right: -1px;
border-radius: $radius-round;
box-shadow: inset 0 0 0 $border-width rgba(0, 0, 0, 0.2);
// Show a thin outline in Windows high contrast mode, otherwise the button is invisible.
border: 1px solid transparent;
box-sizing: inherit;
}
.block-editor-global-styles-background-panel__dropdown-content-wrapper {
min-width: 260px;
overflow-x: hidden;
.components-focal-point-picker-wrapper {
background-color: $gray-100;
width: 100%;
border-radius: $radius-small;
border: $border-width solid $gray-300;
}
.components-focal-point-picker__media--image {
max-height: 180px;
}
// Override focal picker to avoid a double border.
.components-focal-point-picker::after {
content: none;
}
}
// Push control panel into the background when the media modal is open.
.modal-open .block-editor-global-styles-background-panel__popover {
z-index: z-index(".block-editor-global-styles-background-panel__popover");
}
.block-editor-global-styles-background-panel__media-replace-popover {
.components-popover__content {
// width of block-editor-global-styles-background-panel__dropdown-content-wrapper minus padding.
width: 226px;
}
.components-button {
padding: 0 $grid-unit-10;
}
.components-button .components-menu-items__item-icon.has-icon-right {
margin-left: $grid-unit-30 - $grid-unit-10;
}
}