MediaWiki talk:Common.css: Difference between revisions

From Rosetta Code
Content added Content deleted
(\n)
(eh whatever)
Line 10: Line 10:
::::What I've seen is that a newline is highlighted as having a light green background (something like #66FF99). It looks like it highlighted a space at the end of the line. --[[User:Mwn3d|Mwn3d]] 19:40, 29 January 2009 (UTC)
::::What I've seen is that a newline is highlighted as having a light green background (something like #66FF99). It looks like it highlighted a space at the end of the line. --[[User:Mwn3d|Mwn3d]] 19:40, 29 January 2009 (UTC)
:::::There's two things going on there. First, GeshiCodeTag converts \ns in GeSHi's output to <nowiki><br/></nowiki> tags, regardless of language, because HTML ignores \n as far as formatting is concerned. Second, I'm pretty sure <nowiki><br></nowiki> isn't supposed to have any logical width, so actually seeing a background color there is most likely a rendering bug in your browser. The best thing I can think of for visibility is to leave the existing behavior there, but remove the background color for that element so as not to confuse it with a space. Or insert an image, but that could make copying and pasting difficult. --[[User:Short Circuit|Short Circuit]] 15:37, 30 January 2009 (UTC)
:::::There's two things going on there. First, GeshiCodeTag converts \ns in GeSHi's output to <nowiki><br/></nowiki> tags, regardless of language, because HTML ignores \n as far as formatting is concerned. Second, I'm pretty sure <nowiki><br></nowiki> isn't supposed to have any logical width, so actually seeing a background color there is most likely a rendering bug in your browser. The best thing I can think of for visibility is to leave the existing behavior there, but remove the background color for that element so as not to confuse it with a space. Or insert an image, but that could make copying and pasting difficult. --[[User:Short Circuit|Short Circuit]] 15:37, 30 January 2009 (UTC)
::::::I can't seem to find any examples that highlight newlines. Maybe I'm crazy. It's not that important anyway. Don't worry about it. --[[User:Mwn3d|Mwn3d]] 15:44, 30 January 2009 (UTC)

Revision as of 15:44, 30 January 2009

By the way...if anyone wants to see some CSS changes, feel free to leave a comment. --Short Circuit 21:59, 1 April 2008 (MDT)

Could you please add

.re2 { background-color: #ccccff; }
.re3 { background-color: #ffcccc; }

for Whitespace highlighting? --Ce 12:03, 26 January 2009 (UTC)

They're in. And they work. I thought newlines got highlighted too. Maybe that was only on some other websites. --Mwn3d 13:40, 26 January 2009 (UTC)
Thanks. Newlines don't seem to get any special markup in the HTML. There probably is a way to add that to GeSHi, but I don't know how. --Ce 15:37, 26 January 2009 (UTC)
What, specifically, are you looking for? --Short Circuit 19:23, 29 January 2009 (UTC)
What I've seen is that a newline is highlighted as having a light green background (something like #66FF99). It looks like it highlighted a space at the end of the line. --Mwn3d 19:40, 29 January 2009 (UTC)
There's two things going on there. First, GeshiCodeTag converts \ns in GeSHi's output to <br/> tags, regardless of language, because HTML ignores \n as far as formatting is concerned. Second, I'm pretty sure <br> isn't supposed to have any logical width, so actually seeing a background color there is most likely a rendering bug in your browser. The best thing I can think of for visibility is to leave the existing behavior there, but remove the background color for that element so as not to confuse it with a space. Or insert an image, but that could make copying and pasting difficult. --Short Circuit 15:37, 30 January 2009 (UTC)
I can't seem to find any examples that highlight newlines. Maybe I'm crazy. It's not that important anyway. Don't worry about it. --Mwn3d 15:44, 30 January 2009 (UTC)