Skip to content

[css-grid] Issue 7 Add example of fixed size spanner getting extra space from content distribution #215

Closed

Description

@rachelandrew

11.5. Aligning the Grid

I was working on some examples and built this which may be a good example for this section.

gist
CodePen

I have a grid container sized in absolute units, with grid tracks also sized using absolute units. The sum of the tracks in both directions is smaller than the container.

Using the keyword values space-around and space-between increases the spacing between tracks. Any grid area that spans one of these gaps thus gains width or height as the space is added to the total width/height.

fixed-size-spanner-extra-space

Activity

  1. tabatkins commented on Jun 22, 2016

    @tabatkins
    Member

    Nice, that looks great. I assume that first one is using gutters to produce the small constant spacing?

  2. rachelandrew commented on Jun 22, 2016

    @rachelandrew
    ContributorAuthor

    Yes - I thought it might make it more obvious that the spacing also increases the desired absolute gap.

  3. tabatkins commented on Jun 22, 2016

    @tabatkins
    Member

    Makes sense. I'll just need to convert this to SVG and embed it - thanks for the example!

  4. fantasai commented on Jul 2, 2016

    @fantasai
    Collaborator

    Added in commit 22b395c ! Thanks so much~ @tabatkins can convert it to SVG whenever he gets around to it, imho it's more important to have an image than an SVG image. ;)

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

Metadata

Metadata

Type

No type

Projects

No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions