NotOnlyCSS

This publication includes original articles and tips about frontend technologies.

Member-only story

My CSS Christmas Wishlist

--

Santa, baby, help a developer out here, will you please?

We got spoiled in 2023 with new CSS features. From native nesting, :has() support (Firefox support is coming Tuesday!!) , container queries and the super cool scroll-timeline , 2023 is the year CSS exploded with possibilities.

But like any fat kid in the candy shop, I want more. More, I tell you!

So here is my CSS Christmas Wishlist:

It’s Christmas time in the vapourwave city.

1. XPath Selectors

I want CSS to have the ability to select elements via XPath instead of “regular” selectors. For example, I want both of these to style all the p tags:

p { color: red; }
//p { color: red; } /*or maybe something like :xpath(//p) because that // might cause an issue*/

But why would I want that? 1) Because XPath is supported in PHP, JavaScript, Python and many other langues, but not CSS and 2) XPath has a built-in parent selector. We can do this:

--

--

NotOnlyCSS
NotOnlyCSS

Published in NotOnlyCSS

This publication includes original articles and tips about frontend technologies.

Kenton de Jong
Kenton de Jong

Written by Kenton de Jong

I am a web developer turned travel blogger that is forced to code to eat.

No responses yet