Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

nth-of-type support #192

Open
zgreen opened this issue Nov 29, 2015 · 16 comments
Open

nth-of-type support #192

zgreen opened this issue Nov 29, 2015 · 16 comments

Comments

@zgreen
Copy link

zgreen commented Nov 29, 2015

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.

@peterramsing
Copy link
Owner

👍🏻

@corysimmons
Copy link
Contributor

Yeah I'd be interested in a PR for this. It'd need to be a global setting as well as on a per-element basis.

@zgreen
Copy link
Author

zgreen commented Nov 29, 2015

Terrific, I'll put something together.

@Dylan-Chapman
Copy link

+1 Just ran into this

@peterramsing
Copy link
Owner

@zgreen Are you still up for working on a PR? (or maybe you already are) 😄 Any help would be epic!

@peterramsing
Copy link
Owner

@zgreen I just noticed that you forked and had some work going already on this. Let me know if you need anything.

@zgreen
Copy link
Author

zgreen commented Dec 29, 2015

Yeah, it's just about there—work got in the way. Got it working w/ lost-column, tests passing. I made some changes so that you can pass the parameters optionally/in any order—have a look when I submit the PR. I need to implement it for lost-row, add a few more tests, and then it should be good to go. Hopefully can finish this off today.

@peterramsing
Copy link
Owner

Thanks! Don't worry about any sort of rush. Enjoy this last week before 2016.

@zgreen
Copy link
Author

zgreen commented Dec 29, 2015

👍

@corysimmons
Copy link
Contributor

It'd be really cool if all Lost's rules could accept values in any order. :^\

@peterramsing
Copy link
Owner

@corysimmons I'm looking into this, actually. I'm curious what it will take. Still really diving into the code right now to better understand it all as a whole. 😄

@peterramsing
Copy link
Owner

@corysimmons see #213 for follow up to your last comment.

@corysimmons
Copy link
Contributor

@peterramsing Feel free to ping me while you're diving into code for explanations about anything. Happy to help you wrap your head around my garbage code. :^)

@peterramsing
Copy link
Owner

@corysimmons You bet! I plan to sift through all the code + tests (#208) tonight and though the weekend. I'll probably release a 6.6.3 release with the npm updates through the weekend and then pursue #195 to get another patch out before getting 6.7.x scoped and begin the roadmap to 7.0.0. I'll probably ping you throughout. 😄

@corysimmons
Copy link
Contributor

Awesome, you're doing an amazing job! I'm so happy you took this project over.

@peterramsing
Copy link
Owner

👍

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

No branches or pull requests

4 participants