Skip to content

linear-gradient() Formal syntax is outdated #11483

@gibson042

Description

@gibson042

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:

Metadata

Metadata

Assignees

No one assigned

    Labels

    effort: mediumThis task is a medium effort.idleinvolves: ContentRequires the attention of the Content team.p3We don't have visibility when this will be addressed.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions