18
|
1 |
/** |
|
2 |
* Colors |
|
3 |
*/ |
|
4 |
/** |
|
5 |
* Breakpoints & Media Queries |
|
6 |
*/ |
|
7 |
/** |
|
8 |
* SCSS Variables. |
|
9 |
* |
|
10 |
* Please use variables from this sheet to ensure consistency across the UI. |
|
11 |
* Don't add to this sheet unless you're pretty sure the value will be reused in many places. |
|
12 |
* For example, don't add rules to this sheet that affect block visuals. It's purely for UI. |
|
13 |
*/ |
|
14 |
/** |
|
15 |
* Colors |
|
16 |
*/ |
|
17 |
/** |
|
18 |
* Fonts & basic variables. |
|
19 |
*/ |
|
20 |
/** |
|
21 |
* Grid System. |
|
22 |
* https://make.wordpress.org/design/2019/10/31/proposal-a-consistent-spacing-system-for-wordpress/ |
|
23 |
*/ |
|
24 |
/** |
|
25 |
* Dimensions. |
|
26 |
*/ |
|
27 |
/** |
|
28 |
* Shadows. |
|
29 |
*/ |
|
30 |
/** |
|
31 |
* Editor widths. |
|
32 |
*/ |
|
33 |
/** |
|
34 |
* Block & Editor UI. |
|
35 |
*/ |
|
36 |
/** |
|
37 |
* Block paddings. |
|
38 |
*/ |
|
39 |
/** |
|
40 |
* React Native specific. |
|
41 |
* These variables do not appear to be used anywhere else. |
|
42 |
*/ |
|
43 |
/** |
19
|
44 |
* Converts a hex value into the rgb equivalent. |
|
45 |
* |
|
46 |
* @param {string} hex - the hexadecimal value to convert |
|
47 |
* @return {string} comma separated rgb values |
|
48 |
*/ |
|
49 |
/** |
18
|
50 |
* Breakpoint mixins |
|
51 |
*/ |
|
52 |
/** |
|
53 |
* Long content fade mixin |
|
54 |
* |
|
55 |
* Creates a fading overlay to signify that the content is longer |
|
56 |
* than the space allows. |
|
57 |
*/ |
|
58 |
/** |
|
59 |
* Focus styles. |
|
60 |
*/ |
|
61 |
/** |
|
62 |
* Applies editor left position to the selector passed as argument |
|
63 |
*/ |
|
64 |
/** |
|
65 |
* Styles that are reused verbatim in a few places |
|
66 |
*/ |
|
67 |
/** |
|
68 |
* Allows users to opt-out of animations via OS-level preferences. |
|
69 |
*/ |
|
70 |
/** |
|
71 |
* Reset default styles for JavaScript UI based pages. |
|
72 |
* This is a WP-admin agnostic reset |
|
73 |
*/ |
|
74 |
/** |
|
75 |
* Reset the WP Admin page styles for Gutenberg-like pages. |
|
76 |
*/ |
19
|
77 |
figure.wp-block-gallery { |
|
78 |
display: block; |
|
79 |
} |
|
80 |
figure.wp-block-gallery.has-nested-images .components-drop-zone { |
|
81 |
display: none; |
|
82 |
pointer-events: none; |
|
83 |
} |
|
84 |
figure.wp-block-gallery > .blocks-gallery-caption { |
|
85 |
flex: 0 0 100%; |
|
86 |
} |
|
87 |
figure.wp-block-gallery > .blocks-gallery-media-placeholder-wrapper { |
|
88 |
flex-basis: 100%; |
18
|
89 |
} |
19
|
90 |
figure.wp-block-gallery .wp-block-image .components-notice.is-error { |
|
91 |
display: block; |
|
92 |
} |
|
93 |
figure.wp-block-gallery .wp-block-image .components-notice__content { |
|
94 |
margin: 4px 0; |
|
95 |
} |
|
96 |
figure.wp-block-gallery .wp-block-image .components-notice__dismiss { |
|
97 |
position: absolute; |
|
98 |
top: 0; |
|
99 |
right: 5px; |
|
100 |
} |
|
101 |
figure.wp-block-gallery .block-editor-media-placeholder.is-appender .components-placeholder__label { |
18
|
102 |
display: none; |
|
103 |
} |
19
|
104 |
figure.wp-block-gallery .block-editor-media-placeholder.is-appender .block-editor-media-placeholder__button { |
18
|
105 |
margin-bottom: 0; |
|
106 |
} |
19
|
107 |
figure.wp-block-gallery .block-editor-media-placeholder { |
|
108 |
margin: 0; |
|
109 |
} |
|
110 |
figure.wp-block-gallery .block-editor-media-placeholder .components-placeholder__label { |
|
111 |
display: flex; |
|
112 |
} |
|
113 |
figure.wp-block-gallery .block-editor-media-placeholder figcaption { |
|
114 |
z-index: 2; |
|
115 |
} |
|
116 |
figure.wp-block-gallery .components-spinner { |
|
117 |
position: absolute; |
|
118 |
top: 50%; |
|
119 |
left: 50%; |
|
120 |
margin-top: -9px; |
|
121 |
margin-left: -9px; |
|
122 |
} |
18
|
123 |
|
19
|
124 |
/** |
|
125 |
* Gallery inspector controls settings. |
|
126 |
*/ |
|
127 |
.gallery-settings-buttons .components-button:first-child { |
|
128 |
margin-right: 8px; |
18
|
129 |
} |
|
130 |
|
19
|
131 |
.gallery-image-sizes .components-base-control__label { |
|
132 |
display: block; |
|
133 |
margin-bottom: 4px; |
|
134 |
} |
|
135 |
.gallery-image-sizes .gallery-image-sizes__loading { |
|
136 |
display: flex; |
|
137 |
align-items: center; |
|
138 |
color: #757575; |
|
139 |
font-size: 12px; |
|
140 |
} |
|
141 |
.gallery-image-sizes .components-spinner { |
|
142 |
margin: 0 8px 0 4px; |
18
|
143 |
} |
|
144 |
|
19
|
145 |
/** |
|
146 |
* Deprecated css past this point. This can be removed once all galleries are migrated |
|
147 |
* to V2. |
|
148 |
*/ |
18
|
149 |
.blocks-gallery-item figure:not(.is-selected):focus, |
|
150 |
.blocks-gallery-item img:focus { |
|
151 |
outline: none; |
|
152 |
} |
|
153 |
.blocks-gallery-item figure.is-selected::before { |
|
154 |
box-shadow: 0 0 0 1px #fff inset, 0 0 0 3px var(--wp-admin-theme-color) inset; |
|
155 |
content: ""; |
|
156 |
outline: 2px solid transparent; |
|
157 |
position: absolute; |
|
158 |
top: 0; |
|
159 |
right: 0; |
|
160 |
bottom: 0; |
|
161 |
left: 0; |
|
162 |
z-index: 1; |
|
163 |
pointer-events: none; |
|
164 |
} |
|
165 |
.blocks-gallery-item figure.is-transient img { |
|
166 |
opacity: 0.3; |
|
167 |
} |
|
168 |
.blocks-gallery-item .is-selected .block-library-gallery-item__inline-menu { |
|
169 |
display: inline-flex; |
|
170 |
} |
|
171 |
.blocks-gallery-item .block-editor-media-placeholder { |
|
172 |
margin: 0; |
|
173 |
height: 100%; |
|
174 |
} |
|
175 |
.blocks-gallery-item .block-editor-media-placeholder .components-placeholder__label { |
|
176 |
display: flex; |
|
177 |
} |
|
178 |
|
|
179 |
.block-library-gallery-item__inline-menu { |
|
180 |
display: none; |
|
181 |
position: absolute; |
|
182 |
top: -2px; |
|
183 |
margin: 8px; |
|
184 |
z-index: 20; |
|
185 |
transition: box-shadow 0.2s ease-out; |
|
186 |
border-radius: 2px; |
|
187 |
background: #fff; |
|
188 |
border: 1px solid #1e1e1e; |
|
189 |
} |
|
190 |
@media (prefers-reduced-motion: reduce) { |
|
191 |
.block-library-gallery-item__inline-menu { |
|
192 |
transition-duration: 0s; |
|
193 |
transition-delay: 0s; |
|
194 |
} |
|
195 |
} |
|
196 |
.block-library-gallery-item__inline-menu:hover { |
|
197 |
box-shadow: 0 2px 6px rgba(0, 0, 0, 0.05); |
|
198 |
} |
|
199 |
@media (min-width: 600px) { |
|
200 |
.columns-7 .block-library-gallery-item__inline-menu, .columns-8 .block-library-gallery-item__inline-menu { |
|
201 |
padding: 2px; |
|
202 |
} |
|
203 |
} |
|
204 |
.block-library-gallery-item__inline-menu .components-button.has-icon:not(:focus) { |
|
205 |
border: none; |
|
206 |
box-shadow: none; |
|
207 |
} |
|
208 |
@media (min-width: 600px) { |
|
209 |
.columns-7 .block-library-gallery-item__inline-menu .components-button.has-icon, .columns-8 .block-library-gallery-item__inline-menu .components-button.has-icon { |
|
210 |
padding: 0; |
|
211 |
width: inherit; |
|
212 |
height: inherit; |
|
213 |
} |
|
214 |
} |
|
215 |
.block-library-gallery-item__inline-menu.is-left { |
|
216 |
left: -2px; |
|
217 |
} |
|
218 |
.block-library-gallery-item__inline-menu.is-right { |
|
219 |
right: -2px; |
|
220 |
} |
|
221 |
|
19
|
222 |
.wp-block-gallery ul.blocks-gallery-grid { |
|
223 |
padding: 0; |
|
224 |
margin: 0; |
|
225 |
} |
|
226 |
|
|
227 |
@media (min-width: 600px) { |
|
228 |
.wp-block-update-gallery-modal { |
|
229 |
max-width: 480px; |
|
230 |
} |
|
231 |
} |
|
232 |
|
|
233 |
.wp-block-update-gallery-modal-buttons { |
|
234 |
display: flex; |
|
235 |
justify-content: flex-end; |
|
236 |
gap: 12px; |
18
|
237 |
} |