problem
The other layouts, such as css stack are good ways to arrange the boxes that make-up your page. It's important that these other layout modes stay focused on their own responsibilities to maintain a seperation of concerns.
The box's role within this system is to take care of any styles that can be considered intrinsic to individual elements; styles which are not dictated, inherited, or inferred from the meta-layouts to which an individual element may be subjected.
Many styles however do not make sense to be written in this peicemeal way.
Styles like font-family
, color
, and line-height
can all be inherited or
otherwise applied globally.
In general "branding" related styles should be done globally (making all lists look a certain way, etc) with exceptions as needed at the local level, but in general we should strive for our layout elements to remain focused on just the layout.
solution
Width, height, and margins generally should be inferred or inherited by the
parent of a box
. If you don't have anything that needs put in a box, don't put
it in a box.
padding
Padding however reaches into and element; it is introspective. Padding should
be a box
styling option.