css
4 years ago
attributes.js
4 years ago
block-controls.js
4 years ago
block.js
4 years ago
deprecated.js
5 years ago
edit.js
4 years ago
editor.scss
4 years ago
editor.scss
342 lines
| 1 | /** |
| 2 | * #.# Editor Styles |
| 3 | * |
| 4 | * CSS for just Backend enqueued after style.scss |
| 5 | * which makes it higher in priority. |
| 6 | */ |
| 7 | |
| 8 | body.gutenberg-editor-page [data-type="generateblocks/container"]="generateblocks/container""] .editor-block-list__block, |
| 9 | [data-type="generateblocks/container"]="generateblocks/container""] .wp-block-heading h1, |
| 10 | [data-type="generateblocks/container"]="generateblocks/container""] .wp-block-heading h1.editor-rich-text__tinymce, |
| 11 | [data-type="generateblocks/container"]="generateblocks/container""] .wp-block-heading h2, |
| 12 | [data-type="generateblocks/container"]="generateblocks/container""] .wp-block-heading h2.editor-rich-text__tinymce, |
| 13 | [data-type="generateblocks/container"]="generateblocks/container""] .wp-block-heading h3, |
| 14 | [data-type="generateblocks/container"]="generateblocks/container""] .wp-block-heading h3.editor-rich-text__tinymce, |
| 15 | [data-type="generateblocks/container"]="generateblocks/container""] .wp-block-heading h4, |
| 16 | [data-type="generateblocks/container"]="generateblocks/container""] .wp-block-heading h4.editor-rich-text__tinymce, |
| 17 | [data-type="generateblocks/container"]="generateblocks/container""] .wp-block-heading h5, |
| 18 | [data-type="generateblocks/container"]="generateblocks/container""] .wp-block-heading h5.editor-rich-text__tinymce, |
| 19 | [data-type="generateblocks/container"]="generateblocks/container""] .wp-block-heading h6, |
| 20 | [data-type="generateblocks/container"]="generateblocks/container""] .wp-block-heading h6.editor-rich-text__tinymce { |
| 21 | color: inherit; |
| 22 | } |
| 23 | |
| 24 | .additional-class-notice .components-notice { |
| 25 | margin: 0 0 10px; |
| 26 | } |
| 27 | |
| 28 | .widthButtons { |
| 29 | margin-bottom: 10px; |
| 30 | display: flex; |
| 31 | |
| 32 | button { |
| 33 | font-size: 12px; |
| 34 | flex: 1; |
| 35 | box-shadow: inset 0 0 0 1px #007cba; |
| 36 | justify-content: center; |
| 37 | padding: 5px 0; |
| 38 | |
| 39 | &:first-child { |
| 40 | padding: 5px; |
| 41 | } |
| 42 | } |
| 43 | } |
| 44 | |
| 45 | .gblocks-column-width-control input[type="number"]="number""] { |
| 46 | width: 65px; |
| 47 | } |
| 48 | |
| 49 | body .gb-container .wp-block { |
| 50 | max-width: none; |
| 51 | } |
| 52 | |
| 53 | [data-type="generateblocks/container"]="generateblocks/container""] > .block-editor-block-list__block-edit > [data-block]] { |
| 54 | margin: 0; |
| 55 | } |
| 56 | |
| 57 | .block-editor-block-inspector .components-base-control { |
| 58 | &.gblocks-gpress-full-width { |
| 59 | border-top: 1px solid #ddd; |
| 60 | padding-top: 15px; |
| 61 | |
| 62 | .components-base-control__label { |
| 63 | margin-bottom: 15px; |
| 64 | } |
| 65 | } |
| 66 | } |
| 67 | |
| 68 | .gblocks-container-text-alignment .components-base-control__label { |
| 69 | display: block; |
| 70 | } |
| 71 | |
| 72 | /* Not needed in GB 7 */ |
| 73 | .edit-post-visual-editor .block-editor-block-list__block[data-type="generateblocks/container"]="generateblocks/container""] > .block-editor-block-list__block-edit { |
| 74 | margin: 0; |
| 75 | } |
| 76 | |
| 77 | .block-editor-block-list__layout .block-editor-block-list__block[data-type="generateblocks/container"]="generateblocks/container""] { |
| 78 | padding: 0; |
| 79 | box-sizing: border-box; |
| 80 | } |
| 81 | |
| 82 | .gblocks-bg-image-wrapper { |
| 83 | display: flex; |
| 84 | |
| 85 | .components-base-control, |
| 86 | .components-base-control__field { |
| 87 | margin: 0; |
| 88 | } |
| 89 | |
| 90 | & > .components-base-control { |
| 91 | flex-grow: 1; |
| 92 | } |
| 93 | |
| 94 | .components-button { |
| 95 | line-height: inherit; |
| 96 | height: 100%; |
| 97 | } |
| 98 | } |
| 99 | |
| 100 | .components-gblocks-control__image-sizes { |
| 101 | margin-bottom: 24px; |
| 102 | |
| 103 | button { |
| 104 | margin: 0 5px 5px 0; |
| 105 | } |
| 106 | } |
| 107 | |
| 108 | .wp-block[data-type="generateblocks/container"]="generateblocks/container""] { |
| 109 | margin-top: 0; |
| 110 | margin-bottom: 0; |
| 111 | } |
| 112 | |
| 113 | .gb-container .wp-block-image { |
| 114 | margin-top: 0; |
| 115 | margin-bottom: 0; |
| 116 | } |
| 117 | |
| 118 | /* Shape divider */ |
| 119 | .gb-container .gb-shape { |
| 120 | position: absolute; |
| 121 | overflow: hidden; |
| 122 | line-height: 0; |
| 123 | pointer-events: none; |
| 124 | |
| 125 | svg { |
| 126 | fill: currentColor; |
| 127 | } |
| 128 | } |
| 129 | |
| 130 | .gblocks-add-new-shape { |
| 131 | margin-top: 10px; |
| 132 | } |
| 133 | |
| 134 | .gblocks-shape-controls { |
| 135 | width: 100%; |
| 136 | |
| 137 | & > .components-base-control { |
| 138 | margin-bottom: 20px; |
| 139 | } |
| 140 | |
| 141 | .gblocks-edit-shape { |
| 142 | display: block; |
| 143 | width: 100%; |
| 144 | text-align: left; |
| 145 | } |
| 146 | |
| 147 | .gblocks-shape-chooser { |
| 148 | margin: 0; |
| 149 | |
| 150 | li { |
| 151 | margin: 5px 0; |
| 152 | |
| 153 | button.components-button { |
| 154 | width: 100%; |
| 155 | height: auto; |
| 156 | background: #efefef; |
| 157 | |
| 158 | svg { |
| 159 | width: 100%; |
| 160 | } |
| 161 | |
| 162 | &:hover { |
| 163 | background: #efefef; |
| 164 | } |
| 165 | |
| 166 | &.gblocks-shape-is-active { |
| 167 | box-shadow: 0 0 0 3px #007cba; |
| 168 | } |
| 169 | } |
| 170 | } |
| 171 | } |
| 172 | } |
| 173 | |
| 174 | .gblocks-shape-divider-preview { |
| 175 | padding: 10px; |
| 176 | |
| 177 | svg { |
| 178 | fill: currentColor; |
| 179 | } |
| 180 | } |
| 181 | |
| 182 | .gblocks-shape-toggle-preview { |
| 183 | margin-right: 10px; |
| 184 | |
| 185 | svg { |
| 186 | width: 30px; |
| 187 | } |
| 188 | } |
| 189 | |
| 190 | .gblocks-shape-container { |
| 191 | display: flex; |
| 192 | align-items: center; |
| 193 | margin-bottom: 10px; |
| 194 | border: 1px solid #efefef; |
| 195 | border-radius: 3px; |
| 196 | |
| 197 | .components-dropdown { |
| 198 | margin-left: auto; |
| 199 | } |
| 200 | |
| 201 | .components-button.gblocks-shape-dropdown, |
| 202 | .components-button.gblocks-remove-shape { |
| 203 | justify-content: center; |
| 204 | |
| 205 | & > svg { |
| 206 | margin-right: 0; |
| 207 | } |
| 208 | } |
| 209 | } |
| 210 | |
| 211 | .components-popover.gblocks-shapes-dropdown .components-popover__content { |
| 212 | min-width: 260px; |
| 213 | } |
| 214 | |
| 215 | /* GPress content width */ |
| 216 | .gblocks-gpress-full-width .components-base-control__label { |
| 217 | display: block; |
| 218 | } |
| 219 | |
| 220 | /* Flex Controls */ |
| 221 | .gblocks-flex-controls-inner { |
| 222 | display: flex; |
| 223 | |
| 224 | & > .components-base-control { |
| 225 | margin-bottom: 0; |
| 226 | |
| 227 | &:nth-child(1) { |
| 228 | margin-right: 1px; |
| 229 | flex-basis: 25%; |
| 230 | } |
| 231 | |
| 232 | &:nth-child(2) { |
| 233 | margin-right: 1px; |
| 234 | flex-basis: 25%; |
| 235 | } |
| 236 | |
| 237 | &:nth-child(3) { |
| 238 | flex-basis: 50%; |
| 239 | } |
| 240 | } |
| 241 | |
| 242 | p { |
| 243 | margin-bottom: 0; |
| 244 | } |
| 245 | |
| 246 | .gblocks-flex-basis-wrapper { |
| 247 | position: relative; |
| 248 | |
| 249 | .components-gblocks-units-control-header__units { |
| 250 | position: absolute; |
| 251 | right: 0; |
| 252 | top: 5px; |
| 253 | } |
| 254 | } |
| 255 | } |
| 256 | |
| 257 | .gb-container-empty { |
| 258 | padding: 5px; |
| 259 | position: relative; |
| 260 | |
| 261 | &.gb-container-visual-guides { |
| 262 | &:before { |
| 263 | content: ""; |
| 264 | position: absolute; |
| 265 | top: 0.5px; |
| 266 | right: 0.5px; |
| 267 | bottom: 0.5px; |
| 268 | left: 0.5px; |
| 269 | border: 1px dashed #000; |
| 270 | box-shadow: inset 0 0 0 1px #fff; |
| 271 | opacity: 0.2; |
| 272 | transition: opacity 500ms ease; |
| 273 | } |
| 274 | |
| 275 | &:hover:before { |
| 276 | opacity: 0.3; |
| 277 | } |
| 278 | } |
| 279 | } |
| 280 | |
| 281 | .gb-container { |
| 282 | .block-editor-block-list__layout { |
| 283 | .block-list-appender { |
| 284 | margin: 0; |
| 285 | |
| 286 | &:not(:first-child):not(:empty) { |
| 287 | margin-top: 10px; |
| 288 | } |
| 289 | } |
| 290 | } |
| 291 | } |
| 292 | |
| 293 | .components-button.gblocks-container-selector { |
| 294 | width: 100%; |
| 295 | display: block; |
| 296 | text-align: left; |
| 297 | color: inherit; |
| 298 | padding: 5px; |
| 299 | border: 1px solid transparent; |
| 300 | |
| 301 | .gblocks-container-selector__icon { |
| 302 | background: #fff; |
| 303 | opacity: 0.3; |
| 304 | display: inline-flex; |
| 305 | height: 25px; |
| 306 | width: 25px; |
| 307 | align-items: center; |
| 308 | justify-content: center; |
| 309 | border-radius: 2px; |
| 310 | transition: opacity 500ms ease; |
| 311 | |
| 312 | svg { |
| 313 | transform: scale(0.7); |
| 314 | |
| 315 | path { |
| 316 | fill: #000; |
| 317 | } |
| 318 | } |
| 319 | } |
| 320 | |
| 321 | &:hover { |
| 322 | .gblocks-container-selector__icon { |
| 323 | opacity: 0.4; |
| 324 | } |
| 325 | } |
| 326 | } |
| 327 | |
| 328 | .gb-container > .gb-inside-container > .block-editor-inner-blocks > .block-editor-block-list__layout > .block-list-appender .block-editor-button-block-appender { |
| 329 | background: unset; |
| 330 | color: #000; |
| 331 | box-shadow: inset 0 0 0 1px #fff; |
| 332 | border: 1px solid #000; |
| 333 | padding: 5px 12px; |
| 334 | |
| 335 | svg path { |
| 336 | fill: #000; |
| 337 | stroke: #fff; |
| 338 | stroke-width: 2px; |
| 339 | paint-order: stroke; |
| 340 | } |
| 341 | } |
| 342 |