Skip to content
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

The "Formal syntax" section for rgb() is incorrect #8777

Closed
3 tasks done
yarusome opened this issue May 5, 2023 · 6 comments
Closed
3 tasks done

The "Formal syntax" section for rgb() is incorrect #8777

yarusome opened this issue May 5, 2023 · 6 comments
Labels
🐛 bug Something isn't working, or isn't working as expected macros tracking issues related to kumascript macros p2 We want to address this but may have other higher priority items.

Comments

@yarusome
Copy link
Contributor

yarusome commented May 5, 2023

Summary

The "Formal syntax" section only shows the legacy syntax of rgb(), and even the shown syntax is incorrect (i.e. lacks #).

URL

https://developer.mozilla.org/en-US/docs/Web/CSS/color_value/rgb#formal_syntax

Reproduction steps

  1. Navigate to the link above.
  2. Compare the syntax shown there and that in the spec.

Expected behavior

<rgb()> =
  rgb( [ <number> | <percentage> | none ]{3} [ / [<alpha-value> | none ] ]? )

Actual behavior

<rgb()> = 
  rgb( [ <percentage> | none ]{3} [ / [ <alpha-value> | none ] ]? )  |
  rgb( [ <number> | none ]{3} [ / [ <alpha-value> | none ] ]? )

Device

Desktop

Browser

Firefox

Browser version

Stable

Operating system

Windows

Screenshot

No response

Anything else?

  1. webref/css does contain the correct syntax on Line 826-854 in css-color.json.
  2. hsl(), which also has a legacy syntax, shows correctly.

Validations

@github-actions github-actions bot added the needs triage Triage needed by staff and/or partners. Automatically applied when an issue is opened. label May 5, 2023
@bsmth
Copy link
Member

bsmth commented Aug 18, 2023

This is defined here: https://github.com/mdn/data/blob/main/css/functions.json#L355

But I thought we were pulling this in from webref and no longer updating mdn/data, maybe I'm mistaken.

@bsmth
Copy link
Member

bsmth commented Aug 22, 2023

Actually I believe we're waiting to migrate webref to >=v6.0.0

edit: see https://github.com/mdn/yari/blob/main/kumascript/src/lib/css-syntax.ts

@yarusome
Copy link
Contributor Author

@bsmth I refrained from opening a PR for css-syntax.ts due to the complexity of its structure. Besides, I see that this script should probably be covered/superseded by openwebdocs/project#174.

@bsmth
Copy link
Member

bsmth commented Aug 23, 2023

I refrained from opening a PR for css-syntax.ts due to the complexity of its structure

I agree it's not easy to navigate this one, unfortunately.

@caugner
Copy link
Contributor

caugner commented Sep 28, 2023

@yarusome We have meanwhile updated to @webref/css v6 (although not yet to the latest version). Can you please check if the formal syntax is now "correct"?

@caugner caugner added 🐛 bug Something isn't working, or isn't working as expected p2 We want to address this but may have other higher priority items. macros tracking issues related to kumascript macros and removed needs triage Triage needed by staff and/or partners. Automatically applied when an issue is opened. labels Sep 28, 2023
@caugner
Copy link
Contributor

caugner commented Nov 21, 2023

It looks good to me now:

Image

So I'm going ahead and close this issue as resolved.

@caugner caugner closed this as completed Nov 21, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
🐛 bug Something isn't working, or isn't working as expected macros tracking issues related to kumascript macros p2 We want to address this but may have other higher priority items.
Projects
None yet
Development

No branches or pull requests

3 participants