Scoping the wrong query?

The RICG has a new fight: CSS container queries. The article's ignited discussion, beneficially. The problem is legitimate, the reasoning well argued and the solution intriguing. But something's niggling me. Element queries won't work for the various reasons given, but they're also ugly.

Which got me thinking. Why not scope the query to the property, not the element? Why write:

.mod:media( min-width: 40em ){
    align: left;
}

.mod {
    align: right;
}

When you could write:

.mod {
    align::media( min-width: 40em ): left;
    align: right;
}

Still ugly, sure, but I'd rather have repetition in my attributes than in my elements. It's a more orderly ugly.

TBC: I'm aware RICG have taken another direction; just a brain worm I needed to squash.

Explore Other Articles

Newer

Elephant in the room

Memory augmentation has always interested me. I'm envious of those that never forget a name or can quote verbatim. Like Mark Llobrera, I've started using technology to never […]

Conversation

Want to take part?

Comments are powered by Webmentions; if you know what that means, do your thing 👍

  • The RICG has a new fight: CSS container queries. The article's ignited discussion, beneficially. The problem is legitimate, the reasoning well argued and the solution intriguing. But something's […]
  • Murray Adcock.
Article permalink

Made By Me, But Made Possible By:

CMS:

Build: Gatsby

Deployment: GitHub

Hosting: Netlify

Connect With Me:

Twitter Twitter

Instagram Instragram

500px 500px

GitHub GitHub

Keep Up To Date:

All Posts RSS feed.

Articles RSS feed.

Journal RSS feed.

Notes RSS feed.