Skip to content

nth-of-type support #192

@zgreen

Description

@zgreen

It would be great if Lost supported nth-of-type() grid spans in addition to the current nth-child() implementation.

Use case

article {
  lost-column: 1/3;
}
<section>
  <h2>Section heading</h2>
  <article></article>
  <article></article> <!-- This article gets no gutter, but should have one. -->
  <article></article> <!-- This article gets cleared, but should instead be the last in the row. -->
  <!-- etc. -->
</section>

Obviously, one can work around this by simply adding a wrapping element, but that solution may neither be semantic nor desired.

I'm happy to submit a PR, if you're interested. Thanks for all your work—this project is terrific.

Metadata

Metadata

Assignees

No one assigned

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions