WordPress.org

Make WordPress Core

Ticket #46778: 46778.patch

File 46778.patch, 3.8 KB (added by kjellr, 6 months ago)
  • src/wp-content/themes/twentythirteen/css/blocks.css

     
    404404        max-width: 100%;
    405405}
    406406
     407/* Group Block: Default Alignment */
     408
     409.wp-block-group,
     410.wp-block-group.has-background {
     411        margin-bottom: 24px;
     412}
     413
     414.wp-block-group:not(.alignfull):not(.alignwide) > * {
     415        width: 604px;
     416        max-width: 100%;
     417        margin-left: 0;
     418        margin-right: 0;
     419}
     420
     421.wp-block-group.has-background:not(.alignfull):not(.alignwide) > .alignfull {
     422        width: calc(100% + 60px);
     423        max-width: calc(100% + 60px);
     424        margin-left: -30px;
     425}
     426
     427.wp-block-group:not(.alignfull) .wp-block-columns.alignfull {
     428        margin-left: auto;
     429        margin-right: auto;
     430}
     431
     432/* Group Block: Wide Alignment */
     433
     434.wp-block-group.alignwide > *,
     435.wp-block-group.alignwide > .alignwide,
     436.wp-block-group.alignwide > .alignfull {
     437        max-width: 604px;
     438        margin-left: auto;
     439        margin-right: auto;
     440}
     441
     442.wp-block-group.alignwide > .alignwide,
     443.wp-block-group.alignwide > .alignfull {
     444        width: 100%;
     445        max-width: 100%;
     446}
     447
     448.wp-block-group.has-background.alignwide > .alignfull {
     449        width: calc(100% + 60px);
     450        max-width: calc(100% + 60px);
     451        margin-left: -30px;
     452}
     453
     454@media (max-width: 664px) {
     455        .wp-block-group:not(.has-background).alignwide {
     456                margin-left: 0;
     457                margin-right: 0;
     458        }
     459
     460        .wp-block-group:not(.has-background).alignwide > .alignwide,
     461        .wp-block-group:not(.has-background).alignwide > .alignfull {
     462                width: auto;
     463                max-width: 1600px;
     464                margin-left: calc(25% - 25vw);
     465                margin-right: calc(25% - 25vw);
     466        }
     467}
     468
     469/* Group Block: Full Alignment */
     470
     471@media (max-width: 664px) {
     472        .wp-block-group:not(.has-background).alignfull {
     473                margin-left: 0;
     474                margin-right: 0;
     475        }
     476
     477        .wp-block-group.has-background.alignfull > *:not(.alignfull) {
     478                margin-left: auto;
     479                margin-right: auto;
     480        }
     481}
     482
     483@media (min-width: 665px) {
     484        .wp-block-group.alignfull,
     485        .wp-block-group.has-background.alignfull {
     486                padding: 20px calc( (100vw - 604px ) / 2 ); /* Reproduces the padding of entry-content, so that default block rules apply properly inside of this block. */
     487        }
     488}
     489
     490@media (min-width: 1600px) {
     491        .wp-block-group.alignfull,
     492        .wp-block-group.has-background.alignfull {
     493                padding: 20px 498px; /* Above 1600px, these need fixed left/right padding. This works out to ((1600px - 604px) / 2) */
     494        }
     495}
     496
    407497/* Media & Text */
    408498
    409499.wp-block-media-text {
  • src/wp-content/themes/twentythirteen/css/editor-blocks.css

     
    361361        margin-bottom: 0;
    362362}
    363363
     364/* Group */
     365
     366.wp-block[data-type="core/group"] > .editor-block-list__block-edit > div > .wp-block-group > .editor-inner-blocks > .editor-block-list__layout > .wp-block {
     367        max-width: 634px;
     368}
     369
     370.wp-block[data-type="core/group"] > .editor-block-list__block-edit > div > .wp-block-group > .editor-inner-blocks > .editor-block-list__layout > .wp-block[data-align="wide"] {
     371        max-width: 1100px;
     372}
     373
     374.wp-block[data-type="core/group"] > .editor-block-list__block-edit > div > .wp-block-group > .editor-inner-blocks > .editor-block-list__layout > .wp-block[data-align="full"] {
     375        max-width: 100%;
     376}
     377
     378.wp-block[data-type="core/group"] > .editor-block-list__block-edit > div > .wp-block-group.has-background > .editor-inner-blocks > .editor-block-list__layout > .wp-block[data-align="full"] {
     379        max-width: calc(100% + 60px);
     380}
     381
    364382/*--------------------------------------------------------------
    3653837.0 Blocks - Widgets
    366384--------------------------------------------------------------*/