Make WordPress Core

Changeset 60234


Ignore:
Timestamp:
05/13/2025 02:48:42 PM (5 weeks ago)
Author:
SergeyBiryukov
Message:

Coding Standards: Simplify gradient color specifications in theme.json.

rgba(#,#,#,1) is equivalent to rgb(#,#,#) and can be replaced with the latter for more consistency.

Original PR from Gutenberg repository:

Follow-up to [50959], [55405].

Props georgestephanis, wildworks, juanfra.
Fixes #63381.

Location:
trunk
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/wp-includes/theme.json

    r60217 r60234  
    6666                {
    6767                    "name": "Vivid cyan blue to vivid purple",
    68                     "gradient": "linear-gradient(135deg,rgba(6,147,227,1) 0%,rgb(155,81,224) 100%)",
     68                    "gradient": "linear-gradient(135deg,rgb(6,147,227) 0%,rgb(155,81,224) 100%)",
    6969                    "slug": "vivid-cyan-blue-to-vivid-purple"
    7070                },
     
    7676                {
    7777                    "name": "Luminous vivid amber to luminous vivid orange",
    78                     "gradient": "linear-gradient(135deg,rgba(252,185,0,1) 0%,rgba(255,105,0,1) 100%)",
     78                    "gradient": "linear-gradient(135deg,rgb(252,185,0) 0%,rgb(255,105,0) 100%)",
    7979                    "slug": "luminous-vivid-amber-to-luminous-vivid-orange"
    8080                },
    8181                {
    8282                    "name": "Luminous vivid orange to vivid red",
    83                     "gradient": "linear-gradient(135deg,rgba(255,105,0,1) 0%,rgb(207,46,46) 100%)",
     83                    "gradient": "linear-gradient(135deg,rgb(255,105,0) 0%,rgb(207,46,46) 100%)",
    8484                    "slug": "luminous-vivid-orange-to-vivid-red"
    8585                },
     
    252252                    "name": "Outlined",
    253253                    "slug": "outlined",
    254                     "shadow": "6px 6px 0px -3px rgba(255, 255, 255, 1), 6px 6px rgba(0, 0, 0, 1)"
     254                    "shadow": "6px 6px 0px -3px rgb(255, 255, 255), 6px 6px rgb(0, 0, 0)"
    255255                },
    256256                {
    257257                    "name": "Crisp",
    258258                    "slug": "crisp",
    259                     "shadow": "6px 6px 0px rgba(0, 0, 0, 1)"
     259                    "shadow": "6px 6px 0px rgb(0, 0, 0)"
    260260                }
    261261            ]
  • trunk/tests/phpunit/tests/theme/wpThemeJsonResolver.php

    r58797 r60234  
    12081208                array(
    12091209                    'name'   => 'Outlined',
    1210                     'shadow' => '6px 6px 0px -3px rgba(255, 255, 255, 1), 6px 6px rgba(0, 0, 0, 1)',
     1210                    'shadow' => '6px 6px 0px -3px rgb(255, 255, 255), 6px 6px rgb(0, 0, 0)',
    12111211                    'slug'   => 'outlined',
    12121212                ),
    12131213                array(
    12141214                    'name'   => 'Crisp',
    1215                     'shadow' => '6px 6px 0px rgba(0, 0, 0, 1)',
     1215                    'shadow' => '6px 6px 0px rgb(0, 0, 0)',
    12161216                    'slug'   => 'crisp',
    12171217                ),
Note: See TracChangeset for help on using the changeset viewer.