Closed mabar closed 5 years ago
ping @pascalduez
Hi,
could you describe a bit more the use-cases and give a few examples? I'm not having a clear picture about how this could be related to quantities.
<p>Foo</p>
<p>Bar</p>
For this code work both
But when you add one element
<h1>Foo</h1>
<p>Bar</p>
<p>Baz</p>
With this code :nth-child selects first paragraph, :nth-of-type still selects second. Add one tag before paragraphs and :nth-child selects nothing.
I am using quantities in design where I sometimes need to add some spans when pseudo elements are insufficient and child selectors are breaking that.
I see what you mean now.
So out of the blue this would give something like:
:at-least-of-type(count) { ... }
:at-most-of-type(count) { … }
:between-of-type(start, end) { … }
:exactly-of-type(count) { … }
Won't be implemented before the WIP refactor for #8 is done.
Can you add selectors for *-of-type? They are usually working more as expected than child selectors. Described on css-tricks.com Something simple like :exactly-of-type would be good.