bevacqua/css

font-size should be in layout

fabdrol opened this issue · 1 comments

@bevacqua,

I like your style guide, it aligns closely to my personal preferences (except the two-space soft tabs, I prefer four space soft tabs). I do have one point I'd like to raise.

I strongly feel that font-size should be in layout, because:

  • When doing responsive design, we use ems to specify break points, font-sizes, paddings, margins etc etc. The reason is that this solves a lot of issues with phablets and other devices in the Android Resolution Race (arr). See also: Gardner, 2012
  • As a result, changing font size on a root element of a namespace (e.g. the .ns-container or even body will affect sizing ánd positioning of elements)
  • Personally, it feels counter-intuitive to not have font-size near color, font-weight and other stylistic properties, but I felt I needed to raise this point since you have made the distinction purely on layout vs. presentation.

What are your thoughts on this?

I generally agree that font-size changes the dimensions of its containers. However, font-size is generally not a property to look up to when defining the layout of a component.

By that I mean that your component's dimensions shouldn't depend on the font-size property. If that's the case maybe then your component should have hard width and heights, for instance