• TrickDacy@lemmy.world
    link
    fedilink
    arrow-up
    12
    arrow-down
    2
    ·
    edit-2
    7 hours ago

    I’ve never quite understood how adding all these HTML classes to a page is supposed to be clean. Just do a decent job of organizing your code and it’s honestly not that hard to keep from breaking styles unexpectedly. This is the part you tell me “well that only works for small projects”. Not really, it works when styles are managed carefully. I’ve worked on fairly large sites with what modern standards would call “bad” css practices and it was fine, we just had an understanding that some devs were frontend (I was lead for a couple years at this particular company I’m thinking of) and some were backend. The backend people botched styles every time so we forbade them eventually. I think that contextless type of “help” is where people get the idea that you have to have a css setup that prevents people from breaking anything unexpectedly. CSS just gets no respect. You wouldn’t let a frontend guy go changing your core backend code so why is the reverse ok?

    I like css modules too but I totally disagree that css is irreparably broken and needs some system that discourages the cascade of styles in all cases.