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

[css-color-4] Clarify interactions with host syntax #7567

Closed
sesse opened this issue Aug 4, 2022 · 7 comments
Closed

[css-color-4] Clarify interactions with host syntax #7567

sesse opened this issue Aug 4, 2022 · 7 comments
Labels
css-color-4 Current Work

Comments

@sesse
Copy link
Contributor

sesse commented Aug 4, 2022

The spec goes to some length about what host syntax is, and specifies: “These features are collectively termed the host syntax. The host syntax should define what the default interpolation space should be for each case, and optionally provide syntax for authors to override this default. If such syntax is part of a property value, it should use a token, defined below for easy reference from other specifications. ”

However, it's not clear at all what “the host syntax should define” means. Does this mean that the spec expects e.g. that the CSS animations spec be changed to have new CSS properties for interpolation color space? (And similar for gradients and filters.) There is new syntax in §12.1 (“Color Space for Interpolation”), but it doesn't seem to be connected to anything in the larger scope of CSS. Is something missing from the color spec, or will other specs fill this in at some future date?

Concretely, if I as an author would want to make a gradient that's interpolating using (say) HSL along the longer axis, how would I express that? Can I do that at all currently?

@lilles lilles added the css-color-4 Current Work label Aug 4, 2022
@lilles
Copy link
Member

lilles commented Aug 4, 2022

@faceless2
Copy link

css-images-4 defines a syntax for gradient interpolation in a particular space - see eg https://drafts.csswg.org/css-images-4/#linear-gradients

@svgeesus
Copy link
Contributor

svgeesus commented Aug 4, 2022

However, it's not clear at all what “the host syntax should define” means. Does this mean that the spec expects e.g. that the CSS animations spec be changed to have new CSS properties for interpolation color space?

Yes. "should" define because currently it hard-codes gamma-encoded sRGB and does not allow any other option.

(And similar for gradients and filters.)

Yes. Gradients already does, as @faceless2 pointed out.

@svgeesus
Copy link
Contributor

svgeesus commented Aug 4, 2022

Concretely, if I as an author would want to make a gradient that's interpolating using (say) HSL along the longer axis, how would I express that? Can I do that at all currently?

linear-gradient(in hsl longer to right, #F01, #081);

@svgeesus
Copy link
Contributor

svgeesus commented Sep 1, 2022

Hi @sesse did these replies answer your question?

@sesse
Copy link
Contributor Author

sesse commented Sep 2, 2022

It did, but it would be nice to have explicit references in the text, perhaps? Something like “these declarations are not used by this spec itself, only exposed so that other specifications can use them; see e.g. use in [CSS-IMAGES-4]#reference”?

@svgeesus
Copy link
Contributor

svgeesus commented Sep 2, 2022

Ah, fair enough. CSS being a modular specification, it is common for one module to expose things so that other modules can do the same thing consistently, but will add wording to that effect here.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
css-color-4 Current Work
Projects
None yet
Development

No branches or pull requests

4 participants