Help:Cascading Style Sheets: Difference between revisions

Content deleted Content added
m Reverted edit by Sammy3523 (talk) to last version by John of Reading
Tag: Reverted
Line 23:
;Browser-specific fixes (also skin-specific):
Examples for Monobook:
*For Firefox: [https://phabricator.wikimedia.org/diffusion/SVN/browse/trunk/phase3/skins/monobook/FF2Fixes.css monobook/FF2Fixes.css]
*For Internet Explorer: [https://phabricator.wikimedia.org/diffusion/SVN/browse/trunk/phase3/skins/monobook/IE60Fixes.css monobook/IE60Fixes.css] [https://phabricator.wikimedia.org/diffusion/SVN/browse/trunk/phase3/skins/monobook/IE70Fixes.css monobook/IE70Fixes.css]
*For Opera: [https://phabricator.wikimedia.org/diffusion/SVN/browse/trunk/phase3/skins/monobook/Opera6Fixes.css monobook/Opera6Fixes.css] [https://phabricator.wikimedia.org/diffusion/SVN/browse/trunk/phase3/skins/monobook/Opera7Fixes.css monobook/Opera7Fixes.css] [https://phabricator.wikimedia.org/diffusion/SVN/browse/trunk/phase3/skins/monobook/Opera9Fixes.css monobook/Opera9Fixes.css]
 
===Site-wide style-sheets===
 
* Site-wide for all skins (desktop view only): [[MediaWiki:Common.css]]
Line 33 ⟶ 29:
* Site-wide per skin: [[MediaWiki:Vector.css]], [[MediaWiki:Monobook.css]], etc.
* Site-wide for user groups: [[MediaWiki:Group-user.css]], [[MediaWiki:Group-autoconfirmed.css]], etc.
*
* Site-wide for specialist purposes: [[MediaWiki:Print.css]], [[MediaWiki:Noscript.css]], [[MediaWiki:Filepage.css]]
* Site-wide if gadgets loaded: see [[Wikipedia:Gadget]] for more information
 
Note: MediaWiki sites other than English Wikipedia may use <code>MediaWiki:Gadget-site.css</code> instead of MediaWiki:Common.css.
 
===Page-specific style-sheets===
 
Page-specific style-sheets may be introduced through [[Wikipedia:TemplateStyles|TemplateStyles]]. Pages, particularly templates, may also have inline CSS.
 
Some pages have their own CSS, e.g., [[MediaWiki:FileUploadWizard.cssFileUploadWi sheets are ''not'' [[Help:User style|user style sheets]].
 
===User-specific style-sheets===
 
* Global user-specific for all skins: [[meta:Special:MyPage/global.css]]
* User-specific for all skins: [[Special:MyPage/common.css]]
* User-specific per skin: e.g., [[Special:MyPage/vector.css]], or [[Special:MyPage/skin.css]] for your current skin
* User-specific CSS loaded through JavaScript, e.g., loaded at [[Special:MyPage/common.js]]
* User-specific web-wide browser settings: local file referred to in the browser settings, or directly set in the browser
 
Note that in CSS terminology, the user-specific style sheets are ''not'' [[Help:User style|user style sheets]].
 
===Usage===
Line 61 ⟶ 42:
 
Similarly, an ID may be produced by the software, e.g., bodyContent, or taken from the wikitext.
].
 
In the case of conflicting style settings for a piece of content, the resulting setting depends primarily on the indication "!important". Secondarily, if both are important, the user wins, if neither is, the author wins. Tertiarily it depends on specificity. Only lastly, it depends on order between and within style sheets: the last wins. Thus, a User:''username''/monobook.css does not win from MediaWiki:Monobook.css (both author, not user) if the specificity of the latter is greater. See also [http://www.w3.org/TR/REC-CSS2/cascade.html cascade].
 
== Supported elements ==