Opened 16 months ago
Closed 16 months ago
#63381 closed defect (bug) (fixed)
Simplify gradient color specifications from rgba to rgb in theme.json
| Reported by: | georgestephanis | Owned by: | georgestephanis |
|---|---|---|---|
| Priority: | normal | Milestone: | 6.9 |
| Component: | Editor | Version: | 6.9 |
| Severity: | minor | Keywords: | has-patch has-unit-tests commit |
| Cc: | Focuses: | coding-standards |
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)
Note:
See TracTickets
for help on using tickets.
![(please configure the [header_logo] section in trac.ini)](/chrome/site/your_project_logo.png)
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