Opened 6 years ago
Closed 6 years ago
#740 closed defect (worksforme)
ex vs em for unit of measure
| Reported by: |
|
Owned by: |
|
|---|---|---|---|
| Priority: | normal | Milestone: | 0.9 |
| Component: | Front-end | Version: | 0.8.2.1 |
| Severity: | normal | Keywords: | |
| Cc: |
Description (last modified by mdawaffe)
http://trac.bbpress.org/browser/trunk/bb-templates/kakumei/style.css#L333
Should this:
332 #forumlist tr td div.nest {
333 padding-left: 2.5ex;
334
}
actually be this:
332 #forumlist tr td div.nest {
333 padding-left: 2.5em;
334 }
Change History (8)
- Milestone set to 0.8.3 & XML-RPC
- Owner set to mdawaffe
- Status changed from new to assigned
- Description modified (diff)
- Milestone changed from 0.8.3 & XML-RPC to 0.8.4 & WP-Taxonomy
- Summary changed from Line 333 of style.css: ex vs em for padding-left unit of measure to ex vs em for unit of measure
Moving the actual bug over to #741. This ticket can discuss the stylistic choice of ex v. em.
W3 doesn't seem to prefer one over the other: http://www.w3.org/TR/REC-CSS2/syndata.html#length-units.
However, an 'ex' is defined even for fonts that don't contain an "x".
That, though, shows that the x is a bit arbitrary for non-roman fonts. Especially in those cases does the em value make more sense.
Replying to fel64:
That, though, shows that the x is a bit arbitrary for non-roman fonts.
Can't the same be said for "em"?
I kind of think we should be using one or the other, but not both.
It's not really a stylistic choice (or was that a bad CSS joke). I guess we need to ask questions about which units behave themselves properly in different browsers.
Replying to sambauers:
Can't the same be said for "em"?
No.
An em is a unit of measurement in the field of typography, equal to the pt size of the current font. This unit is not defined in terms of any specific typeface, and thus is the same for all fonts at a given point size.[1] So, 1 em in a 16 pt typeface is 16 points.
Well there you go. I subscribed to the (incorrect) theory that an em was the width of an uppercase "M". Thanks for that.

After reading up a bit on it, I agree that em is probably a better unit than ex. However, ex is still a valid CSS length unit and should not be the cause of this problem (in the forum topic you cite, other lines are getting indented with ex, after all).
There was an earlier bug (can't find a reference) where the indentation would be wrong if the subforum had a lower forum_id than it's parent. This looks to be a similar bug.
I've just reproduced the problem and am looking for a solution now.