Skip to content

[css-properties-values-api] mention how animations involving invalid token stream values work #285

Open
@heycam

Description

@heycam

Imagine a transition that involves an invalid token stream value:

<style>
p { transition: --test 1s; }
p:hover { --test: something; }
</style>
<p>hover me</p>

When you hover over the <p>, it should generate a transition from the underyling value, which is the initial value -- the special invalid token stream value -- to the token stream " something". I think this should be valid, and, since it's a token stream typed custom property, and therefore not interpolable, will switch value at 0.5s.

Similarly in the other direction:

<style>
p { transition: --test 1s; --test: something; }
p:hover { --test: var(--test); }
</style>
<p>hover me</p>

Here the initial, underyling value is the token stream " something" and the end value is the special invalid token stream value.

I think it makes sense that animations involving the special invalid token stream values work, but it would be good to call this case out specially in the spec somewhere.

@birtles @jyc

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions