Skip to content

feat(css): add color-interpolation property - #1121

Merged
pepelsbey merged 3 commits into
mdn:mainfrom
arronei:css/color-interpolation
Nov 17, 2026
Merged

pepelsbey merged 3 commits into
mdn:mainfrom
arronei:css/color-interpolation

Conversation

@arronei

@arronei arronei commented Nov 15, 2026 •

Copy link
Copy Markdown
Contributor

Description

Adds color-interpolation to css/properties.json, following the SVG 2 definition (Painting § color-interpolation, also in @webref/css). Also adds the l10n key limitedSVGElementsContainerGraphicsGradientUseAnimate (en-US and fr) for "applies to" and registers it in properties.schema.json.

Field Value
syntax auto | sRGB | linearRGB | <color-interpolation-method>
initial sRGB
applies to container elements, graphics elements, gradient elements, use and animate
inherited yes
percentages no
computed as specified
animation type discrete
group Scalable Vector Graphics

Motivation

color-interpolation is a standard property that every major browser has shipped for years (css.properties.color-interpolation in BCD), and MDN documents it at Web/CSS/Reference/Properties/color-interpolation. But it's missing from css/properties.json, while its sibling color-interpolation-filters is present.

  • The MDN page can't use {{CSSInfo}} without this entry. Its hand-written formal-definition table gives the initial value as auto and lists only <linearGradient> and <radialGradient> under "Applies to".
  • VS Code builds its CSS IntelliSense from this package through microsoft/vscode-custom-data, and currently flags color-interpolation as Unknown property.

Additional details

  • Syntax: SVG 2 recently added <color-interpolation-method> from CSS Color 4 to this property (w3c/svgwg#1173, for w3c/svgwg#366). It also defined sRGB and linearRGB as in srgb and in srgb-linear. <color-interpolation-method> is already in css/syntaxes.json. No browser parses it yet: Chromium, Gecko and WebKit all accept only the three keywords. The syntax here follows the spec, as docs/updating_css_json.md asks.
  • Initial value: all three engines use sRGB (Chromium css_properties.json5, Gecko longhands.toml, WebKit CSSProperties.json), and WPT's svg/painting/inheritance.svg tests it.
  • Testing:
    • npm test passes. I also checked that the lint fails if appliesto points to an undefined key.
    • Regenerated VS Code's CSS data with this branch and ran it through vscode-css-languageservice. The property completes, and the Unknown property warning is gone.

Related issues and pull requests

  • Once this is released, a follow-up mdn/content PR will replace the page's hand-written table with {{CSSInfo}}.

arronei added a commit to arronei/vscode-syntax that referenced this pull request Nov 15, 2026
Record the draft PR links in docs/upstream-prs.md and the README:
microsoft/vscode-custom-data#147 and #148, mdn/data#1121 and
microsoft/vscode-css-languageservice#547.

Drop the Claude attribution and session lines from the PR folders'
COMMIT_MSG.txt and PR.md, and update the doc-paths PR body: the Nov 12
web custom data update filled the cited descriptions by hand, but the
lookup still returns nothing on main.
Add `color-interpolation` to css/properties.json. The property is
defined in SVG 2 and supported in all major browsers
(css.properties.color-interpolation in BCD), and MDN already documents
it. Only this data was missing it; its sibling
`color-interpolation-filters` is already here.

Values follow the spec, including the <color-interpolation-method>
value that SVG 2 now takes from CSS Color 4:
https://w3c.github.io/svgwg/svg2-draft/painting.html#ColorInterpolationProperty

Adds the l10n key `limitedSVGElementsContainerGraphicsGradientUseAnimate`
for "applies to" and registers it in properties.schema.json.
@arronei
arronei force-pushed the css/color-interpolation branch from f6a1801 to 5fd8db5 Compare November 16, 2026 17:19
@arronei
arronei marked this pull request as ready for review November 16, 2026 17:24
@arronei
arronei requested review from a team as code owners November 16, 2026 17:24
@arronei
arronei requested review from pepelsbey and a balanced review from Copilot November 16, 2026 17:24

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Note

Copilot was unable to complete this review at the selected tier due to model policy or plan restrictions.

🟡 Changes recommended

A new localization entry in l10n/css.json is added with only an en-US value while adjacent “applies to” keys include fr, creating a likely missing French translation that needs to be addressed before approval.

1 open issue
What changed in this PR

Adds the SVG 2 color-interpolation CSS property to the dataset so downstream consumers (e.g., MDN {{CSSInfo}}, VS Code CSS IntelliSense) can recognize and describe it consistently.

Changes:

  • Add color-interpolation to css/properties.json with syntax/initial/inheritance/computed/animation and applies-to metadata.
  • Introduce and register a new l10n “applies to” key for the property.
  • Update css/properties.schema.json to allow the new appliesto key value.
File Description
l10n/​css.json Adds a new localization key used to describe the property’s “applies to” scope for color-interpolation.
css/​properties.schema.json Registers the new appliesto l10n key in the schema so references validate.
css/​properties.json Adds the color-interpolation property definition aligned with the SVG 2 specification (syntax, defaults, inheritance, and applies-to mapping).

Review effort: Balanced

Comment thread l10n/css.json Resolved
@arronei
arronei requested a balanced review from Copilot November 16, 2026 17:33

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Note

Copilot was unable to complete this review at the selected tier due to model policy or plan restrictions.

🟡 Changes recommended

A remaining localization nit flags inconsistent French capitalization in l10n/css.json for a limitedSVGElements* string compared to adjacent entries, indicating a minor but unresolved issue still needs adjustment.

1 open issue
1 resolved since last review

Review effort: Balanced

Comment thread l10n/css.json Resolved
Corrected capitalization in French translation for SVG elements.

Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>

@pepelsbey pepelsbey left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good! Thank you 🙂

@pepelsbey
pepelsbey merged commit 19e202c into mdn:main Nov 17, 2026
2 checks passed
arronei added a commit to arronei/mdn-content that referenced this pull request Nov 17, 2026
Replace the hand-written formal-definition table with {{CSSInfo}}, now
that mdn-data has the property (mdn/data#1121). The table was wrong:
it gave the initial value as `auto` (the spec, and Chromium, Gecko and
WebKit, all use `sRGB`) and listed only <linearGradient> and
<radialGradient> under "Applies to".
estelle pushed a commit to mdn/content that referenced this pull request Nov 23, 2026
Replace the hand-written formal-definition table with {{CSSInfo}}, now
that mdn-data has the property (mdn/data#1121). The table was wrong:
it gave the initial value as `auto` (the spec, and Chromium, Gecko and
WebKit, all use `sRGB`) and listed only <linearGradient> and
<radialGradient> under "Applies to".
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants