Okay, css tooling opinion question for fosstodon. I want to create scoped css files for individual components within my codebase. Some will be web components, others will just be server side. `@scope` is out because Firefox doesn't support it, but there's a postcss plugin to sorta polyfill it (destructively, sadly). That means I need to process every css file in my codebase.

#RetweetsOK #css #javascript #tooling #fosstodon 1/3

Follow

@twipped

I always prefix my component classes with the component name. For example: 'fancy-slider_container', 'fancy-slider_legend', 'fancy-button_legend_label'...

That gives me scoping without any tooling, and makes the code much easier to inspect, the class name is telling me where to find it exactly. And removes most of selector complexity and specificity nonsense.

Sign in to participate in the conversation
Qoto Mastodon

QOTO: Question Others to Teach Ourselves
An inclusive, Academic Freedom, instance
All cultures welcome.
Hate speech and harassment strictly forbidden.