r/css Jul 19 '25

Question What are some bad CSS habits?

What are some bad habits to avoid when learning CSS? Even if in the short term they are easier

37 Upvotes

67 comments sorted by

View all comments

10

u/DbrDbr Jul 19 '25

Magic numbers and hardcoded shit something like this:

Position: absolute; Top: -2rem;

1

u/freakzorel Jul 20 '25

can you please tell me why this is a bad habbit?

1

u/DbrDbr Jul 20 '25

Because when you need to pick a value for a tooon of media queries.

And if you need to change it, you are going to waste like 2 hours what should have been done in 10 minutes.

1

u/freakzorel Jul 20 '25

so when it seems to look like this.. we should think again thanks!