Make WordPress Core

Ticket #61904: 61904.patch

File 61904.patch, 11.7 KB (added by pitamdey, 16 months ago)

After applying this solution the issue is resolved

  • wp-content/themes/twentynineteen/sass/blocks/_blocks.scss

     
    11/* !Block styles */
    22
    3 
    43// Default block margin and alignment rules.
    54// These are replicated inside of the Group block
    65// so that child blocks in there appear the same way.
     
    3029
    3130        &.alignfull {
    3231                position: relative;
    33                 left: -#{$size__spacing-unit };
    34                 width: calc( 100% + (2 * #{$size__spacing-unit}));
    35                 max-width: calc( 100% + (2 * #{$size__spacing-unit}));
     32                left: -#{$size__spacing-unit};
     33                width: calc(100% + (2 * #{$size__spacing-unit}));
     34                max-width: calc(100% + (2 * #{$size__spacing-unit}));
    3635                clear: both;
    3736
    3837                @include media(tablet) {
    3938                        margin-top: calc(2 * #{$size__spacing-unit});
    4039                        margin-bottom: calc(2 * #{$size__spacing-unit});
    41                         left: calc( -12.5% - 75px );
    42                         width: calc( 125% + 150px );
    43                         max-width: calc( 125% + 150px );
     40                        left: calc(-12.5% - 75px);
     41                        width: calc(125% + 150px);
     42                        max-width: calc(125% + 150px);
    4443                }
    4544        }
    4645
     
    9190
    9291.entry .entry-content > *,
    9392.entry .entry-summary > * {
    94 
    9593        > *:first-child {
    9694                margin-top: 0;
    9795        }
     
    108106 */
    109107.entry .entry-content,
    110108.entry .entry-summary {
    111 
    112109        .entry-content,
    113110        .entry-summary,
    114111        .entry {
     
    125122}
    126123
    127124.entry .entry-content {
    128 
    129125        //! Paragraphs
    130126        p.has-background {
    131127                padding: 20px 30px;
     
    133129
    134130        //! Audio
    135131        .wp-block-audio {
    136 
    137132                width: 100%;
    138133
    139134                audio {
     
    142137
    143138                &.alignleft audio,
    144139                &.alignright audio {
    145 
    146140                        max-width: (0.33 * $mobile_width);
    147141
    148142                        @include media(tablet) {
     
    157151
    158152        //! Video
    159153        .wp-block-video {
    160 
    161154                video {
    162155                        width: 100%;
    163156                }
     
    165158
    166159        //! Button
    167160        .wp-block-button {
    168 
    169161                .wp-block-button__link {
    170162                        @include button-transition;
    171163                        border: none;
    172164                        font-size: $font__size-sm;
    173                         @include font-family( $font__heading );
     165                        @include font-family($font__heading);
    174166                        line-height: $font__line-height-heading;
    175167                        box-sizing: border-box;
    176168                        font-weight: bold;
    177169                        text-decoration: none;
    178                         padding: ($size__spacing-unit * .76) $size__spacing-unit;
     170                        padding: ($size__spacing-unit * 0.76) $size__spacing-unit;
    179171                        outline: none;
    180172                        outline: none;
    181173
     
    239231                list-style: none;
    240232
    241233                li > a {
    242                         @include font-family( $font__heading );
     234                        @include font-family($font__heading);
    243235                        font-size: calc(#{$font__size_base} * #{$font__size-ratio});
    244236                        font-weight: bold;
    245237                        line-height: $font__line-height-heading;
     
    249241
    250242        .wp-block-archives,
    251243        .wp-block-categories {
    252 
    253244                &.aligncenter {
    254245                        text-align: center;
    255246                }
     
    257248
    258249        //! Latest categories
    259250        .wp-block-categories {
    260 
    261251                ul {
    262                         padding-top: ( .75 * $size__spacing-unit );
     252                        padding-top: (0.75 * $size__spacing-unit);
    263253                }
    264254
    265255                li ul {
     
    272262
    273263        //! Latest posts
    274264        .wp-block-latest-posts {
    275 
    276265                .wp-block-latest-posts__post-date {
    277                         @include font-family( $font__heading );
     266                        @include font-family($font__heading);
    278267                        font-size: $font__size-xs;
    279268                        color: $color__text-light;
    280269                        line-height: 1.2;
     
    287276                }
    288277
    289278                li {
    290                         padding-bottom: ( .5 * $size__spacing-unit );
     279                        padding-bottom: (0.5 * $size__spacing-unit);
    291280
    292281                        &.menu-item-has-children,
    293282                        &:last-child {
     
    295284                        }
    296285
    297286                        :not(:last-child) .wp-block-latest-posts__post-excerpt {
    298                                 padding-bottom: ( .5 * $size__spacing-unit );
     287                                padding-bottom: (0.5 * $size__spacing-unit);
    299288                        }
    300289                }
    301290
     
    305294                        margin-bottom: (2 * $size__spacing-unit);
    306295                        a {
    307296                                &:after {
    308                                         content: '';
     297                                        content: "";
    309298                                }
    310299                        }
    311300                        &:last-child {
    312301                                margin-bottom: auto;
    313302                                a:after {
    314                                         content: '';
     303                                        content: "";
    315304                                }
    316305                        }
    317306                }
     
    326315
    327316        //! Verse
    328317        .wp-block-verse {
    329                 @include font-family( $font__body );
     318                @include font-family($font__body);
    330319                font-size: $font__size_base;
    331320                line-height: 1.8;
    332321        }
     
    334323        //! Paragraphs
    335324        .has-drop-cap {
    336325                &:not(:focus):first-letter {
    337                         @include font-family( $font__heading );
     326                        @include font-family($font__heading);
    338327                        font-size: $font__size-xxxl;
    339328                        line-height: 1;
    340329                        font-weight: bold;
    341330                        margin: 0 0.25em 0 0;
    342331
    343                         @-moz-document url-prefix()  {
     332                        @-moz-document url-prefix() {
    344333                                & {
    345334                                        margin-top: 0.2em;
    346335                                }
     
    357346
    358347                blockquote {
    359348                        border: none;
    360                         margin-top: calc(4 * #{ $size__spacing-unit});
    361                         margin-bottom: calc(4.33 * #{ $size__spacing-unit});
     349                        margin-top: calc(4 * #{$size__spacing-unit});
     350                        margin-bottom: calc(4.33 * #{$size__spacing-unit});
    362351                        margin-right: 0;
    363352                        padding-left: 0;
    364353                }
     
    381370
    382371                cite {
    383372                        display: inline-block;
    384                         @include font-family( $font__heading );
     373                        @include font-family($font__heading);
    385374                        line-height: 1.6;
    386375                        text-transform: none;
    387376                        color: $color__text-light;
     
    464453
    465454                        &.alignright,
    466455                        &.alignleft {
    467 
    468456                                @include media(tablet) {
    469457                                        padding: $size__spacing-unit calc(2 * #{$size__spacing-unit});
    470458                                }
     
    471459                        }
    472460
    473461                        &.alignfull {
    474 
    475462                                @include media(tablet) {
    476463                                        padding-left: calc(10% + 58px + (2 * #{$size__spacing-unit}));
    477464                                        padding-right: calc(10% + 58px + (2 * #{$size__spacing-unit}));
     
    482469
    483470        //! Blockquote
    484471        .wp-block-quote {
    485 
    486472                &:not(.is-large),
    487473                &:not(.is-style-large) {
    488474                        border-width: 2px;
     
    545531                        display: block;
    546532                }
    547533
    548                 // If an image does not have a left/center/right alignment, 
    549                 // it's a direct child of .wp-block-image.  If it has no other 
    550                 // alignment added, we want to make sure the image and its 
     534                // If an image does not have a left/center/right alignment,
     535                // it's a direct child of .wp-block-image.  If it has no other
     536                // alignment added, we want to make sure the image and its
    551537                // caption do not extend beyond the width of the text column.
    552538                &:not(.alignwide):not(.alignfull) > img,
    553539                &:not(.alignwide):not(.alignfull) > a > img,
     
    557543                }
    558544
    559545                .aligncenter {
    560 
    561546                        @include postContentMaxWidth();
    562547
    563548                        @include media(tablet) {
     
    580565
    581566                &.alignfull img {
    582567                        width: 100vw;
    583                         max-width: calc( 100% + (2 * #{$size__spacing-unit}));
     568                        max-width: calc(100% + (2 * #{$size__spacing-unit}));
    584569
    585570                        @include media(tablet) {
    586                                 max-width: calc( 125% + 150px );
     571                                max-width: calc(125% + 150px);
    587572                                margin-left: auto;
    588573                                margin-right: auto;
    589574                        }
     
    604589                .wp-block-cover-image-text,
    605590                .wp-block-cover-text,
    606591                h2 {
    607                         @include font-family( $font__heading );
     592                        @include font-family($font__heading);
    608593                        font-size: $font__size-lg;
    609594                        font-weight: bold;
    610595                        line-height: 1.25;
     
    627612                }
    628613
    629614                &.alignfull {
    630 
    631615                        .wp-block-cover-image-text,
    632616                        .wp-block-cover-text,
    633617                        h2 {
     
    669653        .wp-block-gallery .blocks-gallery-image figcaption,
    670654        .wp-block-gallery .blocks-gallery-item figcaption {
    671655                font-size: $font__size-xs;
    672                 @include font-family( $font__heading );
     656                @include font-family($font__heading);
    673657                line-height: $font__line-height-pre;
    674658                margin: 0;
    675                 padding: ( $size__spacing-unit * .5 );
     659                padding: ($size__spacing-unit * 0.5);
    676660                text-align: center;
    677661        }
    678662
     
    721705                 * is followed by an H1, or H2 */
    722706                & + h1,
    723707                & + h2 {
    724 
    725708                        &:before {
    726709                                display: none;
    727710                        }
     
    735718
    736719        //! Table
    737720        .wp-block-table {
    738 
    739721                th,
    740722                td {
    741723                        border-color: $color__text-light;
     
    744726
    745727        //! File
    746728        .wp-block-file {
    747                 @include font-family( $font__heading );
     729                @include font-family($font__heading);
    748730
    749731                .wp-block-file__button {
    750732                        display: table;
     
    753735                        border-radius: 5px;
    754736                        background: $color__background-button;
    755737                        font-size: $font__size-base;
    756                         @include font-family( $font__heading );
     738                        @include font-family($font__heading);
    757739                        line-height: $font__line-height-heading;
    758740                        text-decoration: none;
    759741                        font-weight: bold;
    760                         padding: ($size__spacing-unit * .75) $size__spacing-unit;
     742                        padding: ($size__spacing-unit * 0.75) $size__spacing-unit;
    761743                        color: #fff;
    762744                        margin-left: 0;
    763745                        margin-top: calc(0.75 * #{$size__spacing-unit});
     
    764746
    765747                        @include media(desktop) {
    766748                                font-size: $font__size-base;
    767                                 padding: ($size__spacing-unit * .875) ($size__spacing-unit * 1.5);
     749                                padding: ($size__spacing-unit * 0.875) ($size__spacing-unit * 1.5);
    768750                        }
    769751
    770752                        &:hover {
     
    793775
    794776        //! Columns
    795777        .wp-block-columns {
    796 
    797778                .wp-block-column > * {
    798 
    799779                        &:first-child {
    800780                                margin-top: 0;
    801781                        }
     
    810790                .wp-block-image:not(.alignwide):not(.alignfull) > a > img,
    811791                .wp-block-image > img:not(.alignwide):not(.alignfull),
    812792                .wp-block-image > figure {
    813 
    814793                        @include media(tablet) {
    815794                                max-width: 100%;
    816795                        }
     
    831810
    832811        //! Group
    833812        .wp-block-group {
    834 
    835                 // When the Group block is standard/wide, we need to prevent full-aligned
     813                // When the Group block is standard/wide, we need to prevent full-aligned
    836814                // child blocks from expanding out of their container.
    837815                &:not(.alignfull) > .wp-block-group__inner-container > .alignfull,
    838816                &:not(.alignfull) > .wp-block-group__inner-container > .wp-block-image > img {
    839 
    840817                        @include media(tablet) {
    841818                                left: 0;
    842819                                max-width: 100%;
     
    845822
    846823                // The full-width Group block's inner container should mimic .entry-content styles.
    847824                &.alignfull > .wp-block-group__inner-container {
    848                         max-width: calc(100% - (2 * #{ $size__spacing-unit }));
     825                        max-width: calc(100% - (2 * #{$size__spacing-unit}));
    849826                        margin: 0 $size__spacing-unit;
    850827
    851828                        @include media(tablet) {
     
    863840
    864841                        // Remove the top and bottom margins of inner blocks.
    865842                        .wp-block-group__inner-container {
    866 
    867843                                > *:first-child {
    868844                                        margin-top: 0;
    869845                                }
     
    873849                                }
    874850                        }
    875851
    876                         // If the Group block is full-width, it does not need this extra padding. 
     852                        // If the Group block is full-width, it does not need this extra padding.
    877853                        &.alignfull {
    878854                                padding-left: 0;
    879855                                padding-right: 0;
     
    888864                        &:not(.alignfull) > .wp-block-group__inner-container > .alignfull {
    889865                                width: 100%;
    890866                                max-width: 100%;
    891                                
     867
    892868                                @include media(tablet) {
    893                                         width: calc( 100% + #{$size__spacing-unit * 2} );
    894                                         max-width: calc( 100% + #{$size__spacing-unit * 2} );
     869                                        width: calc(100% + #{$size__spacing-unit * 2});
     870                                        max-width: calc(100% + #{$size__spacing-unit * 2});
    895871                                        margin-left: -#{$size__spacing-unit};
    896872                                }
    897873                        }
    898874                }
    899                
    900875        }
    901876
    902877        //! Latest Comments
    903878        .wp-block-latest-comments {
    904 
    905879                .wp-block-latest-comments__comment-meta {
    906                         @include font-family( $font__heading );
     880                        @include font-family($font__heading);
    907881                        font-weight: bold;
    908882
    909883                        .wp-block-latest-comments__comment-date {
     
    918892                }
    919893
    920894                &.has-avatars {
    921 
    922895                }
    923896
    924897                &.has-dates {
    925 
    926898                        .wp-block-latest-comments__comment-date {
    927899                                font-size: $font__size-xs;
    928900                        }
     
    929901                }
    930902
    931903                &.has-excerpts {
    932 
    933904                }
    934905        }
    935906
     907        //! wp-block-social-links
     908        .wp-block-social-links .wp-block-social-link.wp-social-link .wp-block-social-link-anchor {
     909                text-decoration: none;
     910        }
     911
    936912        //! Font Sizes
    937913        .has-small-font-size {
    938914                font-size: $font__size-sm;
     
    955931        .has-secondary-background-color,
    956932        .has-dark-gray-background-color,
    957933        .has-light-gray-background-color {
    958 
    959934                // Use white text against these backgrounds by default.
    960935                color: $color__background-body;
    961936
     
    1009984
    1010985        .has-white-background-color,
    1011986        .wp-block-pullquote.is-style-solid-color.has-white-background-color {
    1012                 background-color: #FFF;
     987                background-color: #fff;
    1013988        }
    1014989
    1015990        //! Custom foreground colors
     
    10431018        .has-white-color,
    10441019        .wp-block-pullquote blockquote.has-white-color,
    10451020        .wp-block-pullquote.is-style-solid-color blockquote.has-white-color {
    1046                 color: #FFF;
     1021                color: #fff;
    10471022        }
    10481023}