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 |
*/ |
|
77 |
.wp-block-media-text { |
|
78 |
direction: ltr; |
|
79 |
display: grid; |
|
80 |
grid-template-columns: 50% 1fr; |
|
81 |
grid-template-rows: auto; |
|
82 |
} |
|
83 |
.wp-block-media-text.has-media-on-the-right { |
|
84 |
grid-template-columns: 1fr 50%; |
|
85 |
} |
|
86 |
|
|
87 |
.wp-block-media-text.is-vertically-aligned-top .wp-block-media-text__content, |
|
88 |
.wp-block-media-text.is-vertically-aligned-top .wp-block-media-text__media { |
|
89 |
align-self: start; |
|
90 |
} |
|
91 |
|
|
92 |
.wp-block-media-text .wp-block-media-text__content, |
|
93 |
.wp-block-media-text .wp-block-media-text__media, |
|
94 |
.wp-block-media-text.is-vertically-aligned-center .wp-block-media-text__content, |
|
95 |
.wp-block-media-text.is-vertically-aligned-center .wp-block-media-text__media { |
|
96 |
align-self: center; |
|
97 |
} |
|
98 |
|
|
99 |
.wp-block-media-text.is-vertically-aligned-bottom .wp-block-media-text__content, |
|
100 |
.wp-block-media-text.is-vertically-aligned-bottom .wp-block-media-text__media { |
|
101 |
align-self: end; |
|
102 |
} |
|
103 |
|
|
104 |
.wp-block-media-text .wp-block-media-text__media { |
|
105 |
grid-column: 1; |
|
106 |
grid-row: 1; |
|
107 |
margin: 0; |
|
108 |
} |
|
109 |
|
|
110 |
.wp-block-media-text .wp-block-media-text__content { |
|
111 |
direction: rtl; |
|
112 |
grid-column: 2; |
|
113 |
grid-row: 1; |
|
114 |
padding: 0 8% 0 8%; |
|
115 |
word-break: break-word; |
|
116 |
} |
|
117 |
|
|
118 |
.wp-block-media-text.has-media-on-the-right .wp-block-media-text__media { |
|
119 |
grid-column: 2; |
|
120 |
grid-row: 1; |
|
121 |
} |
|
122 |
|
|
123 |
.wp-block-media-text.has-media-on-the-right .wp-block-media-text__content { |
|
124 |
grid-column: 1; |
|
125 |
grid-row: 1; |
|
126 |
} |
|
127 |
|
|
128 |
.wp-block-media-text__media img, |
|
129 |
.wp-block-media-text__media video { |
19
|
130 |
height: auto; |
18
|
131 |
max-width: unset; |
|
132 |
width: 100%; |
|
133 |
vertical-align: middle; |
|
134 |
} |
|
135 |
|
|
136 |
.wp-block-media-text.is-image-fill .wp-block-media-text__media { |
|
137 |
height: 100%; |
|
138 |
min-height: 250px; |
|
139 |
background-size: cover; |
|
140 |
} |
|
141 |
|
|
142 |
.wp-block-media-text.is-image-fill .wp-block-media-text__media > a { |
|
143 |
display: block; |
|
144 |
height: 100%; |
|
145 |
} |
|
146 |
|
|
147 |
.wp-block-media-text.is-image-fill .wp-block-media-text__media img { |
|
148 |
position: absolute; |
|
149 |
width: 1px; |
|
150 |
height: 1px; |
|
151 |
padding: 0; |
|
152 |
margin: -1px; |
|
153 |
overflow: hidden; |
|
154 |
clip: rect(0, 0, 0, 0); |
|
155 |
border: 0; |
|
156 |
} |
|
157 |
|
|
158 |
/* |
|
159 |
* Here we here not able to use a mobile first CSS approach. |
|
160 |
* Custom widths are set using inline styles, and on mobile, |
|
161 |
* we need 100% width, so we use important to overwrite the inline style. |
|
162 |
* If the style were set on mobile first, on desktop styles, |
|
163 |
* we would have no way of setting the style again to the inline style. |
|
164 |
*/ |
|
165 |
@media (max-width: 600px) { |
|
166 |
.wp-block-media-text.is-stacked-on-mobile { |
|
167 |
grid-template-columns: 100% !important; |
|
168 |
} |
|
169 |
.wp-block-media-text.is-stacked-on-mobile .wp-block-media-text__media { |
|
170 |
grid-column: 1; |
|
171 |
grid-row: 1; |
|
172 |
} |
|
173 |
.wp-block-media-text.is-stacked-on-mobile .wp-block-media-text__content { |
|
174 |
grid-column: 1; |
|
175 |
grid-row: 2; |
|
176 |
} |
|
177 |
} |