Danbooru

<code> block in translation notes

Posted under Bugs & Features

Somethings I noticed while looking at post #3447971, specifically the first translation note in the third panel ("The Yamato-class!?"). This is its content:

<b><span style="font-size:166%"><code>The <i>Yamato-class</i>!?</code></span></b>

It appears that the <code> block, besides using a monospace font, also sets font size and font style (bold/italic). Since it is inside the <b> and <span> blocks it overrides their formatting (removing the bold and normalizing the font size, but see below), while not affecting the <i> block which it encloses in turn. This seems undesirable behavior, and is at best undocumented, since about:note_formatting makes no mention of it.

More seriously, it is apparent that whatever is provisioning the size of the note box is at least in part doing so based on "font-size:166%", despite the style being overridden and having no effect on the text itself. This can be made more obvious by jacking font-size up really high, like 1000%.

Edit: correctly escaped markup

Updated

The correct way to get a monospace font in a note would be to use the font-family:monospace CSS property, but I guess that won’t help with legacy notes or the fact that <code> is still allowed and not working as expected.

1