• FooBarrington@lemmy.world
    link
    fedilink
    arrow-up
    1
    ·
    8 months ago

    I guess it comes down to preference. I personally don’t mind scrolling down a little bit to see my styles if it means the structure of the component is cleaner. I’ve found that I can iterate faster that way. If things get too unwieldy, that usually indicates to me that I should extract something out into a separate component.

    It definitely is, everyone should develop the way they are most comfortable. That’s Tailwind for a lot of people, but it will never be everone.

    About point 3. At least in svelte, you don’t have to worry about having unique class names. The styles are scoped to the component. Meaning that the CSS you write in one component doesn’t affect any other components (unless you explicitly want it to). So you can reuse class names on multiple components and they won’t interfere with each other. for small components, I’ll often not even use class names if I can get away with it. I’ll just use element selectors.

    I was talking about having to find unique class names inside a scoped context. Even from that perspective, my complaint is nevertheless completely valid - it’s still a lot of overhead and has been my biggest painpoint when maintaining a lot of applications in the past.