Using data-attributes for style variations | Stuff & Nonsense

An interesting approach to using data attributes to drive CSS utility classes. I'm not sure I like the overly granular control (it feels like it falls into the same category as Tailwind, but now with even more syntax and boilerplate) but I always enjoy Andy's takes on Grid structures and this is certainly a novel approach to that.

On BEM and why more modern approaches like CUBE are advantageous:

But, I’ve come to realise that BEM reduces instead of increases clarity and doesn’t help separate default styles from variations in the way that data attribute do.

Explore Other Notes

Older âž¡

Convert Markdown to RTF online

A brilliant tool: paste in some Markdown and it will display the converted Rich Text in the preview window. You can then copy this and paste into any RTF editor and hey presto, no more annoying […]
  • An interesting approach to using data attributes to drive CSS utility classes. I'm not sure I like the overly granular control (it feels like it falls into the same category as Tailwind, but now with […]
  • Murray Adcock.
Journal 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.