Skip to content

Conversation

@andruud
Copy link
Member

@andruud andruud commented Sep 5, 2022

Current grammar has two comma-separated lists inside an outer comma-
separated list. This means specifying two timelines would look like
"timeline1, timeline2, inline, block", which obviously isn't what we want.

Instead we should follow how the 'animation' shorthand works, and let
the outer comma-separated list take space-separated single items:
"timeline1 inline, timeline2 block".

@andruud andruud requested a review from flackr September 5, 2022 10:50
<pre class='propdef'>
Name: view-timeline-name
Value: none | <<custom-ident>>#
Value: none | <<single-timeline-name>>#
Copy link
Member Author

Choose a reason for hiding this comment

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

Actually, I think none needs to be inside the list, otherwise it's not possible to represent the following as a shorthand: view-timeline-axis:block,inline; view-timeline-name:none.

Copy link
Member Author

Choose a reason for hiding this comment

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

OK, disregard that, we can't represent different-length longhands as a shorthand anyway ...

Current grammar has two comma-separated lists inside an outer comma-
separated list. This means specifying two timelines would look like
"timeline1, timeline2, inline, block", which obviously isn't what we want.

Instead we should follow how the 'animation' shorthand works, and let
the outer comma-separated list take space-separated single items:
"timeline1 inline, timeline2 block".
<pre class='propdef shorthand'>
Name: view-timeline
Value: [ <<'view-timeline-name'>> || <<'view-timeline-axis'>> ]#
Value: [ <<single-timeline-name>> || <<single-timeline-axis>> ]#
Copy link
Collaborator

Choose a reason for hiding this comment

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

Or <single-timeline># with <single-timeline> = <single-timeline-name> || <single-timeline-axis> if you want to align with animations/background/etc.

@fantasai
Copy link
Collaborator

fantasai commented Sep 7, 2022

This is actually not necessary, see the definition of <'property-name'> under https://www.w3.org/TR/css-values-4/#component-types

@andruud
Copy link
Member Author

andruud commented Sep 7, 2022

Aha, I didn't know about that ...

@andruud andruud closed this Sep 7, 2022
@andruud andruud deleted the view_timeline_shorthand branch September 7, 2022 19:51
@andruud andruud restored the view_timeline_shorthand branch September 8, 2022 09:25
@andruud
Copy link
Member Author

andruud commented Sep 8, 2022

@fantasai Actually, no. https://www.w3.org/TR/css-values-4/#component-types does not appy, because the # for view-timeline-* is not top-level. Should we do that?

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.

4 participants