# quantity

Published articles for quantity.

This is one page of public article previews, not the complete archive. Follow Next page to continue. Summaries are not the original full articles.

## Conditional CSS with :has and :nth-last-child

DevFeed: [Conditional CSS with :has and :nth-last-child](<https://devfeed.tech/articles/conditional-css-with-has-and-nth-last-child-45271.md>)

Original publisher: [Read original article](<https://ishadeed.com/article/conditional-css-has-nth-last-child/>)

Author: Ahmad Shadeed

Published: 2023-05-16T00:00:00Z

Content type: tutorial

Language: en

Sources: [Ahmad Shadeed](<https://devfeed.tech/sources/ahmad-shadeed.md>)

Topics: [CSS](<https://devfeed.tech/topics/css.md>), [Web Development](<https://devfeed.tech/topics/web-development.md>)

Tags: [components](<https://devfeed.tech/tags/components.md>), [conditional](<https://devfeed.tech/tags/conditional.md>), [css](<https://devfeed.tech/tags/css.md>), [has](<https://devfeed.tech/tags/has.md>), [how-to](<https://devfeed.tech/tags/how-to.md>), [nth-last-child](<https://devfeed.tech/tags/nth-last-child.md>), [quantity](<https://devfeed.tech/tags/quantity.md>), [queries](<https://devfeed.tech/tags/queries.md>), [selector](<https://devfeed.tech/tags/selector.md>), [style](<https://devfeed.tech/tags/style.md>), [take](<https://devfeed.tech/tags/take.md>)

### AI overview

A tutorial on combining CSS :has and :nth-last-child selectors with style queries to create conditional components and layouts based on the number of child elements.

### Source excerpt

A modern look at how to combine CSS :has, :nth-last-child, and style queries to create dynamic components.