Help:CSS
| Driver's Manual | ||||||||||||
| Page | ||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|
| New • Search • Info • Move • Delete | ||||||||||||
| Editing | ||||||||||||
| ||||||||||||
| Account | ||||||||||||
| Account • Preferences | ||||||||||||
| Directory... | ||||||||||||
CSS (Cascading Style Sheets) are a fundamental part of web development, responsible for defining the visual format and layout—the actual appearance—of each element in the HTML structure (or DOM).
Methods of use
- Inline, using the
styleattribute in a raw tag. This will always take priority over sheet rules. - Defining rules in style sheets, targeted by specific names and attributes, most commonly
classandid.- Internal files - Preferred due to ResourceLoader compatibility. In short: These run before page display thus minimizing FUOC&mdash:Flash Of Unstyled Content—right as the page loads.
- Sitewide
.csssheet pages within theMediaWiki:namespace, for example MediaWiki:Common.css or a gadget.edit-interfacepermission required (sysop(?)). Convenient, but unfortunately not BPD for security reasons. - Per-template
.csssubpages using the<templatestyles>sanitizedcontent model.
Rule syntax
.class {
property: value;
}
Note: Use css for $lang in <syntaxhighlight>. {{code}} also has several options for individual item types.
Properties
The following properties are covered as part of other tutorials in the local documentation of this wiki:
background, background-color, background-image, border, border-bottom, border-color, border-left, border-right, border-style, border-top, border-width, box-shadow, color, display, font, font-size, font-style, font-variant, font-weight, line-height, list-style-image, list-style-type, order, outline, overflow-x, text-align, text-decoration, text-decoration-line, text-decoration-style, text-decoration-thickness, text-transform, vertical-align, visibility, [[Template:Pixarpedia bio#background-color|background-color]]
Full lists can be found on sites such as Mozilla MDN or W3 Schools.
List of style sheets
Internal
/extensions/AjaxPoll/resources/ajaxpoll.css/resources/src//mediawiki.special.changeslist.legend.less/resources/src//mediawiki.special.preferences.styles.ooui.less/resources/src/mediawiki.rcfilters/styles/mw.rcfilters.less/resources/src/mediawiki.rcfilters/styles/mw.rcfilters.ui.ChangesListWrapperWidget.less/resources/src/mediawiki.skinning/interface.category.less/resources/src/mediawiki.special/special.less/resources/src/mediawiki.special/upload.css/resources/src/mediawiki.special/version.css
Site
| Name | Scope | Notes |
|---|---|---|
| Common.css | Global | |
| Vector.css | Desktop | |
| Not CSS but listed here until further notice: | ||
| Common.js | Global | |
Templates
- Template:SS/styles.css
- Template:Msg group/styles.css
- Template:Featured/styles.css
- Template:Full page notice/styles.css
- Template:Banner notice/styles.css
- Template:News/styles.css
- Template:Notice/styles.css
- Template:Media types/styles.css
- Template:Aboutfile/styles.css
- Template:Welcome/styles.css
- Template:Project template/styles.css
- Template:DocBox/styles.css
- Template:Wikitext/styles.css
- Template:Main page box/styles.css
- Template:Poll/styles.css
- Template:Tdoc/styles.css
- Template:Infobox/styles.css
- Template:Vehicle infobox/styles.css
- Template:Character infobox/styles.css
- Template:Latest Cars/styles.css
- Template:Help box/styles.css
- Template:Case/styles.css

