Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

Why do this instead of

    <div class="c-newspaper__item display-flex gap-1rem">
        <article class="c-card"></article>
    </div>

    .display-flex {
      display: flex;
    }
    
    .gap-1rem {
      gap: 1rem;
    }


You can use CSS classes like booleans but sometimes its nice to have actual boolean variables, used on the actual HTML element in your component, when designing the logic of your application. Even if it's more verbose.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: