3 ms·
> A key way I think about building visual UI components is that basically everything can be broken down into a bunch of rectangles on a page. I created this ti
by sodimel 5y ago
> A key way I think about building visual UI components is that basically everything can be broken down into a bunch of rectangles on a page.
I created this tiny script[1] in order to be able to view all the rectangles that makes a website, a little while ago. Here's a demo[2].
[1]: https://gist.github.com/corentinbettiol/85a8938175f89a15ac353b2c8b492e19 https://gist.github.com/corentinbettiol/85a8938175f89a15ac35...
[2]: https://up.l3m.in/file/1597168094-tilt.webm https://up.l3m.in/file/1597168094-tilt.webm
- hypertele-Xii 5y agoI just add this to the CSS: * { border: dotted red; }
- donatzsky 5y agoYou should generally use outline instead of border for this, since it doesn't affect the size of the element.
- hypertele-Xii 5y agoThe screen isn't print and web pages aren't pixel perfect, so that's entirely irrelevant.