avatar smanzi
smanzi
6 Dec 2014

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.

avatar smanzi smanzi - open - 6 Dec 2014
avatar smanzi smanzi - change - 6 Dec 2014
The description was changed
avatar smanzi smanzi - change - 6 Dec 2014
The description was changed
avatar mbabker
mbabker - comment - 6 Dec 2014

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

wrote:

Look at this comment in GitHub, joomla/joomla-cms#5317 (comment)
joomla/joomla-cms#5317 (comment)
and in Jssues,
http://issues.joomla.org/tracker/joomla-cms/5317#event-52418: there is
significative differences in the rendering, The GitHub one being preferable.


Reply to this email directly or view it on GitHub
#573.

avatar smanzi
smanzi - comment - 6 Dec 2014

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! :smile:

avatar smanzi
smanzi - comment - 6 Dec 2014

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...

avatar smanzi
smanzi - comment - 6 Dec 2014

As a first approximation solution, remove the white-space: nowrap; styling for the <code> element

avatar smanzi
smanzi - comment - 6 Dec 2014

... and add line-height: 24px; (or 22px)

avatar smanzi
smanzi - comment - 6 Dec 2014

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...

avatar smanzi
smanzi - comment - 6 Dec 2014

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;
avatar smanzi
smanzi - comment - 6 Dec 2014

And for the inline code:

in template.css:
    @line 821 (code)
        remove: white-space: nowrap;
        add: line-height: 24px;
avatar smanzi
smanzi - comment - 6 Dec 2014

... but also:

in template.css:
    @line 848 (pre code)
        add: line-height: initial;
avatar elkuku elkuku - reference | - 6 Dec 14
avatar elkuku
elkuku - comment - 6 Dec 2014

OK, I did the modifications you suggested (without knowing actually what I'm doing..)
So could you check again please?

avatar mbabker
mbabker - comment - 6 Dec 2014

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.

avatar smanzi
smanzi - comment - 6 Dec 2014

@elkuku & @mbabker Confirmed: better but not perfect. That's strange... when I did the modifications locally (using Firefox Inspector) it was really OK, without overflow.

I'll check again & report later on...

avatar smanzi
smanzi - comment - 6 Dec 2014

got it! Easy!
@elkuku : I think you forgot to remove width: 100%; at line 92 of /jtracker/core/css/diff.css

avatar smanzi
smanzi - comment - 6 Dec 2014

@elkuku contrary to what I said before, there is no need, to put overflow: scroll in that line

avatar smanzi
smanzi - comment - 6 Dec 2014

@elkuku you have PR #574 if you want...

avatar elkuku
elkuku - comment - 7 Dec 2014

if you want...

Of course I do, thanks a bunch!
Seems like nobody in our team is a big fan of touching CSS code :wink:

avatar elkuku elkuku - close - 7 Dec 2014
avatar elkuku
elkuku - comment - 7 Dec 2014

Oh, I think we can close this one. Feel free to submit a new PR if you find anything missing :wink:

avatar elkuku elkuku - close - 7 Dec 2014
avatar elkuku elkuku - change - 7 Dec 2014
Status New Closed
Closed_Date 0000-00-00 00:00:00 2014-12-07 03:00:28
avatar smanzi
smanzi - comment - 7 Dec 2014

@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.

avatar smanzi
smanzi - comment - 7 Dec 2014

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.

Add a Comment

Login with GitHub to post a comment