2 ms·
If you look at the code for many sites with high "production value" today, 25 nested divs is about right. As a non-web-dev, I have always been surprised at how
by pclmulqdq 3y ago
If you look at the code for many sites with high "production value" today, 25 nested divs is about right. As a non-web-dev, I have always been surprised at how often you need to throw in a new layer of divs to get some simple visual thing to work across device sizes.
- wwweston 3y agoAs a web dev, I honestly can’t figure out the value here. It makes things considerably less legible from an inspection standpoint. And while yes each div provides a handle by which to independently control some layout property the law of diminishing returns kicks in hard by about three layers deep (three block level elements deep will cover 99.9% of things you might want to do with a given visual-block element). I can only imagine this kind of markup is tooling generated and assumes that no human eyes will ever have to review/write it.
- pclmulqdq 3y agoIt's a good point that the HTML and CSS of all public websites was probably fed into copilot, and I assume a lot of that came from template engines or other tools rather than being handwritten. I guess it would be like teaching a computer C++ by looking at the output of Cython.