Add stylelint for css and less files

Fixed the following rules:
- number-leading-zero
- length-zero-no-unit
- string-quotes
- max-empty-lines
- selector-pseudo-element-colon-notation
- at-rule-empty-line-before
- at-rule-name-space-after
- media-feature-parentheses-space-inside
- color-hex-case
- declaration-block-semicolon-space-bef
- declaration-property-value-blacklist

Change-Id: Id0b43bff22b3f9ae9b912bd886e2da4c8576b165
isekai
Umherirrender 8 years ago
parent 7af591fd4a
commit 77ff62c02c

@ -0,0 +1,9 @@
{
"extends": "stylelint-config-wikimedia",
"rules": {
"no-duplicate-selectors": null,
"selector-no-id": null,
"declaration-no-important": null,
"no-descending-specificity": null
}
}

@ -3,6 +3,7 @@ module.exports = function ( grunt ) {
grunt.loadNpmTasks( 'grunt-contrib-jshint' ); grunt.loadNpmTasks( 'grunt-contrib-jshint' );
grunt.loadNpmTasks( 'grunt-jsonlint' ); grunt.loadNpmTasks( 'grunt-jsonlint' );
grunt.loadNpmTasks( 'grunt-banana-checker' ); grunt.loadNpmTasks( 'grunt-banana-checker' );
grunt.loadNpmTasks( 'grunt-stylelint' );
grunt.initConfig( { grunt.initConfig( {
jshint: { jshint: {
@ -18,12 +19,21 @@ module.exports = function ( grunt ) {
jsonlint: { jsonlint: {
all: [ all: [
'**/*.json', '**/*.json',
'.stylelintrc',
'!node_modules/**', '!node_modules/**',
'!vendor/**' '!vendor/**'
] ]
},
stylelint: {
all: [
'**/*.css',
'**/*.less',
'!resources/libraries/**',
'!node_modules/**'
]
} }
} ); } );
grunt.registerTask( 'test', [ 'jshint', 'jsonlint', 'banana' ] ); grunt.registerTask( 'test', [ 'jshint', 'jsonlint', 'banana', 'stylelint' ] );
grunt.registerTask( 'default', 'test' ); grunt.registerTask( 'default', 'test' );
}; };

@ -8,6 +8,8 @@
"grunt-cli": "0.1.13", "grunt-cli": "0.1.13",
"grunt-contrib-jshint": "0.11.3", "grunt-contrib-jshint": "0.11.3",
"grunt-banana-checker": "0.4.0", "grunt-banana-checker": "0.4.0",
"grunt-jsonlint": "1.0.7" "grunt-jsonlint": "1.0.7",
"grunt-stylelint": "0.7.0",
"stylelint-config-wikimedia": "0.4.1"
} }
} }

@ -1,4 +1,4 @@
@import "../variables.less"; @import '../variables.less';
/* Handle and position Echo icons */ /* Handle and position Echo icons */
@ -12,7 +12,7 @@
} }
#personal-extra { #personal-extra {
// Position and keep it from randomly overflowing massively for no apparent reason // Position and keep it from randomly overflowing massively for no apparent reason
margin: .7em 0 -2em 0; margin: 0.7em 0 -2em 0;
ul { ul {
list-style: none; list-style: none;
@ -20,10 +20,11 @@
padding: 0; padding: 0;
} }
li { li {
margin: 0 .75em 0 0; margin: 0 0.75em 0 0;
} }
} }
@media (min-width: @desktop-small-floor) {
@media ( min-width: @desktop-small-floor ) {
#personal-extra { #personal-extra {
float: left; float: left;
margin-left: -4.5em; margin-left: -4.5em;
@ -41,7 +42,7 @@
} }
} }
@media (min-width: @desktop-small-floor) and (max-width: @desktop-small-width) { @media ( min-width: @desktop-small-floor ) and ( max-width: @desktop-small-width ) {
.extension-icons #p-search { .extension-icons #p-search {
margin-right: 11em; margin-right: 11em;
} }
@ -50,7 +51,7 @@
} }
} }
@media (min-width: @desktop-mid-floor) and (max-width: @desktop-mid-width) { @media ( min-width: @desktop-mid-floor ) and ( max-width: @desktop-mid-width ) {
.extension-icons { .extension-icons {
#user-tools { #user-tools {
width: auto; width: auto;
@ -61,13 +62,13 @@
} }
} }
@media(max-width: @mobile-width) { @media ( max-width: @mobile-width ) {
.mw-echo-ui-notificationBadgeButtonPopupWidget { .mw-echo-ui-notificationBadgeButtonPopupWidget {
z-index: 2; z-index: 2;
} }
#personal-extra { #personal-extra {
position: absolute; position: absolute;
top: .9em; top: 0.9em;
right: 11.75em; right: 11.75em;
li { li {

@ -1,24 +1,24 @@
@import "../variables.less"; @import '../variables.less';
@media screen { @media screen {
.client-js { .client-js {
.mw-editsection a { .mw-editsection a {
.background-image-svg('../images/brackets-grey.svg', '../images/brackets-grey.png'); .background-image-svg( '../images/brackets-grey.svg', '../images/brackets-grey.png' );
margin-right: 1.25em; margin-right: 1.25em;
} }
.mw-editsection a.mw-editsection-visualeditor { .mw-editsection a.mw-editsection-visualeditor {
.background-image-svg('../images/pencil-grey.svg', '../images/pencil-grey.png'); .background-image-svg( '../images/pencil-grey.svg', '../images/pencil-grey.png' );
} }
.mw-editsection-divider { .mw-editsection-divider {
display: none; display: none;
} }
@media (max-width: @mobile-width) { @media ( max-width: @mobile-width ) {
#ca-ve-edit a { #ca-ve-edit a {
.background-image-svg('../images/pencil-grey.svg', '../images/pencil-grey.png'); .background-image-svg( '../images/pencil-grey.svg', '../images/pencil-grey.png' );
} }
#ca-edit a { #ca-edit a {
.background-image-svg('../images/brackets-grey.svg', '../images/brackets-grey.png'); .background-image-svg( '../images/brackets-grey.svg', '../images/brackets-grey.png' );
} }
} }
} }

@ -1,8 +1,8 @@
@import "../variables.less"; @import '../variables.less';
@media screen { @media screen {
.ve-ui-toolbar { .ve-ui-toolbar {
margin: -.8em -2em 0; margin: -0.8em -2em 0;
} }
// Still need a way to make it show up right away (instead of initially disappearin under the page header) // Still need a way to make it show up right away (instead of initially disappearin under the page header)
@ -21,12 +21,13 @@
padding-right: @content-padding; padding-right: @content-padding;
} }
@media (min-width: @desktop-small-floor) and (max-width: @desktop-small-width) { @media ( min-width: @desktop-small-floor ) and ( max-width: @desktop-small-width ) {
.ve-ui-toolbar { .ve-ui-toolbar {
margin-top: -.5em; margin-top: -0.5em;
} }
} }
@media (max-width: @mobile-width) {
@media ( max-width: @mobile-width ) {
.ve-ui-toolbar-floating > .oo-ui-toolbar-bar { .ve-ui-toolbar-floating > .oo-ui-toolbar-bar {
top: 0; top: 0;
} }

@ -1,4 +1,4 @@
@import "variables.less"; @import 'variables.less';
/* /*
* PREFERENCES AND FIELDSET STUFF * PREFERENCES AND FIELDSET STUFF
@ -25,7 +25,7 @@
min-height: 400px; min-height: 400px;
.prefsection { .prefsection {
border: none; border: 0;
padding: 0; padding: 0;
margin: 0; margin: 0;
box-shadow: none; box-shadow: none;
@ -40,10 +40,10 @@
.mw-email-not-authenticated .mw-input, .mw-email-not-authenticated .mw-input,
.mw-email-none .mw-input { .mw-email-none .mw-input {
display: block; display: block;
padding: .25em .5em; padding: 0.25em 0.5em;
} }
input[type="checkbox"], input[type='checkbox'],
input[type="radio"] { input[type='radio'] {
margin-left: 0; margin-left: 0;
} }
} }
@ -63,21 +63,21 @@ fieldset {
background: @background; background: @background;
legend { legend {
padding: .5em 1.25em; padding: 0.5em 1.25em;
background: @background; background: @background;
font-weight: bold; font-weight: bold;
color: @blue-dark; color: @blue-dark;
} }
} }
label { label {
padding-left: .5em; padding-left: 0.5em;
} }
.mw-input label { .mw-input label {
padding: 0; padding: 0;
margin-right: 1em; margin-right: 1em;
} }
.mw-label { .mw-label {
padding-right: .5em; padding-right: 0.5em;
} }
.mw-submit { .mw-submit {
padding-top: 2em; padding-top: 2em;
@ -97,13 +97,13 @@ label {
/* pile of bad hacks to try to catch all the different ones */ /* pile of bad hacks to try to catch all the different ones */
#searchInput, #searchInput,
input[name="target"], input[name='target'],
input[name="user"], input[name='user'],
input[name="mime"], input[name='mime'],
input[size$="0"], input[size$='0'],
input[type="text"], input[type='text'],
input[type="checkbox"], input[type='checkbox'],
input[type="radio"], input[type='radio'],
input#wpTemplateSandboxPage, input#wpTemplateSandboxPage,
input.mw-summary, input.mw-summary,
input.mw-input, input.mw-input,
@ -112,36 +112,36 @@ textarea,
.mw-ui-input-inline, .mw-ui-input-inline,
.mw-ui-input { .mw-ui-input {
box-sizing: border-box; box-sizing: border-box;
padding: .25em .35em; padding: 0.25em 0.35em;
border: solid 1px @grey; border: solid 1px @grey;
margin: .5em 0; margin: 0.5em 0;
box-shadow: inset 0 1px 1px 1px rgba(0, 0, 0, 0.05); box-shadow: inset 0 1px 1px 1px rgba( 0, 0, 0, 0.05 );
font-size: 1em; font-size: 1em;
min-height: 30px; min-height: 30px;
font-family: @fonts; font-family: @fonts;
} }
select { select {
padding: .25em; padding: 0.25em;
margin: .5em 0; margin: 0.5em 0;
} }
input[type="checkbox"], input[type='checkbox'],
input[type="radio"] { input[type='radio'] {
margin-left: 1em; margin-left: 1em;
min-height: 0; min-height: 0;
} }
input[type="checkbox"] { input[type='checkbox'] {
border-radius: 2px; border-radius: 2px;
} }
input[type="radio"] { input[type='radio'] {
border-radius: 8px; border-radius: 8px;
} }
.mw-ui-button.mw-ui-progressive, .mw-ui-button.mw-ui-progressive,
.mw-ui-button.mw-ui-progressive:active, .mw-ui-button.mw-ui-progressive:active,
.mw-ui-button.mw-ui-progressive.mw-ui-checked, .mw-ui-button.mw-ui-progressive.mw-ui-checked,
input[type="submit"], input[type='submit'],
input[type="button"], input[type='button'],
button { button {
padding: .25em 1em .1em 1em; padding: 0.25em 1em 0.1em 1em;
border: solid 1px @grey; border: solid 1px @grey;
border-bottom-width: @border; border-bottom-width: @border;
text-shadow: 0 -1px 0 @grey; text-shadow: 0 -1px 0 @grey;
@ -150,7 +150,7 @@ button {
background: @background; background: @background;
color: @text; color: @text;
min-height: 30px; min-height: 30px;
box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05); box-shadow: 0 1px 2px rgba( 0, 0, 0, 0.05 );
&:active { &:active {
background: @grey-bright; background: @grey-bright;
@ -191,20 +191,19 @@ div.editOptions {
fieldset, fieldset,
legend { legend {
background: inherit; background: inherit;
border: none; border: 0;
box-shadow: none; box-shadow: none;
padding: 0; padding: 0;
margin-top: 2em; margin-top: 2em;
} }
} }
/* Extension:TemplateSandbox stuff */ /* Extension:TemplateSandbox stuff */
.mw-templatesandbox-page label { .mw-templatesandbox-page label {
padding: 0; padding: 0;
} }
#wpTemplateSandboxPreview { #wpTemplateSandboxPreview {
margin-left: .5em; margin-left: 0.5em;
} }
/* Recent changes and watchlist options */ /* Recent changes and watchlist options */
@ -222,7 +221,7 @@ div.editOptions {
label { label {
padding: 0 1em 0 0; padding: 0 1em 0 0;
} }
input[type="submit"] { input[type='submit'] {
margin: 0 0 0 4em; margin: 0 0 0 4em;
} }
} }
@ -230,15 +229,15 @@ div.editOptions {
/* Related changes hacks */ /* Related changes hacks */
.mw-special-Recentchangeslinked { .mw-special-Recentchangeslinked {
.rcoptions { .rcoptions {
input[type="submit"] { input[type='submit'] {
float: right; float: right;
margin: 0 0 0 4em; margin: 0 0 0 4em;
} }
td.mw-label.mw-target-label { td.mw-label.mw-target-label {
vertical-align: top; vertical-align: top;
padding-top: .75em; padding-top: 0.75em;
} }
input[name="target"] { input[name='target'] {
float: left; float: left;
} }
} }
@ -246,8 +245,8 @@ div.editOptions {
clear: left; clear: left;
float: left; float: left;
} }
label[for="showlinkedto"] { label[for='showlinkedto'] {
padding: .4em; padding: 0.4em;
float: left; float: left;
} }
} }

@ -1,4 +1,4 @@
@import "variables.less"; @import 'variables.less';
/* Page layout */ /* Page layout */
@ -32,7 +32,7 @@ div {
} }
#mw-footer-container { #mw-footer-container {
border-top: solid 1px @background-dark2; border-top: solid 1px @background-dark2;
box-shadow: inset 0 7px 2px -4px rgba(0, 0, 0, .1); box-shadow: inset 0 7px 2px -4px rgba( 0, 0, 0, 0.1 );
color: @text-inverse; color: @text-inverse;
a { a {
@ -54,7 +54,7 @@ div {
height: 11em; height: 11em;
background-repeat: no-repeat; background-repeat: no-repeat;
background-position: 50% 50%; background-position: 50% 50%;
margin: .75em auto 0; margin: 0.75em auto 0;
} }
#p-logo-text { #p-logo-text {
width: @column-left-size; width: @column-left-size;
@ -62,7 +62,7 @@ div {
line-height: 1; line-height: 1;
a { a {
padding: .2em 1em; padding: 0.2em 1em;
color: @text; color: @text;
font-family: @fonts-secondary; font-family: @fonts-secondary;
font-variant: small-caps; font-variant: small-caps;
@ -72,8 +72,8 @@ div {
/* 13+ character names */ /* 13+ character names */
&.long { &.long {
font-size: 1.45em; font-size: 1.45em;
padding: 0 .75em 0 0; padding: 0 0.75em 0 0;
line-height: .8; line-height: 0.8;
} }
} }
} }
@ -81,16 +81,16 @@ div {
/* Search */ /* Search */
#simpleSearch { #simpleSearch {
box-shadow: inset 0 2px 4px 0 rgba(0, 0, 0, 0.05); box-shadow: inset 0 2px 4px 0 rgba( 0, 0, 0, 0.05 );
background: @background; background: @background;
position: relative; position: relative;
border: solid 1px @grey; border: solid 1px @grey;
} }
#searchInput { #searchInput {
border: none; border: 0;
margin: 0; margin: 0;
height: 2.1em; height: 2.1em;
padding: .4em 4.5em .2em 2em; padding: 0.4em 4.5em 0.2em 2em;
box-shadow: none; box-shadow: none;
background: transparent; background: transparent;
width: 100%; width: 100%;
@ -104,20 +104,20 @@ div {
width: 2.5em; width: 2.5em;
height: 2.5em; height: 2.5em;
.icon; .icon;
.background-image-svg('images/search-ltr.svg', 'images/search-ltr.png'); .background-image-svg( 'images/search-ltr.svg', 'images/search-ltr.png' );
background-position: 50% 40%; background-position: 50% 40%;
box-shadow: none; box-shadow: none;
} }
.suggestions { .suggestions {
background: @background; background: @background;
box-shadow: 0 2px 2px 1px rgba(0, 0, 0, 0.05); box-shadow: 0 2px 2px 1px rgba( 0, 0, 0, 0.05 );
.suggestions-special { .suggestions-special {
background-color: @background; background-color: @background;
border: 1px solid @grey; border: 1px solid @grey;
border-bottom-width: @border; border-bottom-width: @border;
padding: .75em 2em; padding: 0.75em 2em;
} }
.suggestions-results { .suggestions-results {
background-color: @background; background-color: @background;
@ -126,7 +126,7 @@ div {
} }
.suggestions-result { .suggestions-result {
color: @text; color: @text;
padding: .65em 2em .35em; padding: 0.65em 2em 0.35em;
} }
.suggestions-result-current { .suggestions-result-current {
background-color: @blue; background-color: @blue;
@ -141,14 +141,14 @@ div.suggestions {
/* Dropdown stuff */ /* Dropdown stuff */
.pokey, .pokey,
.pokey::after { .pokey:after {
border-bottom: 10px solid @grey-bright; border-bottom: 10px solid @grey-bright;
border-left: 10px solid transparent; border-left: 10px solid transparent;
border-right: 10px solid transparent; border-right: 10px solid transparent;
content: ""; content: '';
height: 0; height: 0;
position: absolute; position: absolute;
transform: rotate(360deg); // to force some smoothing in annoying browsers transform: rotate( 360deg ); // to force some smoothing in annoying browsers
width: 0; width: 0;
z-index: 4; z-index: 4;
} }
@ -157,8 +157,8 @@ div.suggestions {
right: 1px; right: 1px;
display: none; display: none;
} }
.pokey::after { .pokey:after {
border-bottom-color: #FFFFFF; border-bottom-color: #fff;
right: -10px; right: -10px;
top: 2px; top: 2px;
} }
@ -170,7 +170,7 @@ div.suggestions {
/* Footer */ /* Footer */
#mw-footer { #mw-footer {
padding-top: .5em; padding-top: 0.5em;
padding-bottom: 1em; padding-bottom: 1em;
ul, ul,
@ -211,7 +211,7 @@ div.suggestions {
padding: 0; padding: 0;
} }
li { li {
margin: .25em 0 1em; margin: 0.25em 0 1em;
border-bottom: solid 3px @background; border-bottom: solid 3px @background;
&:hover { &:hover {
@ -243,11 +243,11 @@ div.suggestions {
#ca-watch a { #ca-watch a {
.ca-icon(); .ca-icon();
.background-image-svg('images/star.svg', 'images/star.png'); .background-image-svg( 'images/star.svg', 'images/star.png' );
} }
#ca-unwatch a { #ca-unwatch a {
.ca-icon(); .ca-icon();
.background-image-svg('images/star-filled.svg', 'images/star-filled.png'); .background-image-svg( 'images/star-filled.svg', 'images/star-filled.png' );
} }
/* Misc */ /* Misc */
@ -275,11 +275,11 @@ a.new,
font-family: @fonts; font-family: @fonts;
a { a {
.background-image-svg('images/pencil-grey.svg', 'images/pencil-grey.png'); .background-image-svg( 'images/pencil-grey.svg', 'images/pencil-grey.png' );
background-repeat: no-repeat; background-repeat: no-repeat;
background-position: 0 0; background-position: 0 0;
display: inline-block; display: inline-block;
padding: .5em 0 .25em 1.75em; padding: 0.5em 0 0.25em 1.75em;
} }
} }
.mw-editsection-bracket { .mw-editsection-bracket {
@ -290,23 +290,30 @@ a.new,
} }
.mw-indicators { .mw-indicators {
float: right; float: right;
margin: .75em 0 0 1em; margin: 0.75em 0 0 1em;
} }
#mw-content { #mw-content {
h1, h2, h3, h4, h5, h6, dt { h1,
h2,
h3,
h4,
h5,
h6,
dt {
font-weight: normal; font-weight: normal;
font-family: @fonts-secondary; font-family: @fonts-secondary;
line-height: 1.25; line-height: 1.25;
margin: 1.5em 0 .5em; margin: 1.5em 0 0.5em;
} }
h1, h2 { h1,
h2 {
border-bottom: solid 2px @blue; border-bottom: solid 2px @blue;
} }
h1.firstHeading { h1.firstHeading {
margin: .25em 0 .5em; margin: 0.25em 0 0.5em;
border-bottom: solid 4px @red; border-bottom: solid 4px @red;
} }
@ -343,7 +350,7 @@ hr {
border-width: 1px; border-width: 1px;
border-color: @grey; border-color: @grey;
border-style: solid none solid none; border-style: solid none solid none;
margin: .5em 0; margin: 0.5em 0;
} }
pre { pre {
@ -353,7 +360,7 @@ pre {
} }
p { p {
margin: .9em 0 .8em; margin: 0.9em 0 0.8em;
} }
.center, .center,
@ -364,23 +371,23 @@ p {
/* Thumbnails */ /* Thumbnails */
.tright { .tright {
margin: 0 0 .5em .5em; margin: 0 0 0.5em 0.5em;
padding: 0 0 1em 1.5em; padding: 0 0 1em 1.5em;
background: #fff; background: #fff;
} }
.tleft { .tleft {
margin: 0 .5em .5em 0; margin: 0 0.5em 0.5em 0;
padding: 0 1.5em 1em 0; padding: 0 1.5em 1em 0;
background: #fff; background: #fff;
} }
.thumbinner { .thumbinner {
.box; .box;
padding: .75em; padding: 0.75em;
} }
.thumbcaption { .thumbcaption {
font-size: 95%; font-size: 95%;
padding: .5em 1em; padding: 0.5em 1em;
} }
.thumbinner img{ .thumbinner img{
border: solid 1px @grey-bright; border: solid 1px @grey-bright;
@ -392,16 +399,18 @@ p {
/* Tables of contents */ /* Tables of contents */
ul#filetoc, ul#filetoc,
#toc, .toc, .mw-warning { #toc,
.toc,
.mw-warning {
display: inline-block; display: inline-block;
.box; .box;
padding: 1.25em 1.75em; padding: 1.25em 1.75em;
margin: 1em 0 ; margin: 1em 0;
min-width: 15em; min-width: 15em;
} }
ul#filetoc { ul#filetoc {
display: block; display: block;
border: none; border: 0;
} }
#toc ul, #toc ul,
.toc ul { .toc ul {
@ -419,21 +428,21 @@ ul#filetoc {
color: @background3; color: @background3;
} }
#toc li:last-child { #toc li:last-child {
margin-bottom: .5em; margin-bottom: 0.5em;
} }
.toclevel-1 { .toclevel-1 {
margin-bottom: .25em; margin-bottom: 0.25em;
} }
.mw-changeslist-legend, .mw-changeslist-legend,
#mw-content .mw-search-profile-tabs, #mw-content .mw-search-profile-tabs,
#mw-content fieldset#mw-searchoptions, #mw-content fieldset#mw-searchoptions,
table.wikitable { table.wikitable {
border: none; border: 0;
color: @text; color: @text;
.box; .box;
} }
#mw-content .mw-search-profile-tabs { #mw-content .mw-search-profile-tabs {
padding: .5em; padding: 0.5em;
} }
table.wikitable > tr > th, table.wikitable > tr > th,
@ -446,7 +455,7 @@ table.wikitable > * > tr > td {
table.wikitable > tr > th, table.wikitable > tr > th,
table.wikitable > * > tr > th { table.wikitable > * > tr > th {
border: none; border: 0;
} }
/* Color bars */ /* Color bars */

@ -1,4 +1,4 @@
@import "variables.less"; @import 'variables.less';
#mw-site-navigation { #mw-site-navigation {
.column-left(); .column-left();

@ -1,4 +1,4 @@
@import "variables.less"; @import 'variables.less';
#mw-site-navigation, #mw-site-navigation,
#mw-related-navigation { #mw-related-navigation {

@ -1,4 +1,4 @@
@import "variables.less"; @import 'variables.less';
// Redundant sidebar category list and stuff // Redundant sidebar category list and stuff
@ -12,7 +12,6 @@
.categories-bottom(); .categories-bottom();
// Header navigation // Header navigation
.sidebar-chunk { .sidebar-chunk {
@ -39,8 +38,8 @@
font-weight: normal; font-weight: normal;
font-family: @fonts-secondary; font-family: @fonts-secondary;
font-size: 1.25em; font-size: 1.25em;
padding: .5em 0 .2em; padding: 0.5em 0 0.2em;
margin: 0; margin: 0;
.dropdown-header(); .dropdown-header();
} }
@ -111,7 +110,7 @@
display: none; display: none;
} }
h2:after { h2:after {
margin-left: -.65em; margin-left: -0.65em;
} }
.dropdown { .dropdown {
right: -1em; right: -1em;

@ -1,4 +1,4 @@
@import "variables.less"; @import 'variables.less';
// Override menu display from mobile // Override menu display from mobile
// This also requires !importants where they hover and stuff // This also requires !importants where they hover and stuff
@ -13,7 +13,7 @@
margin: auto; margin: auto;
} }
#mw-content-container { #mw-content-container {
.background-image-svg('images/cat-grey.svg', 'images/cat-grey.png'); .background-image-svg( 'images/cat-grey.svg', 'images/cat-grey.png' );
background-repeat: no-repeat; background-repeat: no-repeat;
background-position: center 15em; background-position: center 15em;
} }
@ -48,7 +48,7 @@
position: fixed; position: fixed;
z-index: 97; z-index: 97;
top: @fixed-header-height; top: @fixed-header-height;
box-shadow: 0 3px 3px 2px rgba(0, 0, 0, 0.075), 0 0 2px rgba(0, 0, 0, 0.2); box-shadow: 0 3px 3px 2px rgba( 0, 0, 0, 0.075 ), 0 0 2px rgba( 0, 0, 0, 0.2 );
} }
#mw-header-nav-hack { #mw-header-nav-hack {
display: none; display: none;
@ -56,7 +56,7 @@
/* Add offset to make anchor links work with the fixed header */ /* Add offset to make anchor links work with the fixed header */
:target:before { :target:before {
content: ""; content: '';
display: block; display: block;
height: @fixed-header-height; height: @fixed-header-height;
margin: -@fixed-header-height 0 0; margin: -@fixed-header-height 0 0;
@ -82,11 +82,11 @@
} }
h2 { h2 {
margin: 0; margin: 0;
padding: .7em 0 0 25px; padding: 0.7em 0 0 25px;
font-family: @fonts-secondary; font-family: @fonts-secondary;
font-weight: normal; font-weight: normal;
font-size: 1.1em; font-size: 1.1em;
.background-image-svg('images/user-grey.svg', 'images/user-grey.png'); .background-image-svg( 'images/user-grey.svg', 'images/user-grey.png' );
background-position: 0 7px; background-position: 0 7px;
background-repeat: no-repeat; background-repeat: no-repeat;

@ -1,9 +1,9 @@
@import "variables.less"; @import 'variables.less';
// Let's add some unnecessary white space. Or grey, as it were. In the dumbest possible way. // Let's add some unnecessary white space. Or grey, as it were. In the dumbest possible way.
// Top end of large screens // Top end of large screens
@media screen and (min-width: 1425px) { @media screen and ( min-width: 1425px ) {
.color-middle-container, .color-middle-container,
.ts-inner { .ts-inner {
padding: 0 3em; padding: 0 3em;
@ -15,7 +15,7 @@
} }
// Top half end of mid screens // Top half end of mid screens
@media screen and (min-width: (@desktop-small-width + @desktop-mid-width) / 2) and (max-width: @desktop-mid-width) { @media screen and ( min-width: ( @desktop-small-width + @desktop-mid-width ) / 2 ) and ( max-width: @desktop-mid-width ) {
.ts-inner { .ts-inner {
padding: 0 3em; padding: 0 3em;
} }

@ -1,4 +1,4 @@
@import "variables.less"; @import 'variables.less';
/* Layout */ /* Layout */
@ -26,13 +26,13 @@
#mw-header-container { #mw-header-container {
background: @background; background: @background;
padding: 3.75em @content-padding .35em; padding: 3.75em @content-padding 0.35em;
} }
#mw-header-hack { #mw-header-hack {
position: relative; position: relative;
z-index: 1; z-index: 1;
box-shadow: 0 3px 3px 2px rgba(0, 0, 0, 0.075), 0 0 2px rgba(0, 0, 0, 0.2); box-shadow: 0 3px 3px 2px rgba( 0, 0, 0, 0.075 ), 0 0 2px rgba( 0, 0, 0, 0.2 );
} }
/* Dropdowns */ /* Dropdowns */
@ -45,7 +45,7 @@
.dropdown { .dropdown {
.nav-block(); .nav-block();
background: @background; background: @background;
box-shadow: 0 2px 3px 1px rgba(0, 0, 0, 0.05); box-shadow: 0 2px 3px 1px rgba( 0, 0, 0, 0.05 );
position: absolute; position: absolute;
padding: 2em 2.5em 1em; padding: 2em 2.5em 1em;
margin: 0; margin: 0;
@ -57,13 +57,13 @@
z-index: 100; z-index: 100;
h3 { h3 {
margin: .5em 0 1.5em; margin: 0.5em 0 1.5em;
} }
ul { ul {
margin: 1em 0 2em; margin: 1em 0 2em;
} }
li { li {
margin: 0 0 .75em; margin: 0 0 0.75em;
} }
} }
@ -76,7 +76,7 @@
width: 100%; width: 100%;
height: 100%; height: 100%;
background: @background2; background: @background2;
opacity: .8; opacity: 0.8;
overflow: hidden; overflow: hidden;
} }
@ -101,18 +101,18 @@
} }
&:after { &:after {
position: absolute; position: absolute;
top: .65em; top: 0.65em;
left: 23px; left: 23px;
} }
} }
#user-tools h2 { #user-tools h2 {
right: @content-padding + .5em; right: @content-padding + 0.5em;
.background-image-svg('images/user-large-grey.svg', 'images/user-large-grey.png'); .background-image-svg( 'images/user-large-grey.svg', 'images/user-large-grey.png' );
} }
#site-navigation { #site-navigation {
h2 { h2 {
left: @content-padding; left: @content-padding;
.background-image-svg('images/menu-large-grey.svg', 'images/menu-large-grey.png'); .background-image-svg( 'images/menu-large-grey.svg', 'images/menu-large-grey.png' );
} }
.sidebar-inner { .sidebar-inner {
left: 0; left: 0;
@ -121,14 +121,14 @@
} }
#site-tools h2 { #site-tools h2 {
right: 7em; right: 7em;
.background-image-svg('images/gear-large-grey.svg', 'images/gear-large-grey.png'); .background-image-svg( 'images/gear-large-grey.svg', 'images/gear-large-grey.png' );
} }
/* Logo */ /* Logo */
#p-logo-text { #p-logo-text {
position: absolute; position: absolute;
top: .75em; top: 0.75em;
left: 6em; left: 6em;
text-align: left; text-align: left;
@ -154,28 +154,28 @@
.ca-icon(); .ca-icon();
} }
#ca-edit a { #ca-edit a {
.background-image-svg('images/pencil-grey.svg', 'images/pencil-grey.png'); .background-image-svg( 'images/pencil-grey.svg', 'images/pencil-grey.png' );
} }
#ca-history a { #ca-history a {
.background-image-svg('images/clock-grey.svg', 'images/clock-grey.png'); .background-image-svg( 'images/clock-grey.svg', 'images/clock-grey.png' );
} }
#ca-talk a { #ca-talk a {
.background-image-svg('images/talk-grey.svg', 'images/talk-grey.png'); .background-image-svg( 'images/talk-grey.svg', 'images/talk-grey.png' );
} }
#t-contributions a { #t-contributions a {
.background-image-svg('images/puzzle-grey.svg', 'images/puzzle-grey.png'); .background-image-svg( 'images/puzzle-grey.svg', 'images/puzzle-grey.png' );
} }
#ca-addsection a { #ca-addsection a {
.background-image-svg('images/plus-grey.svg', 'images/plus-grey.png'); .background-image-svg( 'images/plus-grey.svg', 'images/plus-grey.png' );
} }
*[id^='ca-nstab-'] a { *[id^='ca-nstab-'] a {
.background-image-svg('images/page-grey.svg', 'images/page-grey.png'); .background-image-svg( 'images/page-grey.svg', 'images/page-grey.png' );
} }
#ca-more, #ca-more,
#ca-languages { #ca-languages {
&:after { &:after {
margin-left: -.35em; margin-left: -0.35em;
} }
span { span {
@ -183,10 +183,10 @@
} }
} }
#ca-more span { #ca-more span {
.background-image-svg('images/gear-grey.svg', 'images/gear-grey.png'); .background-image-svg( 'images/gear-grey.svg', 'images/gear-grey.png' );
} }
#ca-languages span { #ca-languages span {
.background-image-svg('images/languages-grey.svg', 'images/languages-grey.png'); .background-image-svg( 'images/languages-grey.svg', 'images/languages-grey.png' );
} }
/* Full-width thumbnails */ /* Full-width thumbnails */
@ -212,12 +212,12 @@ div.thumb {
} }
.thumbimage { .thumbimage {
display: block; display: block;
margin: 0 auto .5em; margin: 0 auto 0.5em;
} }
#mw-content { #mw-content {
overflow: auto; overflow: auto;
border: none; border: 0;
} }
#mw-content-block { #mw-content-block {
background: @background; background: @background;
@ -232,7 +232,9 @@ div.thumb {
/* Table of contents */ /* Table of contents */
#toc, .toc, .mw-warning { #toc,
.toc,
.mw-warning {
width: 100%; width: 100%;
box-sizing: border-box; box-sizing: border-box;
} }

@ -1,4 +1,4 @@
@import "mediawiki.mixins"; @import 'mediawiki.mixins';
// Colours // Colours
@ -33,7 +33,6 @@
@link: @blue; @link: @blue;
@link-red: @red; @link-red: @red;
// Flair // Flair
// Fonts are chosen for consistent metrics, not necessarily overall prettiness. // Fonts are chosen for consistent metrics, not necessarily overall prettiness.
@ -43,10 +42,10 @@
// Based on information on https://wiki.archlinux.org/index.php/Metric-compatible_fonts // Based on information on https://wiki.archlinux.org/index.php/Metric-compatible_fonts
@fonts-monospace: 'Consolas', 'Courier', 'Nimbus Mono', 'Liberation Mono', 'Courier New', monospace; @fonts-monospace: 'Consolas', 'Courier', 'Nimbus Mono', 'Liberation Mono', 'Courier New', monospace;
@border: .2em; @border: 0.2em;
@radius: .2em; @radius: 0.2em;
@font-size: .95em; @font-size: 0.95em;
// Widths // Widths
@ -69,8 +68,7 @@
@column-right-size: 16em; @column-right-size: 16em;
@fixed-header-height: 3.125em; @fixed-header-height: 3.125em;
@color-height: .35em; @color-height: 0.35em;
// Miscellaneous functions // Miscellaneous functions
@ -78,13 +76,13 @@
.hidden() { .hidden() {
position: absolute; position: absolute;
top: -9999px; top: -9999px;
left: 0px; left: 0;
} }
// Icons - hides labels, but keep them accessible for screen-readers // Icons - hides labels, but keep them accessible for screen-readers
.icon() { .icon() {
text-indent: -99999px; text-indent: -99999px;
border: none; border: 0;
background-color: transparent; background-color: transparent;
background-repeat: no-repeat; background-repeat: no-repeat;
} }
@ -94,7 +92,7 @@
border: solid @grey-bright; border: solid @grey-bright;
border-width: 1px 1px @border; border-width: 1px 1px @border;
padding: 1.25em 1.75em; padding: 1.25em 1.75em;
box-shadow: 0 1px 2px 1px rgba(0, 0, 0, 0.02); box-shadow: 0 1px 2px 1px rgba( 0, 0, 0, 0.02 );
overflow: auto; overflow: auto;
} }
@ -105,7 +103,7 @@
width: 20px; width: 20px;
height: 20px; height: 20px;
box-sizing: border-box; box-sizing: border-box;
margin-bottom: -.5em; margin-bottom: -0.5em;
} }
// Navigation column blocks // Navigation column blocks
@ -125,15 +123,15 @@
h3 { h3 {
font-weight: normal; font-weight: normal;
font-size: 1em; font-size: 1em;
margin: .25em 0 .75em 0; margin: 0.25em 0 0.75em 0;
padding-bottom: .15em; padding-bottom: 0.15em;
border-bottom: solid 2px @grey; border-bottom: solid 2px @grey;
} }
ul { ul {
margin-bottom: 2em; margin-bottom: 2em;
} }
li { li {
margin: 0 0 .35em; margin: 0 0 0.35em;
} }
} }
@ -171,7 +169,7 @@
content: ''; content: '';
width: 22px; width: 22px;
height: 12px; height: 12px;
.background-image-svg('images/arrow-down-grey.svg', 'images/arrow-down-grey.png'); .background-image-svg( 'images/arrow-down-grey.svg', 'images/arrow-down-grey.png' );
background-position: center center; background-position: center center;
background-repeat: no-repeat; background-repeat: no-repeat;
} }
@ -179,7 +177,7 @@
.dropdown-menu( @direction: right ) { .dropdown-menu( @direction: right ) {
.nav-block(); .nav-block();
background: @background; background: @background;
box-shadow: 0 2px 3px 1px rgba(0, 0, 0, 0.05); box-shadow: 0 2px 3px 1px rgba( 0, 0, 0, 0.05 );
position: absolute; position: absolute;
padding: 20px 2em 0; padding: 20px 2em 0;
margin: 0; margin: 0;
@ -199,13 +197,13 @@
#catlinks { #catlinks {
margin: 0 @content-padding; margin: 0 @content-padding;
padding: 1.5em 0 .5em; padding: 1.5em 0 0.5em;
li { li {
border-left: none; border-left: 0;
} }
div { div {
margin: 0 0 .35em; margin: 0 0 0.35em;
} }
} }
} }

Loading…
Cancel
Save