Make WordPress Core

Ticket #57257: 57257.diff

File 57257.diff, 3.0 KB (added by naeemhaque, 3 years ago)

Fixes Twenty Twenty theme button block issue when alignment and width both are used.

  • src/wp-content/themes/twentytwenty/assets/css/editor-style-block.css

    diff --git a/src/wp-content/themes/twentytwenty/assets/css/editor-style-block.css b/src/wp-content/themes/twentytwenty/assets/css/editor-style-block.css
    index 18e8328107..8c849ae5a4 100644
    a b hr.wp-block-separator.is-style-dots::before { 
    935935        line-height: 1.25;
    936936        padding: 1.1em 1.44em;
    937937        text-transform: uppercase;
     938        width: 100%;
    938939}
    939940
    940941.editor-styles-wrapper .wp-block-button .wp-block-button__link.mce-content-body {
    hr.wp-block-separator.is-style-dots::before { 
    15151516
    15161517
    15171518}
     1519.wp-block-buttons .wp-block[data-align="left"] > .wp-block-button.wp-block-button__width-75,
     1520.wp-block-buttons .wp-block[data-align="center"] > .wp-block-button.wp-block-button__width-75,
     1521.wp-block-buttons .wp-block[data-align="right"] > .wp-block-button.wp-block-button__width-75{
     1522        width: calc(75% - var(--wp--style--block-gap, .5em)*0.25);
     1523}
     1524
     1525.wp-block-buttons .wp-block[data-align="left"] > .wp-block-button.wp-block-button__width-100,
     1526.wp-block-buttons .wp-block[data-align="center"] > .wp-block-button.wp-block-button__width-100,
     1527.wp-block-buttons .wp-block[data-align="right"] > .wp-block-button.wp-block-button__width-100{
     1528    width: calc(100% - var(--wp--style--block-gap, .5em)*0.25);
     1529}
     1530.wp-block-buttons .wp-block[data-align="left"] > .wp-block-button.wp-block-button__width-50,
     1531.wp-block-buttons .wp-block[data-align="center"] > .wp-block-button.wp-block-button__width-50,
     1532.wp-block-buttons .wp-block[data-align="right"] > .wp-block-button.wp-block-button__width-50{
     1533          width: calc(50% - var(--wp--style--block-gap, .5em)*0.25);
     1534}
     1535.wp-block-buttons .wp-block[data-align="left"] > .wp-block-button.wp-block-button__width-25,
     1536.wp-block-buttons .wp-block[data-align="center"] > .wp-block-button.wp-block-button__width-25,
     1537.wp-block-buttons .wp-block[data-align="right"] > .wp-block-button.wp-block-button__width-25{
     1538        width: calc(25% - var(--wp--style--block-gap, .5em)*0.25);
     1539}
  • src/wp-content/themes/twentytwenty/style.css

    diff --git a/src/wp-content/themes/twentytwenty/style.css b/src/wp-content/themes/twentytwenty/style.css
    index c2ac1eac06..244dd58531 100644
    a b h2.entry-title { 
    30263026
    30273027/* Block: Button ----------------------------- */
    30283028
     3029.wp-block-buttons > .wp-block-button {
     3030        float: none;
     3031        margin: 0;
     3032}
     3033.wp-block-buttons > .wp-block-button.alignright {
     3034        margin-left: auto;
     3035}
     3036.wp-block-buttons > .wp-block-button.aligncenter {
     3037        margin-left: auto;
     3038        margin-right: auto;
     3039}
     3040.wp-block-buttons > .wp-block-button.aligncenter.wp-block-button__width-50 {
     3041        width: calc(50% - (var(--wp--style--block-gap, 0.5em) * 0.5));
     3042}
     3043.wp-block-buttons > .wp-block-button.aligncenter.wp-block-button__width-75 {
     3044        width: calc(75% - (var(--wp--style--block-gap, 0.5em) * 0.5));
     3045}
     3046.wp-block-buttons > .wp-block-button.aligncenter.wp-block-button__width-100 {
     3047        width: 100%;
     3048}
     3049
    30293050.wp-block-button {
    30303051        margin: 3rem 0;
    30313052}