Bug 56461 (rrggbbaa)
Summary: | Add #RRGGBBAA and #RGBA as options for color hex values in CSS | ||
---|---|---|---|
Product: | WebKit | Reporter: | Paul Neave <paul.neave> |
Component: | CSS | Assignee: | Nobody <webkit-unassigned> |
Status: | RESOLVED DUPLICATE | ||
Severity: | Enhancement | CC: | abecsi, mikelawther |
Priority: | P2 | ||
Version: | 528+ (Nightly build) | ||
Hardware: | All | ||
OS: | All |
Paul Neave
Currently the only way to specify a color with an alpha value is to use the rgba() syntax, such as:
.my-color {
color: rgba(255, 255, 255, 0.5); /* half white */
}
This can become very unwieldy to write. A more succinct syntax could extend the current format of #rgb or #rrggbb to include #rgba or #rrggbbaa like so:
.my-color {
color: #ffffff80; /* half white */
}
The browser could easily detect the difference between a 3 or 4 character hex value, or a 6 or 8 character hex value, and implement the alpha channel as appropriate.
Attachments | ||
---|---|---|
Add attachment proposed patch, testcase, etc. |
Mike Lawther
This is not in the spec.
Perhaps ask www-style@ for their opinion.
Andras Becsi
*** This bug has been marked as a duplicate of bug 39140 ***