Logger
10 months ago
Patterns
10 months ago
PersonalizationTags
7 months ago
Renderer
4 weeks ago
Templates
2 months ago
class-assets-manager.php
4 months ago
class-dependency-check.php
1 year ago
class-email-api-controller.php
4 months ago
class-email-editor.php
4 months ago
class-email-styles-schema.php
1 year ago
class-personalizer.php
4 months ago
class-send-preview-email.php
3 months ago
class-settings-controller.php
2 months ago
class-site-style-sync-controller.php
2 months ago
class-theme-controller.php
2 months ago
class-user-theme.php
1 year ago
content-editor.css
9 months ago
content-shared.css
10 months ago
theme.json
2 months ago
content-editor.css
203 lines
| 1 | /* |
| 2 | * Styles for the email editor. |
| 3 | */ |
| 4 | /* |
| 5 | * Flex layout used for buttons block for email editor. |
| 6 | */ |
| 7 | .is-layout-email-flex { |
| 8 | flex-wrap: nowrap; |
| 9 | } |
| 10 | |
| 11 | :where(body .is-layout-flex) { |
| 12 | gap: var(--wp--style--block-gap, 16px); |
| 13 | } |
| 14 | |
| 15 | .is-mobile-preview .is-layout-email-flex { |
| 16 | display: block; |
| 17 | } |
| 18 | |
| 19 | .is-mobile-preview .is-layout-email-flex .block-editor-block-list__block { |
| 20 | padding: 5px 0; |
| 21 | width: 100%; |
| 22 | } |
| 23 | |
| 24 | .is-mobile-preview .is-layout-email-flex .wp-block-button__link { |
| 25 | width: 100%; |
| 26 | } |
| 27 | |
| 28 | /* |
| 29 | * Email Editor specific styles for vertical gap between blocks in column and group. |
| 30 | * This is needed because we disable layout for core/group, core/column and core/columns blocks, and .is-layout-flex is not applied. |
| 31 | */ |
| 32 | .wp-block-columns:not(.is-not-stacked-on-mobile) |
| 33 | > .wp-block-column |
| 34 | > .wp-block:first-child, |
| 35 | .wp-block-group > .wp-block:first-child { |
| 36 | margin-top: 0; |
| 37 | } |
| 38 | |
| 39 | .wp-block-columns:not(.is-not-stacked-on-mobile) |
| 40 | > .wp-block-column |
| 41 | > .wp-block, |
| 42 | .wp-block-group > .wp-block { |
| 43 | margin-bottom: var(--wp--style--block-gap, 16px); |
| 44 | margin-top: var(--wp--style--block-gap, 16px); |
| 45 | } |
| 46 | |
| 47 | .wp-block-columns:not(.is-not-stacked-on-mobile) |
| 48 | > .wp-block-column |
| 49 | > .wp-block:not([aria-hidden="true"]):last-of-type, |
| 50 | .wp-block-group > .wp-block:not([aria-hidden="true"]):last-of-type { |
| 51 | margin-bottom: 0; |
| 52 | } |
| 53 | |
| 54 | /* |
| 55 | * Use box sizing border box for columns that have defined a width (they have flex-basis set). |
| 56 | */ |
| 57 | .wp-block-columns:not(.is-not-stacked-on-mobile) |
| 58 | > .wp-block-column[style*='flex-basis'] { |
| 59 | box-sizing: border-box; |
| 60 | } |
| 61 | |
| 62 | /* |
| 63 | * For the WYSIWYG experience we don't want to display any margins between blocks in the editor |
| 64 | */ |
| 65 | .wp-block { |
| 66 | clear: both; |
| 67 | } |
| 68 | |
| 69 | /* |
| 70 | * Image block enhancements |
| 71 | */ |
| 72 | .wp-block-image figcaption { |
| 73 | /* Resetting the margin for images in the editor to avoid unexpected spacing */ |
| 74 | margin: 0; |
| 75 | } |
| 76 | |
| 77 | /* |
| 78 | * Table block enhancements |
| 79 | */ |
| 80 | .wp-block-table figcaption { |
| 81 | /* Center-align table captions like core WordPress */ |
| 82 | text-align: center; |
| 83 | } |
| 84 | |
| 85 | /* Ensure bold formatting shows up in table cells and captions in the editor */ |
| 86 | .wp-block-table td strong, |
| 87 | .wp-block-table th strong, |
| 88 | .wp-block-table figcaption strong { |
| 89 | font-weight: bold; |
| 90 | } |
| 91 | |
| 92 | .wp-block-image.alignleft, |
| 93 | .wp-block-image.alignright { |
| 94 | margin-inline: 0 0; |
| 95 | text-align: center; |
| 96 | } |
| 97 | |
| 98 | .wp-block-image.aligncenter { |
| 99 | margin-left: auto; |
| 100 | margin-right: auto; |
| 101 | } |
| 102 | |
| 103 | .wp-block-image.alignright { |
| 104 | margin-left: auto; |
| 105 | } |
| 106 | |
| 107 | /* |
| 108 | * Set default padding-left to have consistent default look in editor and in email |
| 109 | * This also overrides the default values in browsers for padding-inline-start |
| 110 | */ |
| 111 | ul, |
| 112 | ol { |
| 113 | padding-left: 40px; |
| 114 | } |
| 115 | |
| 116 | /* |
| 117 | * Override default button border radius which is set in core to 9999px |
| 118 | */ |
| 119 | .wp-block-button__link { |
| 120 | border-radius: 0; |
| 121 | } |
| 122 | |
| 123 | /* |
| 124 | * Mobile preview fixes |
| 125 | */ |
| 126 | .is-mobile-preview figure > div { |
| 127 | max-width: 100% !important; |
| 128 | height: auto !important; |
| 129 | } |
| 130 | |
| 131 | /* |
| 132 | * Reset default margin for blocks in template-mode |
| 133 | * This was causing the first block to have a margin-top set to block gap. |
| 134 | * We control the gab via different css |
| 135 | */ |
| 136 | .wp-site-blocks > * { |
| 137 | margin-block-start: 0; |
| 138 | } |
| 139 | |
| 140 | /* |
| 141 | * Hide the post title. |
| 142 | * When user disables the template-lock mode we don't want to show the post title. |
| 143 | */ |
| 144 | .editor-visual-editor__post-title-wrapper { |
| 145 | display: none; |
| 146 | } |
| 147 | |
| 148 | /* |
| 149 | * Temporary styles for Rich Text HTML comments from the PR: https://github.com/WordPress/gutenberg/pull/62128/files |
| 150 | */ |
| 151 | [data-rich-text-comment], |
| 152 | [data-rich-text-format-boundary] { |
| 153 | border-radius: 2px; |
| 154 | } |
| 155 | |
| 156 | [data-rich-text-comment] { |
| 157 | background-color: var( |
| 158 | --wp-components-color-accent, |
| 159 | var(--wp-admin-theme-color, #3858e9) |
| 160 | ); |
| 161 | |
| 162 | span { |
| 163 | color: var(--wp-components-color-accent-inverted, #fff); |
| 164 | filter: none; |
| 165 | padding: 0 2px; |
| 166 | } |
| 167 | } |
| 168 | |
| 169 | /** |
| 170 | * Override the default gap for social links block in the editor. |
| 171 | * This is needed because we do not want to have a gap between the social links and also for a WYSIWYG experience. |
| 172 | */ |
| 173 | .wp-block-social-links.is-layout-flex { |
| 174 | gap: 16px !important; |
| 175 | } |
| 176 | |
| 177 | /** |
| 178 | * Override the default padding for social links block in the editor. |
| 179 | * This is needed because we do not want to have a padding for the social links block particularly for a WYSIWYG experience. |
| 180 | */ |
| 181 | .wp-block-social-links.has-background { |
| 182 | padding-left: 0; |
| 183 | } |
| 184 | |
| 185 | /** |
| 186 | * Override the default background color for social links block in the editor. |
| 187 | * This is mostly for a WYSIWYG experience. These icons don't have a default background color. |
| 188 | */ |
| 189 | :where(.wp-block-social-links:not(.is-style-logos-only)) .wp-social-link-mail, |
| 190 | :where(.wp-block-social-links:not(.is-style-logos-only)) .wp-social-link-feed, |
| 191 | :where(.wp-block-social-links:not(.is-style-logos-only)) .wp-social-link-chain { |
| 192 | background-color:#000; |
| 193 | color:#fff; |
| 194 | } |
| 195 | |
| 196 | /** |
| 197 | * Override the default overflow-x for the iframe in the editor. |
| 198 | * This is needed because we do want allow scrolling on small screens such as mobile devices. |
| 199 | */ |
| 200 | .block-editor-iframe__body { |
| 201 | overflow-x: auto; |
| 202 | } |
| 203 |