Look at this comment in GitHub, joomla/joomla-cms#5317 (comment) and in Jissues, http://issues.joomla.org/tracker/joomla-cms/5317#event-52418: there is a significant difference in the rendering, the GitHub one being preferable.
Agreed! Please keep in mind that what you see in the above cited comment is markdown "inline code" and not "multiline (fenced) code". I don't know if the same styling is applied to both... As a test and reference I'm adding the two of them to this comment:
Long "inline code":
The quick brown fox jumps over the lazy dog. The quick brown fox jumps over the lazy dog. The quick brown fox jumps over the lazy dog. The quick brown fox jumps over the lazy dog. The quick brown fox jumps over the lazy dog.
Multiline code with long lines:
The quick brown fox jumps over the lazy dog. The quick brown fox jumps over the lazy dog. The quick brown fox jumps over the lazy dog. The quick brown fox jumps over the lazy dog. The quick brown fox jumps over the lazy dog.
The quick brown fox jumps over the lazy dog. The quick brown fox jumps over the lazy dog. The quick brown fox jumps over the lazy dog. The quick brown fox jumps over the lazy dog. The quick brown fox jumps over the lazy dog.
The quick brown fox jumps over the lazy dog. The quick brown fox jumps over the lazy dog. The quick brown fox jumps over the lazy dog. The quick brown fox jumps over the lazy dog. The quick brown fox jumps over the lazy dog.
... and let's see how it is rendered!
OK, seen: the first is translated into a <code>...</code>
HTML element, while the latter is translated into a <pre>...</pre>
element, so we can easily differentiate the two...
As a first approximation solution, remove the white-space: nowrap;
styling for the <code>
element
... and add line-height: 24px;
(or 22px)
Sorry, I just noticed the multiline fenced code is not just <pre>...</pre>
but <pre><code>...</code></pre>
I'm working on it... will report here...
For a better rendering of the fenced (multiline) code:
in template.css:
@line 848 (pre code)
modify: white-space: pre;
@line 828 (pre)
remove: word-break: break-all;
remove: word-wrap: break-word;
in diff.css
@line 92 (pre)
remove: width: 100%;
modify: overflow: scroll;
And for the inline code:
in template.css:
@line 821 (code)
remove: white-space: nowrap;
add: line-height: 24px;
... but also:
in template.css:
@line 848 (pre code)
add: line-height: initial;
OK, I did the modifications you suggested (without knowing actually what I'm doing..)
So could you check again please?
Looks a bit better, some overflow on the site with a multiline block, but definitely seems better than before.
This comment was created with the J!Tracker Application at issues.joomla.org/jtracker/573.
if you want...
Of course I do, thanks a bunch!
Seems like nobody in our team is a big fan of touching CSS code
Oh, I think we can close this one. Feel free to submit a new PR if you find anything missing
Status | New | ⇒ | Closed |
Closed_Date | 0000-00-00 00:00:00 | ⇒ | 2014-12-07 03:00:28 |
@elkuku You're welcome!
After a second thought I'm not convinced of what I did for inline code: I think it will not render nicely when some inline text is placed inside a long paragraph of normal text. Let me check here:
Lorem ipsum dolor sit amet, consectetur adipiscing elit. Itaque hic ipse iam pridem est reiectus; Nam quid possumus facere melius? Nam ante Aristippus, et ille melius. Duo Reges: constructio interrete. Sin kakan malitiam dixisses, ad aliud nos unum certum
vitium consuetudo Latina traduceret. Quam nemo umquam voluptatem appellavit, appellat; Parvi enim primo ortu sic iacent, tamquam omnino sine animo sint. Virtutis, magnitudinis animi, patientiae, fortitudinis fomentis dolor mitigari solet.
Confirmed: the line where the inline code falls in has a different vertical spacing, which is not nice.
I'll send another PR...
This comment was created with the J!Tracker Application at issues.joomla.org/jtracker/573.
Looks more like our own CSS issue, not really an issue with the markdown
renderer.
On Sat, Dec 6, 2014 at 8:03 AM, Sergio Manzi (smz) <notifications@github.com