Skip to content

Commit 33e9b64

Browse files
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: * [WordPress/gutenberg#70008 #70008 Simplify color specifications from rgba to rgb] Follow-up to [50959], [55405]. Props georgestephanis, wildworks, juanfra. Fixes #63381. git-svn-id: https://develop.svn.wordpress.org/trunk@60234 602fd350-edb4-49c9-b593-d223f7449a82
1 parent 71b2dd2 commit 33e9b64

File tree

2 files changed

+7
-7
lines changed

2 files changed

+7
-7
lines changed

src/wp-includes/theme.json

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -65,7 +65,7 @@
6565
"gradients": [
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
},
7171
{
@@ -75,12 +75,12 @@
7575
},
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
},
8686
{
@@ -251,12 +251,12 @@
251251
{
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
]
262262
},

tests/phpunit/tests/theme/wpThemeJsonResolver.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1207,12 +1207,12 @@ public function test_theme_shadow_presets_do_not_override_default_shadow_presets
12071207
),
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
),
12181218
),

0 commit comments

Comments
 (0)