DEV Community

Cover image for Using CSS to debug strange paddings/margins
Nabil Alamin
Nabil Alamin

Posted on • Originally published at arndom.hashnode.dev

Using CSS to debug strange paddings/margins

This is something I learnt recently while working on makerflow (shameless plug πŸ€·β€β™‚οΈ).

Anyway, I was having this strange padding issue which was caused by some animation which I didn't know at first because the inspector wasn't finding it :

image.png

image.png

Solution βœ”:

So after some googling I came across this code:

/* PLACE IN YOUR index.css or whatever your root styling file is*/
*{
  outline: 1px solid #f00 !important;
  opacity: 1 !important;
  visibility: visible !important;
}
Enter fullscreen mode Exit fullscreen mode

And it helped me find where the bug was coming from and move on to other things:

image.png

πŸ‘‹

This could be pretty useful in some instances. Anyway, I hope you find this helpful, bye.

Top comments (0)