Make WordPress Core

Changeset 56036


Ignore:
Timestamp:
06/26/2023 03:48:23 PM (23 months ago)
Author:
audrasjb
Message:

Twenty Nineteen: Ensure Separator block supports theme colors in editor.

This fixes a bug in the Editor, where the Separator block did not support background color selections other than white and light gray.

Props nidhidhandhukiya, sabernhardt, shailu25, harshgajipara, mukesh27, costdev, zunaid321.
Fixes #58558.

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

Legend:

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

    r54106 r56036  
    12771277}
    12781278
     1279.wp-block-separator.has-primary-background-color {
     1280  color: #0073aa;
     1281  background-color: #0073aa;
     1282}
     1283
     1284.wp-block-separator.has-secondary-background-color {
     1285  color: #005177;
     1286  background-color: #005177;
     1287}
     1288
     1289.wp-block-separator.has-dark-gray-background-color {
     1290  color: #111;
     1291  background-color: #111;
     1292}
     1293
     1294.wp-block-separator.has-light-gray-background-color {
     1295  color: #767676;
     1296  background-color: #767676;
     1297}
     1298
     1299.wp-block-separator.has-white-background-color {
     1300  color: #fff;
     1301  background-color: #fff;
     1302}
     1303
    12791304/* Remove duplicate rule-line when a separator
    12801305 * is followed by an H1, or H2 */
  • trunk/src/wp-content/themes/twentynineteen/style-editor.scss

    r54106 r56036  
    651651        letter-spacing: calc(2 * #{$size__spacing-unit});
    652652        padding-left: calc(2 * #{$size__spacing-unit});
     653    }
     654
     655    &.has-primary-background-color {
     656        color: $color__link;
     657        background-color: $color__link;
     658    }
     659
     660    &.has-secondary-background-color {
     661        color: $color__border-link-hover;
     662        background-color: $color__border-link-hover;
     663    }
     664
     665    &.has-dark-gray-background-color {
     666        color: $color__text-main;
     667        background-color: $color__text-main;
     668    }
     669
     670    &.has-light-gray-background-color {
     671        color: $color__text-light;
     672        background-color: $color__text-light;
     673    }
     674
     675    &.has-white-background-color {
     676        color: #fff;
     677        background-color: #fff;
    653678    }
    654679}
Note: See TracChangeset for help on using the changeset viewer.