|
28 | 28 | $link_color = $this->get_customizer_setting( 'link_color' ); |
29 | 29 | $header_background_color = $this->get_customizer_setting( 'header_background_color' ); |
30 | 30 | $header_color = $this->get_customizer_setting( 'header_color' ); |
| 31 | + |
| 32 | +$alignwide_max = $content_max_width > 0 ? $content_max_width * 2 : 1920 |
31 | 33 | ?> |
32 | 34 | /* Generic WP styling */ |
33 | 35 |
|
| 36 | +.alignnone, |
| 37 | +.aligncenter, |
| 38 | +.alignleft, |
| 39 | +.alignright, |
| 40 | +.alignwide { |
| 41 | + margin-top: 1em; |
| 42 | + margin-right: auto; |
| 43 | + margin-bottom: 1em; |
| 44 | + margin-left: auto; |
| 45 | +} |
| 46 | + |
34 | 47 | .alignright { |
35 | 48 | float: right; |
36 | 49 | } |
|
46 | 59 | margin-right: auto; |
47 | 60 | } |
48 | 61 |
|
| 62 | +.alignwide { |
| 63 | + width: 100%; |
| 64 | +} |
| 65 | + |
| 66 | +@media (min-width: calc(840px - 48px)) { |
| 67 | + .alignwide { |
| 68 | + width: calc(100vw - 48px); |
| 69 | + max-width: calc(100vw - 48px); |
| 70 | + margin-left: calc(50% - 50vw + 24px); |
| 71 | + margin-right: calc(50% - 50vw + 24px); |
| 72 | + } |
| 73 | +} |
| 74 | + |
| 75 | +@media (min-width: calc(<?php echo sprintf( '%dpx', $alignwide_max ); ?>)) { |
| 76 | + .alignwide { |
| 77 | + width: calc(<?php echo sprintf( '%dpx', $alignwide_max ); ?> - 48px); |
| 78 | + max-width: calc(<?php echo sprintf( '%dpx', $alignwide_max ); ?> - 48px); |
| 79 | + margin-left: calc(calc(50% - <?php echo sprintf( '%dpx', $alignwide_max ); ?> / 2) + 24px); |
| 80 | + margin-right: calc(calc(50% - <?php echo sprintf( '%dpx', $alignwide_max ); ?> / 2) + 24px); |
| 81 | + } |
| 82 | +} |
| 83 | + |
| 84 | +.alignfull { |
| 85 | + width: 100vw; |
| 86 | + max-width: 100vw; |
| 87 | + margin-left: calc(50% - 50vw); |
| 88 | + margin-right: calc(50% - 50vw); |
| 89 | +} |
| 90 | + |
49 | 91 | .amp-wp-enforced-sizes { |
50 | 92 | /** Our sizes fallback is 100vw, and we have a padding on the container; the max-width here prevents the element from overflowing. **/ |
51 | 93 | max-width: 100%; |
|
268 | 310 | margin: 0 auto; |
269 | 311 | } |
270 | 312 |
|
271 | | -.amp-wp-article-content amp-img.alignright { |
| 313 | +.amp-wp-article-content amp-img.alignright, |
| 314 | +.amp-wp-article-content .wp-block-cover.alignright { |
272 | 315 | margin: 0 0 1em 16px; |
273 | 316 | } |
274 | 317 |
|
275 | | -.amp-wp-article-content amp-img.alignleft { |
| 318 | +.amp-wp-article-content amp-img.alignleft, |
| 319 | +.amp-wp-article-content .wp-block-cover.alignleft { |
276 | 320 | margin: 0 16px 1em 0; |
277 | 321 | } |
278 | 322 |
|
|
0 commit comments