MediaWiki talk:Common.css

hiddenStructure
Please add /* hiddenStructure from Monobook - allows selective hiding of markup in templates */ .hiddenStructure { display: none; speak: none; }

/* Book Infobox color. Copy to your user CSS to change color. */ .bookInfobox-color { background: #FFE1FF; } to this file. Thanks, hagindaz 04:40, 11 June 2006 (UTC)


 * There's also some helpful code on Wikipedia that you might want to add, such as messagebox style and BC-AD/BCE-CE choice for users. --hagindaz 17:01, 11 June 2006 (UTC)

CSS classes
and while I'm here, it would be a good idea to add CSS classes too. It's for the best, since once these are in, you can construct them more like the original messageboxes. ViperSnake151 (talk) 16:11, 11 August 2008 (UTC)


 * I've updated your proposed CSS. I think doing it like I've updated it, would allow templates to be used across namespaces, without anything needing to be changed from the user's perspective, which makes it easier to use. -- dark lama  16:51, 11 August 2008 (UTC)
 * So is this ready to go? If so, perhaps Darklama would take care of it. &mdash; Mike.lifeguard &#124; talk 00:04, 3 September 2008 (UTC)
 * I had to make some more adjustments, but I added this almost a month ago, since it seemed reasonably safe to do. -- dark lama  15:02, 3 September 2008 (UTC)
 * Then we don't need the editprotected template any longer. &mdash; Mike.lifeguard &#124; talk 15:32, 3 September 2008 (UTC)

TOClimit
To allow TOClimit settings, as discussed at [fixing the common css file], the following needs to be added to this file /* Allow limiting of which header levels are shown in a TOC;, for instance, will limit to showing ==headings== and ===headings=== but no further (as long as  there are no =headings= on the page, which there shouldn't be according to the MoS). */ .toclimit-2 .toclevel-2 {display:none;} .toclimit-3 .toclevel-3 {display:none;} .toclimit-4 .toclevel-4 {display:none;} .toclimit-5 .toclevel-5 {display:none;} .toclimit-6 .toclevel-6 {display:none;} .toclimit-7 .toclevel-7 {display:none;} I guess it might be sensible to add the preceding 13 lines too, i.e.: /* When is used on the table of contents, the ToC will display without numbers */ .nonumtoc .tocnumber { display:none; } .nonumtoc #toc ul, .nonumtoc .toc ul { line-height: 1.5em; list-style: none; margin: .3em 0 0; padding: 0; } .nonumtoc #toc ul ul, .nonumtoc .toc ul ul { margin: 0 0 0 2em; } HYanWong (talk) 00:30, 14 December 2008 (UTC)
 * ✅ Thanks. HYanWong (talk) 13:45, 17 December 2008 (UTC)

Diff style
Hello, we have noticed that after the deployment of MediaWiki 1.20wmf1 an old local customised diff style has not been removed from this page. 1.20 brings a new, greatly improved diff style which is no longer compatible with older customisations. To prevent the new release from worsening rather than improving your diffs, a global interface editor has agreed to help you by removing the old code in a week from now unless you object. You'll then be able to see if the new style suits you or needs a new customisation. I hope this helps, Nemo bis (discuss • contribs) 20:54, 5 August 2012 (UTC)
 * I doubt anyone will complain, although you may find the change gets made locally by a sysop anyway - thanks QU  TalkQu 22:06, 5 August 2012 (UTC)
 * Done - Hoo man (discuss • contribs) 20:13, 18 August 2012 (UTC)

External links icons removed
Hello! If this CSS adds or modifies icons shown after external links, you'll be interested in knowing that such icons have been removed from MediaWiki core, a change which will reach this wiki in few days. You may want to consider whether you still need them. If you have questions, please ask at 63725. Regards, Nemo 09:45, 10 April 2014 (UTC)

Body note template
Template:Body note has inline css, which messes up custom styles. I think it would be reasonable to move the style defined in the template to this file. Kenionatus (discuss • contribs) 08:02, 4 February 2020 (UTC)
 * To clarify, what is the problem to be addressed here? I mean, in what way does the current arrangement of the template 'mess up custom styles'? --Pi zero (discuss • contribs) 15:08, 4 February 2020 (UTC)
 * Disclamer: I am absolutely not proficient with css, so I might be talking bs. That's also the reason I did not provide the code for this request. I don't want to introduce a mistake that messes up the whole site. Why I think the change is needed: The template doesn't define a class tag. So its style cannot be changed by the users custom css file. The inline css also takes precedence over css files. In order to be able to override the templates style, a class needs to be defined for the body note box and the css must be moved to this file. Kenionatus (discuss • contribs) 12:03, 9 February 2020 (UTC)
 * I believe you are correct on all these points. (I don't consider myself an expert on css either, but my standards may be skewed; I suspect both of us know more about it than the average internet-user-on-the-street.)  It occurs to me, though, that there are some other, more prominent templates on Wikibooks that use inline css.  We may want to gather some sense of the overall landscape of inline css on the project first, so our conversions, though likely still one-at-a-time, can be reasonably orderly. --Pi zero (discuss • contribs) 13:34, 9 February 2020 (UTC)

On the one hand, it would be better to allow the overriding of a template CSS class, but on the other hand, it would mean to load this class into every page, even if its template isn't called. As a the number of overriders would be much inferior as the number of visitors of pages without this template, I'm declining the class addition suggestion. JackPotte (discuss • contribs) 11:28, 28 March 2020 (UTC)