A well-known font called "Monospaced" but "monospace" is a generic family name.

  font-family: Menlo, Consolas, "Andale Mono", "Lucida Console", "Nimbus Mono L", "DejaVu Sans Mono", monospace, "Courier New";

see: http://www.w3.org/TR/CSS21/fonts.html#propdef-font-family

Support from Acquia helps fund testing for Drupal Acquia logo

Comments

sreynen’s picture

Status: Needs review » Reviewed & tested by the community

Makes sense. In the current list, Courier New will never be used, since every browser has a generic monospace font.

Dries’s picture

Status: Reviewed & tested by the community » Fixed

Committed to 8.x. Moving to 7.x.

droplet’s picture

Version: 8.x-dev » 7.x-dev
Status: Fixed » Needs review
FileSize
542 bytes
tim.plunkett’s picture

Version: 7.x-dev » 8.x-dev
Priority: Normal » Major
Status: Needs review » Needs work

Did anyone check git blame to see why this was done?

It was specifically done this way to avoid a bug in text size rendering with generic fonts.

See the links in #827528-32: No styling for PRE, CODE tags in Bartik for more detail.

This should be reverted and then closed (works as designed).

tim.plunkett’s picture

Status: Needs work » Needs review
FileSize
828 bytes

Here's a revert and a comment so it doesn't get changed again.

sreynen’s picture

Status: Needs review » Reviewed & tested by the community

I hadn't considered it might be intentional. Reading over the discussion, it makes sense now, but just looking at the CSS, it seemed like a clear mistake. Adding the comment seems like a good way to avoid repeating this in the future.

webchick’s picture

Status: Reviewed & tested by the community » Closed (works as designed)

Ok, committed and pushed to 8.x. Thanks!

I just added this:

 * @todo Remove when IE8 is no longer supported.

...since that seemed to be the only browser we really care about in his post.

droplet’s picture

Priority: Major » Normal
Status: Closed (works as designed) » Needs work
FileSize
490.68 KB

ahh. thanks.

I do a quick real test, anyone know what I missed.

tim.plunkett’s picture

Status: Needs work » Closed (works as designed)

You didn't adjust the font size at all.
See http://meyerweb.com/eric/thoughts/2010/02/12/fixed-monospace-sizing/, as mentioned in the comment in the patch.

droplet’s picture

Status: Closed (works as designed) » Needs review
FileSize
177.52 KB
469 bytes

Okay. cleared caches and redo tests again.

To my understand..

In this case, building on the previous question and answer, you might say, “It depends, but most likely 16px.” The reasoning here is pretty straightforward: since the computed font-size of the p element is 16px, the font-size: 1em; assigned to the span will result in it having the same size.

And that’s true… in two of five browsers I tested: Opera 10 and Internet Explorer 8

IE8 & Opera 10 are 16px of SPAN

In the other three I tested—Firefox 3.6, Safari 4, and Chrome 4—the computed (and rendered) font-size of the span is 13px

Others are smaller.

I tested Opera 12, IE8, IE9, FF 13, Chrome 21. Same results.

EDIT: also tested http://meyerweb.com/eric/css/tests/monospaced3.html in diff browsers.

tim.plunkett’s picture

Status: Needs review » Reviewed & tested by the community

OH! I didn't see that @todo, it wasn't in my patch.

This is definitely relevant to more than IE.

webchick’s picture

Status: Reviewed & tested by the community » Fixed

Oops. :) That's what I get for trying to read CSS. :D

Committed and pushed to 8.x. Thanks. :)

Status: Fixed » Closed (fixed)

Automatically closed -- issue fixed for 2 weeks with no activity.

cweagans’s picture

cweagans’s picture

Issue summary: View changes

add more info