Instead of a border I tend to have a debug helper that adds a 1px outline of cyan or pink. To get the “bones” of a component or page.
Good advice. Definitely sounds like captain obvious but it’s also something I think needs to be said.
Good advice. Definitely sounds like captain obvious but it’s also something I think needs to be said.
I have never wanted anything other than this behaviour, so I pretty much always include it when starting on a fresh project.
<div style="padding: 8px; border: 1px solid black"> Block 1 </div>
<div style="padding: 8px;"> Block 2 </div>
[].forEach.call(document.querySelectorAll("*"),function(a){a.style.outline="1px solid #"+(~~(Math.random()*(1<<24))).toString(16)})
https://gist.github.com/addyosmani/fd3999ea7fce242756b1 javascript:(function(){Array.from(document.body.getElementsByTagName('*'), e => e.style.outline = '2px dotted orangered');})(); var node = document.createElement('style');
node.innerHTML = '* { outline: 2px dotted orangered; };
document.body.appendChild(node); document.head.appendChild(document.createElement('style')).textContent = '* { outline: 2px dotted orangered'