Text between <code> tags is displayed in a very small font size. The attached patch increases this size to 150%, making the code look identical in size to regular text. Tested in Safari 3.2.1 and Firefox 3.0.8 (Mac).

Support from Acquia helps fund testing for Drupal Acquia logo

Comments

sun’s picture

subscribing

Xano’s picture

Status: Needs review » Needs work

Short notice: this needs a per-theme approach.

Xano’s picture

Component: base system » Garland theme
Status: Needs work » Needs review
FileSize
723 bytes
Xano’s picture

FileSize
809 bytes

Follow-up that also increases font-size for PRE and KBD elements.

Dries’s picture

Do you have an explanation for why we need to set it to 150% rather than have it magically work at the default size? I guess I could fire up Firebug and find out ...

Xano’s picture

The default font size of these elements is smaller than the font size of the surrounding text, making the code hard to read. This patch makes all font sizes equal.

sun’s picture

Hm. Why 150% ?

Usually, I have this default snippet in all of my projects' themes:

code, pre, kbd {
  font-family: "Courier new", Courier;
  font-size: 100%;
  color: #000;
}

Whereas a popular browser CSS reset snippet does:

pre,code { font: 115% monospace; }

...which is equally only slightly larger than 100%.

catch’s picture

Status: Needs review » Needs work

This either needs a comment or a different size.

stBorchert’s picture

I'm ok with 115%.
The first screenshot shows the actual size and the second with size set to 115%.

stBorchert’s picture

Status: Needs work » Needs review
FileSize
599 bytes

Re-roll with font-size: 115%;.

Status: Needs review » Needs work

The last submitted patch failed testing.

deekayen’s picture

Status: Needs work » Needs review

infant bot doesn't know how to test patches properly yet

Bojhan’s picture

Status: Needs review » Reviewed & tested by the community

Marking this RTBC, tried it out, and it looks good.

sun’s picture

Wow, this issue still around? - definitely.

Though - shouldn't this be applied to all core themes? (not limited to Garland)

stBorchert’s picture

Assigned: Xano » Unassigned
FileSize
15.13 KB

Seven doesn't need this modification because its looking good (see screenshot).

Dries’s picture

Status: Reviewed & tested by the community » Fixed

Committed to CVS HEAD. Thanks!

Status: Fixed » Closed (fixed)
Issue tags: -Quick fix

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