sander / code-illuminated

Automatically exported from code.google.com/p/code-illuminated
0 stars 0 forks source link

Code blocks have incorrect spacing #13

Open GoogleCodeExporter opened 9 years ago

GoogleCodeExporter commented 9 years ago
Since the r26 commit, which introduced prettify for syntax highlighting,
code blocks are separated by whitespace. I've tested in Chromium 3.0.184.0
and Firefox 3.5pre (20090609).

I haven't been able to find the cause yet, but I tried using Firebug and
adding margin:0 to .code in docs.css.

Original issue reported on code.google.com by sander.d...@gmail.com on 9 Jun 2009 at 5:07

Attachments:

GoogleCodeExporter commented 9 years ago
As Alberto noticed in chat, this is likely caused by the switch from DIV to PRE 
for
code blocks.

I've fixed this for Chromium and Firefox on Linux in revision 275043ee62 of the
fixspacing branch. Can anyone check whether the problem is fixed for IE and 
Windows
too? There might be some subtleties with newline differences.

(I'll merge this branch into master if it fixes the problem well. Probably a bit
overkill for this small issue, but I like experimenting with the new DVCS. :-)

Original comment by sander.d...@gmail.com on 10 Jun 2009 at 11:59

GoogleCodeExporter commented 9 years ago
In FF 3.0.10 it is ok.
In IE8 (on Vista) the code blocks are separated by blank lines.

Original comment by albertos...@gmail.com on 11 Jun 2009 at 7:31

GoogleCodeExporter commented 9 years ago
Revision ce9f93f657 is another attempt to fix the issue. It seems to fix the 
layout
well for IE8, but in the IE7 'compatibility mode' I still get incorrect spacing.
Adding extra padding to each code block may help, but may also break the layout.

By the way, I'm just adding blank lines to the code blocks without exactly 
knowing
why they're needed. It might not be the correct way to do it at all.

Original comment by sander.d...@gmail.com on 11 Jun 2009 at 4:10

GoogleCodeExporter commented 9 years ago
Merged the fixspacing branch into master (revision 3ed92b44bf), still without 
solving
the problem for IE. Alberto mentioned my fix didn't work well in IE8 either, so 
it's
probably not the right solution yet.

Original comment by sander.d...@gmail.com on 11 Jun 2009 at 8:29