Hacker News new | ask | show | jobs
by mrxd 4644 days ago
You're right that this example is no more semantic than inline styles, but that's the extent of the similarities.

If you want to update all the large margins across the app, you can do that in one place. That wouldn't be possible using inline styles.

You can also enforce style guide standards. Only three margin sizes are allowed: small, medium, large. Inline styles obviously allow for much more variability.

1 comments

> If you want to update all the large margins across the app, you can do that in one place. That wouldn't be possible using inline styles.

Sure can, your pages are generated, generate the styles from config or constants. There, I fixed it.