Hacker News new | past | comments | ask | show | jobs | submit login

there is a different way to achieve the same results. instead of encoding every possible rule into classes, a combination of flex box-classes, templating and text props could be used. <flex container> <li #if index % 3 ####css-prop> </li> <other cases> </end-container>

there is some repetition, but it will keep things simple.

same thing for spacing example, have a margin prop on a flex box container and apply it on each container then wrap them into a flex container.

it will be easier compose to compose vs css class variation.




Consider applying for YC's Spring batch! Applications are open till Feb 11.

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

Search: