News for hackers. Stuff that matters.
Re:Play with TailwindCSS in the Browser by azangru on Friday June 10, 2022 @11:55AM (#31695883)
> Hopefully you're good at that and you can remember, else you'll duplicate things. Hopefully your entire team are aligned on the same naming conventions, or your project's styles will be a total mess.

  - CSS classes can be named on a per-component basis, according to one of the well-established naming conventions (BEM, SMACSS, or whatever). This does not require remembering the names of other classes.
  - With the arrival of web components, styles can be scoped within the shadow DOM; and the name collision becomes a non-issue; as well as keeping track of _all_ the CSS that's written in the project. If CSS classes don't leak, you can focus your attention only on a given component and ignore the rest.
  - Instead of CSS-in-JS, one could use CSS modules, which are just regular CSS with a build step. The relevant project-level (site-level, page-level) constants can be defined as CSS constants on the root element.
Re:Play with TailwindCSS in the Browser by holler on Friday June 10, 2022 @07:26PM (#31700466)
my thought exactly, sometimes I wonder when reading about tailwind... naming css classes has been a problem exactly 0 times in recent memory...