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

linear-gradient() Formal syntax is outdated #11483

Open
gibson042 opened this issue Jun 27, 2024 · 7 comments
Open

linear-gradient() Formal syntax is outdated #11483

gibson042 opened this issue Jun 27, 2024 · 7 comments
Labels
effort: medium This task is a medium effort. idle involves: Content Requires the attention of the Content team. p3 We don't have visibility when this will be addressed.

Comments

@gibson042
Copy link

gibson042 commented Jun 27, 2024

MDN URL

https://developer.mozilla.org/en-US/docs/Web/CSS/gradient/linear-gradient

What specific section or headline is this issue about?

Formal syntax

What information was incorrect, unhelpful, or incomplete?

The content appears to correspond with CSS Images Module Level 3 rather than the current CSS Images Module Level 4, and in particular is missing the <color-interpolation-method> = in [ <rectangular-color-space> | <polar-color-space> <hue-interpolation-method>? ] and <linear-color-stop> = <color> <color-stop-length>? and <color-stop-length> = <length-percentage>{1,2} productions that support color space interpolation and two-position color stops (which are used elsewhere on the page).

What did you expect to see?

Syntax defined in CSS Images Module Level 4, e.g.

<linear-gradient-syntax> =
  [ [ <angle> | to <side-or-corner> ] || <color-interpolation-method> ]? ,
  <color-stop-list>

<side-or-corner> = [left | right] || [top | bottom]

<color-interpolation-method> =
  in [ <rectangular-color-space> | <polar-color-space> <hue-interpolation-method>? ]

<color-stop-list> =
  <linear-color-stop> , [ <linear-color-hint>? , <linear-color-stop> ]#

<rectangular-color-space> =
  srgb | srgb-linear | display-p3 | a98-rgb | prophoto-rgb | rec2020 | lab |
  oklab | xyz | xyz-d50 | xyz-d65

<polar-color-space> = hsl | hwb | lch | oklch

<hue-interpolation-method> = [ shorter | longer | increasing | decreasing ] hue

<linear-color-stop> = <color> <color-stop-length>?

<linear-color-hint> = <length-percentage>

<color-stop-length> = <length-percentage>{1,2}

<length-percentage> = <length> | <percentage>

Do you have any supporting links, references, or citations?

As provided above:

Do you have anything more you want to share?

Related issues:

@gibson042 gibson042 added the needs triage Triage needed by staff and/or partners. Automatically applied when an issue is opened. label Jun 27, 2024
@Josh-Cena
Copy link
Member

Hi! Our format syntax is pulled from webref, and it seems they haven't updated yet: https://github.com/w3c/webref/blob/32a07580b0927359ef6ed62f72999e9e5fb86304/ed/css/css-images.json#L187 once they have the new syntax, MDN will update automatically.

@gibson042
Copy link
Author

gibson042 commented Jun 27, 2024

That css-images.json file is for CSS Images Module Level 3, as indicated on line 3. Its level 4 sibling file is already correct: https://github.com/w3c/webref/blob/32a07580b0927359ef6ed62f72999e9e5fb86304/ed/css/css-images-4.json#L172-L177

Cf. mdn/content#23718 (comment)

Based on the issue raised at CSSWG, this issue is caused by the spec link pointing to editor's draft of CSS Images Module without a specific level, which effectively points to the content of Level 3, but the double-position syntax is actually defined in Level 4.

@Josh-Cena
Copy link
Member

I see. Thanks for the additional context. If mdn/browser-compat-data#18699 already fixed the spec link, I'm unsure why the syntax is still from level 3.

@wbamberg
Copy link
Collaborator

I believe this is about the algorithm that decides which spec we use for the formal syntax, and is really a part of https://github.com/orgs/mdn/discussions/442.

@Josh-Cena Josh-Cena removed the needs triage Triage needed by staff and/or partners. Automatically applied when an issue is opened. label Jun 29, 2024
@Josh-Cena
Copy link
Member

Is there anything actionable in content? I'm unsure what to change.

@wbamberg
Copy link
Collaborator

wbamberg commented Jun 29, 2024

Is there anything actionable in content?

No. We could transfer this to Yari I suppose. but a real systematic fix crosses both Yari and content and potentially BCD as well.

@estelle
Copy link
Member

estelle commented Jul 16, 2024

@bsmth @pransh15 can we move this issue to Yari?

@bsmth bsmth transferred this issue from mdn/content Jul 16, 2024
@github-actions github-actions bot added the needs triage Triage needed by staff and/or partners. Automatically applied when an issue is opened. label Jul 16, 2024
@LeoMcA LeoMcA added p3 We don't have visibility when this will be addressed. involves: Content Requires the attention of the Content team. effort: medium This task is a medium effort. and removed needs triage Triage needed by staff and/or partners. Automatically applied when an issue is opened. labels Jul 23, 2024
@github-actions github-actions bot added the idle label Aug 22, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
effort: medium This task is a medium effort. idle involves: Content Requires the attention of the Content team. p3 We don't have visibility when this will be addressed.
Projects
None yet
Development

No branches or pull requests

6 participants