-
Notifications
You must be signed in to change notification settings - Fork 22.4k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
rgba() is not necessarily legacy. #32735
Conversation
rgba() is an alias for rgb().
Preview URLs
(comment last updated: 2024-03-21 02:55:03) |
Thanks, Estelle - taking a look now 👀 |
files/en-us/web/accessibility/understanding_colors_and_luminance/index.md has a couple of places to fix: L69: /* legacy rgba notation */
color: rgba(100%, 0%, 100%, 100%);
color: rgba(255, 0, 255, 1); L96 has a broken xref and uses "legacy" wording (maybe you have better phrasing for this): -The examples also show the legacy [`rgba()`](/en-US/docs/Web/CSS/color_value/rgb#legacy_syntax_rgba) syntax. The older syntax for color functions was comma-separated, with separate functions for when the alpha channel was included. New color functions only have one syntax with space-separated (rather than comma-separated) values, with the alpha channel, if present, being preceded by a slash.
+The examples also show the [`rgba()`](/en-US/docs/Web/CSS/color_value/rgb#rgba_syntax) syntax which is an alias for `rgb()`- it accepts the same parameters and behaves the same way. The legacy syntax for color functions is comma-separated and relies on using separate functions when you need to use the alpha channel. New color functions use space-separated values, and a slash precedes an optional alpha channel. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks Estelle! A couple of comments for you to consider 🙌🏻
files/en-us/web/accessibility/understanding_colors_and_luminance/index.md
Show resolved
Hide resolved
There's two other places saying "legacy <rgba()>", we might want to get those, too: In CSS Values and Units (files/en-us/web/css/css_values_and_units/index.md):
In /* <rgb()> values and legacy <rgba()> values*/
color: rgb(34, 12, 64, 0.6);
color: rgba(34, 12, 64, 0.6);
color: rgb(34 12 64 / 0.6);
color: rgba(34 12 64 / 0.6);
color: rgb(34.6 12 64 / 60%);
color: rgba(34.6 12 64 / 60%); I don't know if something like this helps, it would be nice to use the same format for the rest of the functions (we can do in a follow-up if we decide on a good format for this code block): /* <rgb()> and <rgba()> values*/
color: rgb(34 12 64);
/* with an alpha channel */
color: rgb(34.6 12 64 / 60%);
color: rgba(34.6 12 64 / 60%);
/* legacy comma-separated syntax */
color: rgb(34, 12, 64, 0.6);
color: rgba(34, 12, 64, 0.6); What do you think? |
Thanks, Estelle, two files for us to check with 'legacy' wording, but passing it back over to you to have a look! |
rgba() is an alias for rgb().
the example isn't using the legacy syntax of using commas, so i updated the text, title, and live sample function call to remove the "legacy" lingo.