Wow, so many opt-outs, and a lot of probably-not-going-to-change ones.
Actually wanted pattern:
* "^mw-…"
Content-related classes we're probably not going to scrap:
* "^wikitable$"
Hard-to-change classes used in lots of skins:
* "^toc$"
* "^toctoggle$"
* "^tochidden$"
Necessary for over-rides/specificity battles:
* "^oo-ui-…"
Probably worth considering changing soon:
* "^client-js$"
* "^client-nojs$"
Some of the exemptions have been applied to deprecated styles (where they're being
renamed); some are for code in entirely deprecated areas themselves; some have the
"wrong" name but sit alongside classes with an appropriate one. And some are, very
clearly, in the wrong repo. Such sigh.
Change-Id: I9b8423d53b6750b5ca79d2f69e111f75c93c5bdc
{
"extends": "stylelint-config-wikimedia",
"rules": {
+ "selector-class-pattern": "^((mw|oo-ui)-|(wikitable|(toc(|toggle|hidden))|client-(no)?js)$)",
"no-descending-specificity": null,
-
"selector-max-id": null
}
}
* Copy of CC standard stylesheet, plus tweaks for iframe usage
*/
+/* stylelint-disable selector-class-pattern */
+
body {
margin: 0;
background: #eee;
+/* stylelint-disable selector-class-pattern */
+
.env-check {
font-size: 90%;
margin: 1em 0 1em 2.5em;
@import 'mediawiki.mixins';
+/* stylelint-disable selector-class-pattern */
+
/* Table Sorting */
.client-js .sortable:not( .jquery-tablesorter ) > thead > :last-of-type > th:not( .unsortable ),
+/* stylelint-disable selector-class-pattern */
+
.tipsy {
padding: 5px;
position: absolute;
+/* stylelint-disable selector-class-pattern */
+
.jquery-confirmable-button {
/* Automatically flipped */
margin-left: 1ex;
/* suggestions plugin */
+/* stylelint-disable selector-class-pattern */
+
.suggestions {
overflow: hidden;
position: absolute;
/* Show/hide animation is incorrect if the table has a margin set. Extra
* ".wikitable" is needed in the selector for CSS specificity. */
+/* stylelint-disable-next-line selector-class-pattern */
.wikitable.preview-limit-report {
margin: 0;
}
* Styles for elements of the editing form.
*/
+/* stylelint-disable selector-class-pattern */
+
/*
* Add a bit of margin space between the preview and the toolbar.
* This replaces the ugly <p><br /></p> we used to insert into the page source
+/* stylelint-disable selector-class-pattern */
+
/* Styles for the JavaScript enhancements of the history page */
#pagehistory li.before input[ name='oldid' ],
* Basic styles for the edit revision history page 'HistoryAction.php'
*/
+/* stylelint-disable selector-class-pattern */
+
// Trigger only when collapsible & JS is available via `.mw-collapsed`.
#mw-history-search.mw-collapsed .oo-ui-fieldsetLayout-header .oo-ui-labelElement-label {
margin-bottom: 0;
}
}
+/* stylelint-disable-next-line selector-class-pattern */
.redirect-in-category {
font-style: italic;
}
* File description page
*/
+/* stylelint-disable selector-class-pattern */
+
.mw-filepage-resolutioninfo {
font-size: smaller;
}
}
@media print {
+ /* stylelint-disable-next-line selector-class-pattern */
.mw_metadata .mw-metadata-show-hide-extended {
display: none;
}
@import 'mediawiki.mixins';
+/* stylelint-disable selector-class-pattern */
+
.postedit-container {
margin: 0 auto;
position: fixed;
+/* stylelint-disable-next-line selector-class-pattern */
.postedit {
top: 6em;
}
* Display neat icons on redirect pages.
*/
+/* stylelint-disable selector-class-pattern */
+
/* Hide, but keep accessible for screen-readers. */
.redirectMsg p {
overflow: hidden;
+/* stylelint-disable selector-class-pattern */
+
.apihelp-header {
clear: both;
margin-bottom: 0.1em;
+/* stylelint-disable selector-class-pattern */
+
.mw-special-ApiHelp h1.firstHeading {
display: none;
}
padding: 0.5em 1em;
}
+/* stylelint-disable-next-line selector-class-pattern */
.mw-json .value,
.mw-json-single-value {
background-color: #dcfae3;
border-bottom: 1px solid #eee;
word-wrap: break-word;
+ /* stylelint-disable-next-line selector-class-pattern */
&.nr {
text-align: right;
}
+ /* stylelint-disable-next-line selector-class-pattern */
span.stats {
color: #727272;
}
cursor: pointer;
}
+ /* stylelint-disable-next-line selector-class-pattern */
&.current {
background-color: #dedede;
}
* Diff rendering
*/
+/* stylelint-disable selector-class-pattern */
+
.diff {
border: 0;
border-spacing: 4px;
+/* stylelint-disable selector-class-pattern */
/*!
* Diff rendering
*/
/* Styles for links to RSS/Atom feeds in sidebar */
+/* stylelint-disable-next-line selector-class-pattern */
a.feedlink {
/* SVG support using a transparent gradient to guarantee cross-browser
* compatibility (browsers able to understand gradient syntax support also SVG).
@import 'mediawiki.ui/variables';
+/* stylelint-disable selector-class-pattern */
+
// Increase the area of the button, so that the user can move the mouse cursor
// to the popup without the popup disappearing. (T157544)
.mediawiki-filewarning-anchor {
* Stylesheet for mediawiki.hlist module
* @author [[User:Edokter]]
*/
+
+/* stylelint-disable selector-class-pattern */
+
/* Generate interpuncts */
.hlist dt:after {
content: ':';
+/* stylelint-disable-next-line selector-class-pattern */
.hlist {
dl,
ol,
@import 'mediawiki.mixins';
+/* stylelint-disable selector-class-pattern */
+
// OOUIHTMLForm styles
@ooui-font-size-browser: 16; // assumed browser default of `16px`
@ooui-font-size-base: 0.875em; // equals `14px` at browser default of `16px`
content: '. .';
}
+/* stylelint-disable-next-line selector-class-pattern */
.comment--without-parentheses,
.mw-changeslist-links,
.mw-diff-bytes,
* Copyright Alexander Limi
*/
+/* stylelint-disable selector-class-pattern */
+
/**
* Hide all the elements irrelevant for printing
* Skins however can and should override.
* CologneBlue, the old pre-Monobook skins
*/
+/* stylelint-disable selector-class-pattern */
+
/* For clarity, explicitly state some recommendations from
* https://www.w3.org/TR/CSS21/sample.html to make sure the editsection links scale right
*/
* blocking CSS common to all pages.
*/
+/* stylelint-disable selector-class-pattern */
+
/* GENERAL CLASSES FOR DIRECTIONALITY SUPPORT */
/**
+/* stylelint-disable selector-class-pattern */
+
/* Galleries */
/* These display attributes look nonsensical, but are needed to support IE and FF2 */
/* Don't forget to update gallery.print.css */
+/* stylelint-disable selector-class-pattern */
li.gallerybox {
vertical-align: top;
display: inline-block;
* in MediaWiki (used e.g. on Special:ListFiles).
*/
+/* stylelint-disable selector-class-pattern */
+
@import 'mediawiki.mixins';
// TablePager uses `.mw-datatable` and is loaded in the right order by RL
@import 'mediawiki.ui/variables';
@import 'mw.rcfilters.mixins';
+/* stylelint-disable selector-class-pattern */
+
@rcfilters-spinner-size: 12px;
@rcfilters-head-min-height: 210px;
@rcfilters-head-margin-bottom: 20px;
+/* stylelint-disable selector-class-pattern */
+
/* Make sure the links are not underlined or colored, ever. */
/* There is already a :focus / :hover indication on the <div>. */
.suggestions a.mw-searchSuggest-link,
* (ie: the CSS classing built into the system), like the TOC.
*/
+/* stylelint-disable selector-class-pattern */
+
/* Table of Contents */
.toc,
.mw-warning,
* Icons and colors for external links.
*/
+/* stylelint-disable selector-class-pattern */
+
@import 'mediawiki.mixins';
.mw-parser-output a.external,
* Style Parsoid HTML+RDFa output consistent with wikitext from PHP parser.
*/
+/* stylelint-disable selector-class-pattern */
+
/*
* Auto-numbered external links
* Parsoid renders those as link without content, and lets CSS do the
* This style sheet is used by the Monobook and Vector skins.
*/
+/* stylelint-disable selector-class-pattern */
+
/* Links */
a {
text-decoration: none;
* they are outputted by the actual MonoBook/Vector code by convention.
*/
+/* stylelint-disable selector-class-pattern */
+
/* Categories */
.catlinks {
border: 1px solid #a2a9b1;
min-width: 6em;
}
+/* stylelint-disable-next-line selector-class-pattern */
.apihelp-deprecated {
font-weight: bold;
color: #d33;
}
+/* stylelint-disable-next-line selector-class-pattern */
.apihelp-deprecated-value .oo-ui-labelElement-label {
text-decoration: line-through;
}
}
/* Show/hide arrows in enhanced changeslist */
+/* stylelint-disable-next-line selector-class-pattern */
.mw-enhanced-rc .collapsible-expander {
float: none;
}
font-weight: bold;
}
+/* stylelint-disable-next-line selector-class-pattern */
span.changedby {
font-size: 95%;
}
@import 'mediawiki.ui/variables.less';
@import 'mediawiki.mixins';
+/* stylelint-disable selector-class-pattern */
+
.mw-searchresults-has-iw {
.iw-headline {
font-weight: bold;
/* Special:Search */
+/* stylelint-disable selector-class-pattern */
+
/*
* Fixes sister projects box moving down the extract
* of the first result (T18886).
margin-top: 6px;
}
+/* FIXME: These should be namespaced to mw-ext-confirmedit-fancycaptcha-, and really shouldn't be in core at all */
+/* stylelint-disable-next-line selector-class-pattern */
.fancycaptcha-captcha-container {
background-color: #f8f9fa;
margin-bottom: 15px;
}
/* Put a border around the fancycaptcha-image-container. */
+/* stylelint-disable-next-line selector-class-pattern */
.fancycaptcha-captcha-and-reload {
border: 1px solid #c8ccd1;
border-radius: 2px 2px 0 0;
background-color: #fff;
}
+/* stylelint-disable-next-line selector-class-pattern */
.fancycaptcha-captcha-container .mw-ui-input {
margin-top: -1px;
border-color: #c8ccd1;
}
/* Make the fancycaptcha-image-container full-width within its parent. */
+/* stylelint-disable-next-line selector-class-pattern */
.fancycaptcha-image-container {
width: 100%;
}
margin-bottom: 30px;
}
+/* stylelint-disable-next-line selector-class-pattern */
.mw-number-text.icon-edits {
/* @embed */
background: url( images/icon-edits.png ) no-repeat left center;
}
+/* stylelint-disable-next-line selector-class-pattern */
.mw-number-text.icon-pages {
/* @embed */
background: url( images/icon-pages.png ) no-repeat left center;
}
+/* stylelint-disable-next-line selector-class-pattern */
.mw-number-text.icon-contributors {
/* @embed */
background: url( images/icon-contributors.png ) no-repeat left center;
* Styles for Special:MovePage
*/
+/* stylelint-disable-next-line selector-class-pattern */
.movepage-wrapper {
width: 50em;
}
*/
/* Distinguish actual data from information about it being hidden visually. */
+/* stylelint-disable-next-line selector-class-pattern */
.prop-value-hidden {
font-style: italic;
}
*/
@import 'mediawiki.mixins';
+/* stylelint-disable selector-class-pattern */
+
/* Special:AllMessages */
/* Visually hide repeating text, but leave in for better form navigation on screen readers */
.mw-special-Allmessages .mw-htmlform-ooui .oo-ui-fieldsetLayout:first-child .oo-ui-fieldsetLayout-header {
/* This style is loaded on all media. */
/* Hide the content of the TOC when the checkbox is checked. */
+/* stylelint-disable-next-line selector-class-pattern */
.toctogglecheckbox:checked ~ ul {
display: none;
}
/* Hide the complete TOC on print when the TOC is hidden. */
+/* stylelint-disable-next-line selector-class-pattern */
.toctogglecheckbox:checked + .toctitle {
display: none;
}
/* This style adds a toggle button with internationalized message for the TOC. */
+/* stylelint-disable selector-class-pattern */
+
/* When the browser supports :checked then overwrite the style="display:none" and make the */
/* checkbox invisible on another way to allow to focus the checkbox with keyboard. */
:not( :checked ) > .toctogglecheckbox {
@import 'mediawiki.mixins';
@import 'mediawiki.ui/variables';
+/* stylelint-disable selector-class-pattern */
+
// Buttons
// Helper mixins
// Primary buttons mixin
@import 'mediawiki.mixins';
@import 'mediawiki.ui/variables';
+/* stylelint-disable selector-class-pattern */
+
// --------------------------------------------------------------------------
// Layouts
// --------------------------------------------------------------------------