| 1 |
/* |
| 2 |
The .ext utility is a top-level class that we use to target contents within our patterns. |
| 3 |
We use it here to ensure columns blocks display well across themes. |
| 4 |
*/ |
| 5 |
.wp-block-columns[class*="fullwidth-cols"] { |
| 6 |
/* no suggestion */ |
| 7 |
margin-bottom: unset; |
| 8 |
} |
| 9 |
|
| 10 |
.wp-block-column.editor\:pointer-events-none { |
| 11 |
/* no suggestion */ |
| 12 |
@apply ext-my-0 !important; |
| 13 |
} |
| 14 |
|
| 15 |
/* Some popular themes use padding instead of core margin for columns; remove it */ |
| 16 |
.ext .wp-block-columns .wp-block-column[style*="padding"] { |
| 17 |
/* no suggestion */ |
| 18 |
@apply ext-px-0 !important; |
| 19 |
} |
| 20 |
|
| 21 |
/* Some popular themes add double spacing between columns; remove it */ |
| 22 |
.ext |
| 23 |
.wp-block-columns |
| 24 |
+ .wp-block-columns:not([class*="mt-"]):not([class*="my-"]) { |
| 25 |
/* no suggestion */ |
| 26 |
@apply ext-mt-0 !important; |
| 27 |
} |
| 28 |
|
| 29 |
[class*="fullwidth-cols"] .wp-block-column:first-child, |
| 30 |
[class*="fullwidth-cols"] .wp-block-group:first-child { |
| 31 |
/* no suggestion */ |
| 32 |
@apply ext-mt-0; |
| 33 |
} |
| 34 |
|
| 35 |
[class*="fullwidth-cols"] .wp-block-column:last-child, |
| 36 |
[class*="fullwidth-cols"] .wp-block-group:last-child { |
| 37 |
/* no suggestion */ |
| 38 |
@apply ext-mb-0; |
| 39 |
} |
| 40 |
|
| 41 |
[class*="fullwidth-cols"] .wp-block-column:first-child > * { |
| 42 |
/* no suggestion */ |
| 43 |
@apply ext-mt-0; |
| 44 |
} |
| 45 |
|
| 46 |
[class*="fullwidth-cols"] .wp-block-column > *:first-child { |
| 47 |
/* no suggestion */ |
| 48 |
@apply ext-mt-0; |
| 49 |
} |
| 50 |
|
| 51 |
[class*="fullwidth-cols"] .wp-block-column > *:last-child { |
| 52 |
/* no suggestion */ |
| 53 |
@apply ext-mb-0; |
| 54 |
} |
| 55 |
|
| 56 |
.ext .is-not-stacked-on-mobile .wp-block-column { |
| 57 |
/* no suggestion */ |
| 58 |
@apply ext-mb-0; |
| 59 |
} |
| 60 |
|
| 61 |
/* Add base margin bottom to all columns */ |
| 62 |
.wp-block-columns[class*="fullwidth-cols"]:not(.is-not-stacked-on-mobile) |
| 63 |
> .wp-block-column:not(:last-child) { |
| 64 |
/* no suggestion */ |
| 65 |
@apply ext-mb-base; |
| 66 |
} |
| 67 |
|
| 68 |
@screen tablet { |
| 69 |
.wp-block-columns[class*="fullwidth-cols"]:not(.is-not-stacked-on-mobile) |
| 70 |
> .wp-block-column:not(:last-child) { |
| 71 |
/* no suggestion */ |
| 72 |
@apply ext-mb-0; |
| 73 |
} |
| 74 |
} |
| 75 |
|
| 76 |
/* Remove margin bottom from "not-stacked" columns */ |
| 77 |
.wp-block-columns[class*="fullwidth-cols"].is-not-stacked-on-mobile |
| 78 |
> .wp-block-column { |
| 79 |
/* no suggestion */ |
| 80 |
@apply ext-mb-0 !important; |
| 81 |
} |
| 82 |
|
| 83 |
@media (min-width: 600px) and (max-width: 781px) { |
| 84 |
.wp-block-columns[class*="fullwidth-cols"]:not(.is-not-stacked-on-mobile) |
| 85 |
> .wp-block-column:nth-child(even) { |
| 86 |
/* no suggestion */ |
| 87 |
margin-left: var(--wp--style--block-gap, 2em); |
| 88 |
} |
| 89 |
} |
| 90 |
|
| 91 |
/* |
| 92 |
The `tablet:fullwidth-cols` and `desktop:fullwidth-cols` utilities are used |
| 93 |
to counter the core/columns responsive for at our breakpoints. |
| 94 |
*/ |
| 95 |
@media (max-width: 781px) { |
| 96 |
.tablet\:fullwidth-cols.wp-block-columns:not(.is-not-stacked-on-mobile) { |
| 97 |
@apply ext-flex-wrap; |
| 98 |
} |
| 99 |
|
| 100 |
.tablet\:fullwidth-cols.wp-block-columns:not(.is-not-stacked-on-mobile) |
| 101 |
> .wp-block-column { |
| 102 |
@apply ext-ml-0 !important; |
| 103 |
flex-basis: 100% !important; /* Required to negate core/columns flex-basis */ |
| 104 |
} |
| 105 |
} |
| 106 |
|
| 107 |
@media (max-width: 1079px) { |
| 108 |
.desktop\:fullwidth-cols.wp-block-columns:not(.is-not-stacked-on-mobile) { |
| 109 |
@apply ext-flex-wrap; |
| 110 |
} |
| 111 |
|
| 112 |
.desktop\:fullwidth-cols.wp-block-columns:not(.is-not-stacked-on-mobile) |
| 113 |
> .wp-block-column { |
| 114 |
@apply ext-ml-0 !important; |
| 115 |
flex-basis: 100% !important; /* Required to negate core/columns flex-basis */ |
| 116 |
} |
| 117 |
|
| 118 |
.desktop\:fullwidth-cols.wp-block-columns:not(.is-not-stacked-on-mobile) |
| 119 |
> .wp-block-column:not(:last-child) { |
| 120 |
@apply ext-mb-base !important; |
| 121 |
} |
| 122 |
} |
| 123 |
|