Make WordPress Core


Ignore:
Timestamp:
01/18/2019 06:37:26 PM (8 years ago)
Author:
laurelfulford
Message:

Twenty Nineteen: Use a less aggressive approach for non-latin font fallbacks.

The theme's original approach to its non-latin font fallbacks required !important, which overrode fonts that shouldn't have been changed, like the icon fonts used for editor buttons.

Props kjellr, mako09, allancole.
Fixes #45731.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/wp-content/themes/twentynineteen/style-editor.scss

    r44305 r44650  
    7979body {
    8080        font-size: $font__size_base;
    81         font-family: $font__body;
     81        @include font-family( $font__body );
    8282        line-height: $font__line-height-body;
    8383        color: $color__text-main;
     
    9494h5,
    9595h6 {
    96         font-family: $font__heading;
     96        @include font-family( $font__heading );
    9797        font-weight: 700;
    9898}
     
    190190figcaption,
    191191.gallery-caption {
    192         font-family: $font__heading;
     192        @include font-family( $font__heading );
    193193        font-size: $font__size-xs;
    194194        line-height: 1.6;
     
    211211
    212212        .editor-post-title__input {
    213                 font-family: $font__heading;
     213                @include font-family( $font__heading );
    214214                font-size: $font__size-xxl;
    215215                font-weight: 700;
     
    220220
    221221.editor-default-block-appender .editor-default-block-appender__content {
    222         font-family: $font__body;
     222        @include font-family( $font__body );
    223223        font-size: $font__size_base;
    224224}
     
    236236
    237237        &.has-drop-cap:not(:focus)::first-letter {
    238                 font-family: $font__heading;
     238                @include font-family( $font__heading );
    239239                font-size: $font__size-xxxl;
    240240                line-height: 1;
     
    247247
    248248.wp-block-table {
    249         font-family: $font__heading;
     249        @include font-family( $font__heading );
    250250}
    251251
     
    256256        h2,
    257257        .wp-block-cover-text {
    258                 font-family: $font__heading;
     258                @include font-family( $font__heading );
    259259                font-size: $font__size-lg;
    260260                font-weight: bold;
     
    357357        .wp-block-button__link {
    358358                line-height: 1.8;
    359                 font-family: $font__heading;
     359                @include font-family( $font__heading );
    360360                font-size: $font__size-sm;
    361361                font-weight: bold;
     
    412412        footer,
    413413        .wp-block-quote__citation {
    414                 font-family: $font__heading;
     414                @include font-family( $font__heading );
    415415                font-size: $font__size-xs;
    416416                line-height: 1.6;
     
    483483
    484484        .wp-block-pullquote__citation {
    485                 font-family: $font__heading;
     485                @include font-family( $font__heading );
    486486                font-size: $font__size-xs;
    487487                line-height: 1.6;
     
    532532
    533533.wp-block-file {
    534         font-family: $font__heading;
     534        @include font-family( $font__heading );
    535535
    536536        .wp-block-file__textlink {
     
    626626        li {
    627627                color: $color__text-light;
    628                 font-family: $font__heading;
     628                @include font-family( $font__heading );
    629629                font-size: calc(#{$font__size_base} * #{$font__size-ratio});
    630630                font-weight: bold;
     
    687687
    688688        .wp-block-latest-comments__comment-meta {
    689                 font-family: $font__heading;
     689                @include font-family( $font__heading );
    690690                font-weight: bold;
    691691
     
    713713                color: $color__text-light;
    714714                font-size: $font__size-xs;
    715                 font-family: $font__heading;
     715                @include font-family( $font__heading );
    716716                line-height: $font__line-height-pre;
    717717                margin: 0;
     
    731731
    732732                cite {
    733                         font-family: $font__heading;
     733                        @include font-family( $font__heading );
    734734                        font-size: $font__size-xs;
    735735                        font-style: normal;
     
    739739        }
    740740}
    741 
    742 /* Make sure our non-latin font overrides don't overwrite the iconfont used in the classic editor toolbar */
    743 .wp-block[data-type="core/freeform"] .mce-btn i {
    744         font-family: dashicons !important;
    745 }
Note: See TracChangeset for help on using the changeset viewer.