jbzfn,
@jbzfn@mastodon.social avatar

「 I had "separated my concerns", but there was still a very obvious coupling between my CSS and my HTML. Most of the time my CSS was like a mirror for my markup; perfectly reflecting my HTML structure with nested CSS selectors.

My markup wasn't concerned with styling decisions, but my CSS was very concerned with my markup structure.

Maybe my concerns weren't so separated after all 」
— Adam Wathan


https://adamwathan.me/css-utility-classes-and-separation-of-concerns

mattwilcox,
@mattwilcox@mstdn.social avatar

@jbzfn Well yes, because CSS exists only to style HTML. So they're coupled. By definition of what they do.

That does not mean you can't write CSS that is less tightly bound to your exact HTML without resorting to a billion classes.

The other "strawman" is that the markup for any particular "widget" will differ from one use to another.

Tailwind does an awful lot of work so your mark-up can be anytihng - and then 99% of the time the markup is the same everywhere you want those styles.

jbzfn,
@jbzfn@mastodon.social avatar

deleted_by_author

  • Loading...
  • jbzfn,
    @jbzfn@mastodon.social avatar

    deleted_by_author

  • Loading...
  • lukem,

    @jbzfn good find. I have complicated feelings about Tailwind CSS but I appreciate being able to see the thought process that prompted creating it.

  • All
  • Subscribed
  • Moderated
  • Favorites
  • programming
  • DreamBathrooms
  • magazineikmin
  • ethstaker
  • GTA5RPClips
  • InstantRegret
  • rosin
  • love
  • Youngstown
  • slotface
  • khanakhh
  • kavyap
  • everett
  • thenastyranch
  • osvaldo12
  • provamag3
  • tester
  • cisconetworking
  • tacticalgear
  • ngwrru68w68
  • Durango
  • cubers
  • mdbf
  • normalnudes
  • anitta
  • modclub
  • Leos
  • megavids
  • JUstTest
  • All magazines