Opened 4 years ago

Closed 7 months ago

#5341 closed defect (bug) (fixed)

p2-breathe: remove forced 11px font-size from <code> tags

Reported by: audrasjb's profile audrasjb Owned by: dd32's profile dd32
Milestone: Priority: normal
Component: Make (Get Involved) / P2 Keywords: needs-patch


In p2-breathe theme, there is a very annoying font-size: 11px CSS style applied on each <code> HTML tag.

When applied to headings, it results in quite ugly rendering.
For reference, see this Post on Make/Core:
(heading: "Comments: default comment_type value now enforced")

I guess it should be fixed upstream, but I didn't find the p2-breathe GitHub repository.
I found a SVN repository here:

The following lines will need to be updated:

/* line 111, css/src/global/_text.scss */
pre {
  background: #f1f1f1;
  color: #222222;
  font-size: 11px; /* Need to be removed */
  font-size: 1.1rem;
  line-height: 1.4;
  margin-bottom: 1.2em;
  padding: 1.2em;
  overflow: auto;
  max-width: 100%;


var {
  font: 11px Monaco, Consolas, "Andale Mono", "DejaVu Sans Mono", "Courier New", monospace; /* Remove "11px" and replace "font" with "font-family" */

Attachments (3)

d291a99909d3fbdc9deccbb0db1f8965.gif (1.5 MB) - added by audrasjb 4 years ago.
5341.before.png (167.3 KB) - added by ocean90 4 years ago.
5341.after.png (166.1 KB) - added by ocean90 4 years ago.

Download all attachments as: .zip

Change History (9)

#1 @dd32
4 years ago

  • Owner set to dd32
  • Resolution set to fixed
  • Status changed from new to closed

In 10103:

Breathe: Use a more reasonable font-size for <code> tags.

The previous font-size was 11px, which was 2px smaller than the default paragraph font, seemingly to allow for the extra padding around the text.

Fixes #5341.

4 years ago

4 years ago

#2 @ocean90
4 years ago

  • Resolution fixed deleted
  • Status changed from closed to reopened

[10103] doesn't look good to me, see attached screenshots. Let's use a value that matches the font size of the parent element. .9em seems to be good alternative?

#3 @audrasjb
4 years ago

I agree with you @ocean90, .9em looks better and would fit most of the use cases. It looks better for both headings and paragraphs, but also in other edge cases I noticed like for example when the font size is increased or decreased using <small> or Guttenberg font-size selector.

#4 @dd32
4 years ago

In 10107:

Breathe: Try setting <code> font-size to 0.9em.

Props ocean90, audrasjb.
See #5341.

#5 @dufresnesteven
4 years ago

Anything left here or can we close this out?

#6 @coffee2code
7 months ago

  • Resolution set to fixed
  • Status changed from reopened to closed

Closing as fixed. Enough time has passed without further feedback or complaint.

Note: See TracTickets for help on using tickets.