basham / v4.bash.am

Portfolio, since Nov 2014.

Home Page:http://bash.am

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Use ch unit for line width

basham opened this issue · comments

According to several sources designers should strive for 45 to 85 characters per line since the ideal width for a paragraph is supposedly 65 characters.

When defining widths of text blocks the ch unit may come in handy since 1ch is equivalent to the width of the zero (0) character. It also changes as the font-family or font-size changes.

p {
  /* Maximum width of 65characters */
  max-width: 65ch;
}

https://medium.com/@matuzo/writing-css-with-accessibility-in-mind-8514a0007939

Test to see if there's an advantage of using this over rem or em.

Played around with it. Seems like it could be useful. But sticking with rem, so that there isn't a mix of line lengths, given different font sizes.