Make WordPress Core


Ignore:
Timestamp:
10/06/2024 11:35:49 PM (7 months ago)
Author:
peterwilsoncc
Message:

Tests/Build Tools: Update SCSS files to use new color functions.

Replaces deprecated color functions with their updated equivalents, see the deprecation documentation.

This results in four changes in the built files, hsl colors with a negative lightness value are replaced with the keyword black. These changes are harmless as they have no effect on the rendered colors.

Props aslamdoctor, veryard.
Fixes #62142.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/wp-admin/css/colors/_mixins.scss

    r48360 r59185  
    1010    &:hover,
    1111    &:focus {
    12         background: lighten( $button-color, 3% );
    13         border-color: darken( $button-color, 3% );
     12        background: color.adjust($button-color, $lightness: 3%);
     13        border-color: color.adjust($button-color, $lightness: -3%);
    1414        color: $button-text-color;
    1515    }
     
    2222
    2323    &:active {
    24         background: darken( $button-color, 5% );
    25         border-color: darken( $button-color, 5% );
     24        background: color.adjust($button-color, $lightness: -5%);
     25        border-color: color.adjust($button-color, $lightness: -5%);
    2626        color: $button-text-color;
    2727    }
     
    3232        background: $button-color;
    3333        color: $button-text-color;
    34         border-color: darken( $button-color, 15% );
    35         box-shadow: inset 0 2px 5px -3px darken( $button-color, 50% );
     34        border-color: color.adjust($button-color, $lightness: -15%);
     35        box-shadow: inset 0 2px 5px -3px color.adjust($button-color, $lightness: -50%);
    3636    }
    3737}
Note: See TracChangeset for help on using the changeset viewer.