Opened 7 weeks ago
Closed 5 weeks ago
#63381 closed defect (bug) (fixed)
Simplify gradient color specifications from rgba to rgb in theme.json
Reported by: |
|
Owned by: |
|
---|---|---|---|
Milestone: | 6.9 | Priority: | normal |
Severity: | minor | Version: | trunk |
Component: | Editor | Keywords: | has-patch has-unit-tests commit |
Focuses: | coding-standards | Cc: |
Description
Pushed through to Gutenberg via https://github.com/WordPress/gutenberg/pull/70008 however that file does not sync to core, so doing a standalone ticket here.
linked gh pr incoming in lieu of a .patch file
Change History (3)
This ticket was mentioned in PR #8766 on WordPress/wordpress-develop by @georgestephanis.
7 weeks ago
#1
- Keywords has-unit-tests added
Note: See
TracTickets for help on using
tickets.
Currently, the theme.json that ships in core at wp-includes/theme.json default gradients are inconsistent in color specification -- a number of places it uses rgba(#,#,#,1) even though that is equivalent to just rgb(#,#,#) -- there is no rhyme or reason I can see as to why rgba is used here, so this is to trim a couple bytes by serving them up as rgb instead of rgba.
As there is no transparency here, it may be slightly more efficient to use hex? But I'm fine leaving it as RGB for less code churn in core unless anyone feels strongly here.
More discussion in the Gutenberg repository, but it was merged there and recommended to be made as a core ticket by @t-hamano
@link https://github.com/WordPress/gutenberg/pull/70008