Opened 12 years ago
Closed 12 years ago
#18073 closed enhancement (maybelater)
Twenty Eleven Font Sizes (and Line Heights)
Reported by: |
|
Owned by: |
|
---|---|---|---|
Milestone: | Priority: | normal | |
Severity: | normal | Version: | 3.2 |
Component: | Bundled Theme | Keywords: | 2nd-opinion ui-feedback |
Focuses: | Cc: |
Description
Just out of curiosity, is there a specific reason that the font-size properties in the Twenty Eleven style sheet are all coded in pixel sizes rather than percentages or em units?
I understand this gives slightly better control over the exact font sizes, but it also makes the theme infinitely more difficult to extend when developing a child theme.
If em units or percentages were used, with a single pixel font-size declaration at the top (html{ font-size: 16px }
, for instance), then a person wanting to increase or decrease the base font-size for their website would simply need to create a child theme with the following content in the style.css file and all of the fonts and line-heights would be automatically adjusted.
@import url('../twentyeleven/style.css'); html{ font-size: 18px }
As it stands, however, if a person wants to increase the base font-size for their website using the Twenty Eleven theme, they would have to override a total of 71 separate font-size
declarations (and a handful of line-height
declarations) within the main style.css file for that parent theme.
I'm happy to work up a patch replacing all of the px font-size and line-height declarations with em units if there isn't a compelling reason to keep those items set in pixels.
This is probably something to keep in mind for future default themes. Too late to change this now.
Ultimately, it appears to be a matter of preference. I've always found that doing em/% across the board with a base font-size is a real pain, myself.