4 ms·
<br /> <br /> <br />
by tylerchilds 7y ago
<br />
<br />
<br />
- laurentdc 7y agoI'm more of a <p> </p> kind of guy. Frontend is all a hack anyways
- diegoperini 7y agoI know nothing but sometimes `!important` works.
- applecrazy 7y agoTailwind helped me break that bad habit with ‘mx-‘ and ‘my-‘
- oefrha 7y agoThere’s a component with awfully wide margins? No problem, -mx-?, -my-?.
- applecrazy 7y agoEvery element has 0 margin by default in Tailwind, meaning this is never a problem. The only other case where I can imagine an element being improperly spaced is when its parent’s padding is messed up.
- oefrha 7y agoWell, there’s no “component” by default in Tailwind. I was addressing the “component with margins” problem in the article.
- seph-reed 7y agoThis also responds well to changes in em size. I like doing it this way because it makes the sizing consistent on mobile vs desktop, as vertical spacing truly should be relative to the font size.