2 posts tagged with “css”

Styled components and props - a rule of thumb

18 May 2020

A while ago, I wrote about an [improvement to using props in styled-components](/improve-your-styled-component-props-usage/). The TLDR; is "Avoid overusing props in styles and instead use proper DOM and ARIA states". I think this advice extends to all CSS-in-JS solutions. Read more

Improve your styled-component props usage

30 Nov 2019

I hadn't used styled-components until about a year ago when I started at my current job. I can't say its my favorite CSS-in-JS option for various reasons. One of those reasons is the pitfall of relying on props for styling, which can do a lot more damage than devs may realize. Read more