Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

The default (original) box model used by browsers leaves a lot to be desired. When you specify something like:

...

languagecss

...

invalidmacro

theĀ actual width of the element is padding + border + width. The same applies to height: padding + border + height. This makes defining the actual size of element very hard because adding a border means decreasing the size if the element's size needs to be constant. It also causes huge problems with things like "width: 100%" because those cannot have border nor padding: it would make the element exceed the 100% width causing those annoying scroll bars.

...

The script used for this is in _core.scss, and applies the following:

...

languagecss

...

invalidmacro


This sets all tags to use border-box sizing by default, and makes it inherit so that changes made locally (should) percolate through.

...