MediaWiki talk:Common.css: Difference between revisions

From Rosetta Code
Content added Content deleted
(→‎Example Scrollbars: Open to suggestions.)
(→‎Example Scrollbars: Suggest using classical limits)
Line 25: Line 25:
Is there a way to make the scrollbars on the examples optional? Right now they show up ''everywhere'', and that's kind of ugly. It's particularly an issue on pages with short examples! Is there a way to make the scrollbars optional so they only show up when things get long or wide? (I'm no CSS hacker...) –[[User:Dkf|Donal Fellows]] 10:50, 26 January 2010 (UTC)
Is there a way to make the scrollbars on the examples optional? Right now they show up ''everywhere'', and that's kind of ugly. It's particularly an issue on pages with short examples! Is there a way to make the scrollbars optional so they only show up when things get long or wide? (I'm no CSS hacker...) –[[User:Dkf|Donal Fellows]] 10:50, 26 January 2010 (UTC)
: I'm not a CSS hacker, either; I expected browsers to be a little better behaved. I could tweak the highlight extension to add another CSS class based on how wide (in char count) an example is, but that would only work based on assuming a particular window width. I'm open to suggestions from anyone who reads this. --[[User:Short Circuit|Michael Mol]] 14:08, 26 January 2010 (UTC)
: I'm not a CSS hacker, either; I expected browsers to be a little better behaved. I could tweak the highlight extension to add another CSS class based on how wide (in char count) an example is, but that would only work based on assuming a particular window width. I'm open to suggestions from anyone who reads this. --[[User:Short Circuit|Michael Mol]] 14:08, 26 January 2010 (UTC)
:: I suggest for width you can probably use 80 columns as a switch point. Classic terminal width! For length, pick a value that's a page or so in your browser (or maybe 66; the classic length of a page of typewritten text). –[[User:Dkf|Donal Fellows]] 14:12, 26 January 2010 (UTC)

Revision as of 14:12, 26 January 2010

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)

Adsense

What's the story on this Adsense stuff? I haven't seen any ads come up yet. --Mwn3d 21:07, 10 January 2010 (UTC)

Only anonymous users will see ads. See advertisements in 2010 and the comment on this diff.
Even when I'm signed out I don't see ads. I only see a box for them. --Mwn3d 21:48, 10 January 2010 (UTC)
Two things are at play here. First, I have Adsense set up to only show relevant links, and not to fall back on more general "PSAs". Second, changes to Adsense configuration won't take effect until the site has been re-spidered, which they say may take up to two weeks.
The short version? The box will be empty until Adsense has something that might be relevant. Otherwise, it'll be empty. (I'd prefer the portlet to disappear if it were empty, but I don't know that there's an implementation out there that would do that for me. It would likely require hiding the div after crawling its contents to see if there's anything relevant.) --Michael Mol 14:52, 11 January 2010 (UTC)

Example Scrollbars

Is there a way to make the scrollbars on the examples optional? Right now they show up everywhere, and that's kind of ugly. It's particularly an issue on pages with short examples! Is there a way to make the scrollbars optional so they only show up when things get long or wide? (I'm no CSS hacker...) –Donal Fellows 10:50, 26 January 2010 (UTC)

I'm not a CSS hacker, either; I expected browsers to be a little better behaved. I could tweak the highlight extension to add another CSS class based on how wide (in char count) an example is, but that would only work based on assuming a particular window width. I'm open to suggestions from anyone who reads this. --Michael Mol 14:08, 26 January 2010 (UTC)
I suggest for width you can probably use 80 columns as a switch point. Classic terminal width! For length, pick a value that's a page or so in your browser (or maybe 66; the classic length of a page of typewritten text). –Donal Fellows 14:12, 26 January 2010 (UTC)