Untentional CSS property padding-left: 15px on code tags?
Looks like the <code>
tag is unintentionally using padding-left: 15px
.
How things look:
How things should look:
Note: Current stylesheet is combined.css.h875472960.pack
It's been this way ever since the switch, over a year ago. I assumed it was a bizarre style choice, but looking at the CSS, you're right -- it does looks like a mistake (took me $$anonymous$$utes to find where Safari hid "Show Source," but then it shows all the style sheets very nicely.)
Searching there for "code," there's a nice section for "code pre," then just below are the specifics for just code (inline code,) and then code-blocks (I checked, yes, code blocks are a code tag in a pre tag.) So far, looks fine. A long-standing problem was scrolling on huge code sections, so someone obviously added "white-space: pre-wrap" to fix that. Oddly, inline code is set to no-wrap (but people rarely post 120+ character inline code, so maybe that's fine.)
But then you notice it uselessly has "white-space pre" just in front of pre-wrap. O$$anonymous$$ - maybe that's for off-brand browsers? Then, way, way, way down below, there's a second section setting just code back to to pre-wrap. It's like they didn't know you could just edit the part above. And then that funny 15px part.
It almost looks like someone was experimenting, and just tacked on that extra "code" style. Or is that part of a nested style-sheet (I can't use Safari well enough to know.) Or were they wanting to indent code blocks (pre code) 15px?
It’s a remarkably simple fix, which unfortunately can mean it goes ignored for a remarkably long time.
Looks like some 3rd party called Pretty Print is used for the syntax highlighting, and a padding-left: 15px
is used on the pre.prettyprint
selector.
This leads me to believe that the padding-left: 15px
on the code
selector could be a part of the Pretty Print stylesheet that doesn’t really work in this context (seeing as the code
selector has padding: 2px 4px
declared earlier in the source).
I use Chrome, so for the time being I have installed the Stylebot extension and manually overwritten the incorrect padding-left
.
$$anonymous$$y understanding is that they're using a third party product for UA and don't have access (or the desire) to fix things without waiting for the product to be updated. So I don't anticipate it being fixed.
answers.unity3d.com
is served from a different IP address than their main site, main blog, etc—so you’re probably right, it’s likely a hosted service that the answers
subdomain redirects to.
However, I think it’s safe to assume they have access in some form or another to an ad$$anonymous$$istrative panel of whatever platform they’re using—including the ability to update configuration, create new moderators, and I’m sure change templates… which would include the ability to include new stylesheets if they can't actually modify the culprit.
The desire to fix it however, as you’ve mentioned, is probably $$anonymous$$imal.