]> git.cworth.org Git - lmno.games/commit
style: Apply "box-sizing: border-box" globally
authorCarl Worth <cworth@cworth.org>
Mon, 8 Jun 2020 13:48:56 +0000 (06:48 -0700)
committerCarl Worth <cworth@cworth.org>
Mon, 8 Jun 2020 13:48:56 +0000 (06:48 -0700)
commit9be7b5eabaa074f23c410861dd8b99d61711a6f6
tree35cc324513c9428fc4af3b518e5e8d988449d79d
parentb0b2d2d5dd5c3bac29537e2f5b206208f0a43898
style: Apply "box-sizing: border-box" globally

This is really the only sane way to work. Without this, the behavior
of padding is really hard to use. For example, if I set an element to
"width: 100%" it fills the space like I want. But then, its child
elements might be right up against the left edge, so I had
"padding-left" of some amount. This moves the children from the edge
like I want, but _also_ makes the element grow so that its now larger
than the 100% of its container like I had specified.

That looks to me entirely like a broken default and is something to
just set once, globally to avoid this class of frustration.
style.css