Skip to:
Content

Opened 7 years ago

Closed 6 years ago

#740 closed defect (worksforme)

ex vs em for unit of measure

Reported by: chrishajer Owned by: mdawaffe
Milestone: 0.9 Priority: normal
Severity: normal Version: 0.8.2.1
Component: Front-end 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)

comment:1 mdawaffe7 years ago

  • Milestone set to 0.8.3 & XML-RPC
  • Owner set to mdawaffe
  • Status changed from new to assigned

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.

comment:2 mdawaffe7 years ago

  • 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.

comment:3 follow-up: fel647 years ago

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.

comment:4 in reply to: ↑ 3 ; follow-up: sambauers7 years ago

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.

comment:5 sambauers7 years ago

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.

comment:6 in reply to: ↑ 4 fel647 years ago

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.

http://en.wikipedia.org/wiki/Em_(typography)

comment:7 sambauers7 years ago

Well there you go. I subscribed to the (incorrect) theory that an em was the width of an uppercase "M". Thanks for that.

comment:8 sambauers6 years ago

  • Resolution set to worksforme
  • Status changed from assigned to closed

So we are sticking with EMs and only EMs then. This can be re-opened if anyone wants to make any more points.

Note: See TracTickets for help on using tickets.