Document hue interpolation method default in color-mix() - #45110
Closed
fufu1209 wants to merge 1 commit into
Closed
Conversation
Member
|
Duplicate of #44904 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Fixes #44894 (content part).
The
color-mix()page's syntax examples already show calls both with and without a hue interpolation method, but it was not explicitly demonstrated that omitting the method is valid and what it defaults to. This PR adds, in the Color interpolation method section, a note and a short example showing that omitting the hue interpolation method when mixing in a polar color space defaults toshorter hue, and thatcolor-mix(in lch, red, blue)andcolor-mix(in lch shorter hue, red, blue)are equivalent.The browser-compat-data part of the issue is tracked separately in mdn/browser-compat-data#28693.
Verification
Verified against the CSS Color 5 spec (csswg-drafts
css-color-5/Overview.bs):<color-interpolation-method>isin [ <rectangular-color-space> | <polar-color-space> <hue-interpolation-method>? ], and the hue interpolation method is not the default (''shorter'') only when explicitly written — i.e. the default isshorter.