1 /** |
1 :root :where(figure.wp-block-gallery){ |
2 * Colors |
2 display:block; |
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 /** |
|
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 /** |
|
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 */ |
|
77 figure.wp-block-gallery { |
|
78 display: block; |
|
79 } |
3 } |
80 figure.wp-block-gallery.has-nested-images .components-drop-zone { |
4 :root :where(figure.wp-block-gallery)>.blocks-gallery-caption{ |
81 display: none; |
5 flex:0 0 100%; |
82 pointer-events: none; |
|
83 } |
6 } |
84 figure.wp-block-gallery > .blocks-gallery-caption { |
7 :root :where(figure.wp-block-gallery)>.blocks-gallery-media-placeholder-wrapper{ |
85 flex: 0 0 100%; |
8 flex-basis:100%; |
86 } |
9 } |
87 figure.wp-block-gallery > .blocks-gallery-media-placeholder-wrapper { |
10 :root :where(figure.wp-block-gallery) .wp-block-image .components-notice.is-error{ |
88 flex-basis: 100%; |
11 display:block; |
89 } |
12 } |
90 figure.wp-block-gallery .wp-block-image .components-notice.is-error { |
13 :root :where(figure.wp-block-gallery) .wp-block-image .components-notice__content{ |
91 display: block; |
14 margin:4px 0; |
92 } |
15 } |
93 figure.wp-block-gallery .wp-block-image .components-notice__content { |
16 :root :where(figure.wp-block-gallery) .wp-block-image .components-notice__dismiss{ |
94 margin: 4px 0; |
17 position:absolute; |
|
18 right:5px; |
|
19 top:0; |
95 } |
20 } |
96 figure.wp-block-gallery .wp-block-image .components-notice__dismiss { |
21 :root :where(figure.wp-block-gallery) .block-editor-media-placeholder.is-appender .components-placeholder__label{ |
97 position: absolute; |
22 display:none; |
98 top: 0; |
|
99 right: 5px; |
|
100 } |
23 } |
101 figure.wp-block-gallery .block-editor-media-placeholder.is-appender .components-placeholder__label { |
24 :root :where(figure.wp-block-gallery) .block-editor-media-placeholder.is-appender .block-editor-media-placeholder__button{ |
102 display: none; |
25 margin-bottom:0; |
103 } |
26 } |
104 figure.wp-block-gallery .block-editor-media-placeholder.is-appender .block-editor-media-placeholder__button { |
27 :root :where(figure.wp-block-gallery) .block-editor-media-placeholder{ |
105 margin-bottom: 0; |
28 margin:0; |
106 } |
29 } |
107 figure.wp-block-gallery .block-editor-media-placeholder { |
30 :root :where(figure.wp-block-gallery) .block-editor-media-placeholder .components-placeholder__label{ |
108 margin: 0; |
31 display:flex; |
109 } |
32 } |
110 figure.wp-block-gallery .block-editor-media-placeholder .components-placeholder__label { |
33 :root :where(figure.wp-block-gallery) .block-editor-media-placeholder figcaption{ |
111 display: flex; |
34 z-index:2; |
112 } |
35 } |
113 figure.wp-block-gallery .block-editor-media-placeholder figcaption { |
36 :root :where(figure.wp-block-gallery) .components-spinner{ |
114 z-index: 2; |
37 left:50%; |
|
38 margin-left:-9px; |
|
39 margin-top:-9px; |
|
40 position:absolute; |
|
41 top:50%; |
115 } |
42 } |
116 figure.wp-block-gallery .components-spinner { |
43 .gallery-settings-buttons .components-button:first-child{ |
117 position: absolute; |
44 margin-right:8px; |
118 top: 50%; |
|
119 left: 50%; |
|
120 margin-top: -9px; |
|
121 margin-left: -9px; |
|
122 } |
45 } |
123 |
46 |
124 /** |
47 .gallery-image-sizes .components-base-control__label{ |
125 * Gallery inspector controls settings. |
48 display:block; |
126 */ |
49 margin-bottom:4px; |
127 .gallery-settings-buttons .components-button:first-child { |
50 } |
128 margin-right: 8px; |
51 .gallery-image-sizes .gallery-image-sizes__loading{ |
|
52 align-items:center; |
|
53 color:#757575; |
|
54 display:flex; |
|
55 font-size:12px; |
|
56 } |
|
57 .gallery-image-sizes .components-spinner{ |
|
58 margin:0 8px 0 4px; |
|
59 } |
|
60 .blocks-gallery-item figure:not(.is-selected):focus,.blocks-gallery-item img:focus{ |
|
61 outline:none; |
|
62 } |
|
63 .blocks-gallery-item figure.is-selected:before{ |
|
64 bottom:0; |
|
65 box-shadow:0 0 0 1px #fff inset, 0 0 0 3px var(--wp-admin-theme-color) inset; |
|
66 content:""; |
|
67 left:0; |
|
68 outline:2px solid #0000; |
|
69 pointer-events:none; |
|
70 position:absolute; |
|
71 right:0; |
|
72 top:0; |
|
73 z-index:1; |
|
74 } |
|
75 .blocks-gallery-item figure.is-transient img{ |
|
76 opacity:.3; |
|
77 } |
|
78 .blocks-gallery-item .is-selected .block-library-gallery-item__inline-menu{ |
|
79 display:inline-flex; |
|
80 } |
|
81 .blocks-gallery-item .block-editor-media-placeholder{ |
|
82 height:100%; |
|
83 margin:0; |
|
84 } |
|
85 .blocks-gallery-item .block-editor-media-placeholder .components-placeholder__label{ |
|
86 display:flex; |
129 } |
87 } |
130 |
88 |
131 .gallery-image-sizes .components-base-control__label { |
89 .block-library-gallery-item__inline-menu{ |
132 display: block; |
90 background:#fff; |
133 margin-bottom: 4px; |
91 border:1px solid #1e1e1e; |
|
92 border-radius:2px; |
|
93 display:none; |
|
94 margin:8px; |
|
95 position:absolute; |
|
96 top:-2px; |
|
97 transition:box-shadow .2s ease-out; |
|
98 z-index:20; |
134 } |
99 } |
135 .gallery-image-sizes .gallery-image-sizes__loading { |
100 @media (prefers-reduced-motion:reduce){ |
136 display: flex; |
101 .block-library-gallery-item__inline-menu{ |
137 align-items: center; |
102 transition-delay:0s; |
138 color: #757575; |
103 transition-duration:0s; |
139 font-size: 12px; |
104 } |
140 } |
105 } |
141 .gallery-image-sizes .components-spinner { |
106 .block-library-gallery-item__inline-menu:hover{ |
142 margin: 0 8px 0 4px; |
107 box-shadow:0 .7px 1px #0000001a,0 1.2px 1.7px -.2px #0000001a,0 2.3px 3.3px -.5px #0000001a; |
|
108 } |
|
109 @media (min-width:600px){ |
|
110 .columns-7 .block-library-gallery-item__inline-menu,.columns-8 .block-library-gallery-item__inline-menu{ |
|
111 padding:2px; |
|
112 } |
|
113 } |
|
114 .block-library-gallery-item__inline-menu .components-button.has-icon:not(:focus){ |
|
115 border:none; |
|
116 box-shadow:none; |
|
117 } |
|
118 @media (min-width:600px){ |
|
119 .columns-7 .block-library-gallery-item__inline-menu .components-button.has-icon,.columns-8 .block-library-gallery-item__inline-menu .components-button.has-icon{ |
|
120 height:inherit; |
|
121 padding:0; |
|
122 width:inherit; |
|
123 } |
|
124 } |
|
125 .block-library-gallery-item__inline-menu.is-left{ |
|
126 left:-2px; |
|
127 } |
|
128 .block-library-gallery-item__inline-menu.is-right{ |
|
129 right:-2px; |
143 } |
130 } |
144 |
131 |
145 /** |
132 .wp-block-gallery ul.blocks-gallery-grid{ |
146 * Deprecated css past this point. This can be removed once all galleries are migrated |
133 margin:0; |
147 * to V2. |
134 padding:0; |
148 */ |
|
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 } |
135 } |
178 |
136 |
179 .block-library-gallery-item__inline-menu { |
137 @media (min-width:600px){ |
180 display: none; |
138 .wp-block-update-gallery-modal{ |
181 position: absolute; |
139 max-width:480px; |
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 |
|
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 } |
140 } |
231 } |
141 } |
232 |
142 |
233 .wp-block-update-gallery-modal-buttons { |
143 .wp-block-update-gallery-modal-buttons{ |
234 display: flex; |
144 display:flex; |
235 justify-content: flex-end; |
145 gap:12px; |
236 gap: 12px; |
146 justify-content:flex-end; |
237 } |
147 } |