Make WordPress Core

Changeset 58198


Ignore:
Timestamp:
05/26/2024 08:30:51 AM (6 months ago)
Author:
karmatosed
Message:

Twenty Nineteen: Make h1 consistent for entry title.

The h1 for entry-title was not the same between the editor and front end. This fixes that in the by setting wp-block-post-title font sizes together with h2 and combines post-section-dash mixin for both h1 and h2.

Props sabernhardt, nkeller15, shailu25.
Fixes #58440.

Location:
trunk/src/wp-content/themes/twentynineteen
Files:
2 edited

Legend:

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

    r58178 r58198  
    686686}
    687687
    688 h1:before {
    689   background: #767676;
    690   content: "\020";
    691   display: block;
    692   height: 2px;
    693   margin: 1rem 0;
    694   width: 1em;
    695 }
    696 
    697 h1.has-text-align-center:before {
    698   margin-left: auto;
    699   margin-right: auto;
    700 }
    701 
    702 h1.has-text-align-right:before {
    703   margin-left: auto;
    704 }
    705 
    706688@media only screen and (min-width: 768px) {
    707689  h1 {
     
    710692}
    711693
     694.wp-block-post-title,
    712695h2 {
    713696  font-size: 1.6875em;
    714697}
    715698
     699@media only screen and (min-width: 768px) {
     700  .wp-block-post-title,
     701  h2 {
     702    font-size: 2.25em;
     703  }
     704}
     705
     706h1:before,
    716707h2:before {
    717708  background: #767676;
     
    723714}
    724715
     716h1.has-text-align-center:before,
    725717h2.has-text-align-center:before {
    726718  margin-left: auto;
     
    728720}
    729721
     722h1.has-text-align-right:before,
    730723h2.has-text-align-right:before {
    731724  margin-left: auto;
    732 }
    733 
    734 @media only screen and (min-width: 768px) {
    735   h2 {
    736     font-size: 2.25em;
    737   }
    738725}
    739726
  • trunk/src/wp-content/themes/twentynineteen/style-editor.scss

    r58178 r58198  
    120120h1 {
    121121    font-size: $font__size-xl;
    122     @include post-section-dash;
    123122
    124123    @include media(tablet) {
     
    127126}
    128127
     128.wp-block-post-title,
    129129h2 {
    130130    font-size: $font__size-lg;
    131     @include post-section-dash;
    132131
    133132    @include media(tablet) {
    134133        font-size: $font__size-xl;
    135134    }
     135}
     136
     137h1,
     138h2 {
     139    @include post-section-dash;
    136140}
    137141
Note: See TracChangeset for help on using the changeset viewer.