lost
lost copied to clipboard
nth-of-type support
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.
👍🏻
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.
Terrific, I'll put something together.
+1 Just ran into this
@zgreen Are you still up for working on a PR? (or maybe you already are) :smile: Any help would be epic!
@zgreen I just noticed that you forked and had some work going already on this. Let me know if you need anything.
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.
Thanks! Don't worry about any sort of rush. Enjoy this last week before 2016.
:+1:
It'd be really cool if all Lost's rules could accept values in any order. :^\
@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. :smile:
@corysimmons see #213 for follow up to your last comment.
@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. :^)
@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. :smile:
Awesome, you're doing an amazing job! I'm so happy you took this project over.
:+1: