Skip to content

[css-grid] Simplifying the new syntaxt of the grid shorthand  #438

Closed

Description

@javifernandez

https://drafts.csswg.org/css-grid/#grid-shorthand

The new syntax suggests the use of " [ auto-flow && dense? ]" instead of reusing the current syntax. The only different is that allows omitting the 'auto-flow' value, assuming 'row' in that case.

My proposal would be the following syntax:

<‘grid-template-rows’> / <'grid-auto-flow'> <‘grid-auto-columns’>? | <'grid-auto-flow'> <‘grid-auto-rows’>? / <‘grid-template-columns’>

Activity

  1. fantasai commented on Sep 2, 2016

    @fantasai
    Collaborator

    IIRC the reason Tab and I decided to use 'auto-flow' rather than the 'row'/'column' keywords was to make the shorthand a little more self-evident: just stating 'row' or 'column' in the appropriate place didn't make it as clear that the subsequent track-sizes were auto-flowed rather than part of the template. Since whether it was a row or column was already implied by the placement (it's implied whether you're doing auto-flow or template), we decided to use the 'auto-flow' part of the property name as a keyword here.

  2. javifernandez commented on Sep 7, 2016

    @javifernandez
    ContributorAuthor

    Ok, I really don't have an strong opinion, regarding the syntax, and I understand your point. My doubt was just whether we could simply the syntax, so we can do it the same at the implementation level.

    I'll leave this open for a while, just in case somebody else wants to add something, but I'll proceed with the implementation of the new syntax as it's written now.

  3. fantasai commented on Sep 13, 2016

    @fantasai
    Collaborator

    Javier, does this logic work for you? Or do you have a further comment to consider?

  4. javifernandez commented on Sep 13, 2016

    @javifernandez
    ContributorAuthor

    Yes, I'm fine with the decision.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions