Enabling indentation stylelint rule and making it pass.
Also making use of mediawiki.mixins' `box-sizing()` mixin in
StashedFileWidget and change interwikiwidget rules order slightly
(example `:hover` modification after normal selector rule).
Change-Id: Ifa9ccae5518d5426b390e0f8321eb3decb211c18
"rules": {
"declaration-no-important": null,
"rules": {
"declaration-no-important": null,
"no-descending-specificity": null,
"no-duplicate-selectors": null,
"no-descending-specificity": null,
"no-duplicate-selectors": null,
.iw-headline {
font-weight: bold;
.iw-headline {
font-weight: bold;
- font-size: 1rem;
- font-size: 16px;
- opacity: 0.7;
+ font-size: 1rem;
+ font-size: 16px;
+ opacity: 0.7;
margin: 0;
}
.iw-resultset {
margin-bottom: 1.2em;
background-color: #f2f4f7;
margin: 0;
}
.iw-resultset {
margin-bottom: 1.2em;
background-color: #f2f4f7;
- vertical-align: top;
- width: 100%;
- float: left;
- list-style-type: none;
+ vertical-align: top;
+ width: 100%;
+ float: left;
+ list-style-type: none;
}
/* clearfix */
.iw-result:after {
}
/* clearfix */
.iw-result:after {
display: block;
font-size: 0;
content: " ";
display: block;
font-size: 0;
content: " ";
}
* html .interwiki-result { /* IE6 */
}
* html .interwiki-result { /* IE6 */
}
*:first-child + html .iw-resultset { /* IE7 */
}
*:first-child + html .iw-resultset { /* IE7 */
}
/* padding each .iw-resultset section seperately.
}
/* padding each .iw-resultset section seperately.
.iw-result__title,
.iw-result__content,
.iw-result__footer {
.iw-result__title,
.iw-result__content,
.iw-result__footer {
- padding: 0.25em 0.85em;
+ padding: 0.25em 0.85em;
}
/* definition titles appear inline,
to resemble a traditional dictionary definition */
.iw-resultset--definition .iw-result__title {
}
/* definition titles appear inline,
to resemble a traditional dictionary definition */
.iw-resultset--definition .iw-result__title {
- display: inline;
- padding: 0;
+ display: inline;
+ padding: 0;
}
.iw-resultset > div:first-child {
}
.iw-resultset > div:first-child {
}
.iw-resultset > div:last-child {
}
.iw-resultset > div:last-child {
- padding-bottom: 0.85em;
+ padding-bottom: 0.85em;
- font-size: 16px; /* rem fallback */
- font-size: 1rem;
+ font-size: 16px; /* rem fallback */
+ font-size: 1rem;
}
.iw-result__title a.extiw {
}
.iw-result__title a.extiw {
- color: #252525;
- font-weight: bold;
+ color: #252525;
+ font-weight: bold;
}
.iw-result__content:after { /* clearfix */
}
.iw-result__content:after { /* clearfix */
- visibility: hidden;
- display: block;
- font-size: 0;
- content: " ";
- clear: both;
- height: 0;
+ visibility: hidden;
+ display: block;
+ font-size: 0;
+ content: " ";
+ clear: both;
+ height: 0;
- display: inline-block;
- width: 24px;
- height: 24px;
- vertical-align: middle;
- margin-right: 0.25em;
- background: url( images/special.search/definition-icon.svg ) no-repeat 0 0;
- background-size: 100% 100%;
+ display: inline-block;
+ width: 24px;
+ height: 24px;
+ vertical-align: middle;
+ margin-right: 0.25em;
+ background: url( images/special.search/definition-icon.svg ) no-repeat 0 0;
+ background-size: 100% 100%;
}
@interwikiContentTypes: definition, travel, quotation, book, course, news, textbook, image;
}
@interwikiContentTypes: definition, travel, quotation, book, course, news, textbook, image;
.generate-iwIcons();
.generate-iwIcons( @i:1 ) when ( @i =< length( @interwikiContentTypes ) ) {
.generate-iwIcons();
.generate-iwIcons( @i:1 ) when ( @i =< length( @interwikiContentTypes ) ) {
- @iwIcon: extract( @interwikiContentTypes, @i );
+ @iwIcon: extract( @interwikiContentTypes, @i );
- .iw-result__icon--@{iwIcon} {
- /* stylelint-disable-next-line function-url-quotes */
- background-image: url( 'images/special.search/@{iwIcon}-icon.png' );
- /* stylelint-disable-next-line function-url-quotes */
- background-image: url( 'images/special.search/@{iwIcon}-icon.svg' );
- }
+ .iw-result__icon--@{iwIcon} {
+ /* stylelint-disable-next-line function-url-quotes */
+ background-image: url( 'images/special.search/@{iwIcon}-icon.png' );
+ /* stylelint-disable-next-line function-url-quotes */
+ background-image: url( 'images/special.search/@{iwIcon}-icon.svg' );
+ }
- .generate-iwIcons( @i + 1 );
+ .generate-iwIcons( @i + 1 );
}
/* image search result */
.iw-result__mini-gallery {
}
/* image search result */
.iw-result__mini-gallery {
- position: relative;
- float: left;
- width: 60%;
- height: 200px;
- box-sizing: border-box;
- padding: 0.25rem;
+ position: relative;
+ float: left;
+ width: 60%;
+ height: 200px;
+ box-sizing: border-box;
+ padding: 0.25rem;
-.iw-result__mini-gallery__image {
- display: block;
- position: relative;
- width: 100%;
- height: 100%;
- background-size: cover;
- background-repeat: no-repeat;
- background-position: center center;
+/* second and third images are small */
+.iw-result__mini-gallery:nth-child( 2 ),
+.iw-result__mini-gallery:nth-child( 3 ) { /* stylelint-disable-line indentation */
+ width: 40%;
+ height: 100px;
-.iw-result__mini-gallery__image:hover > .iw-result__mini-gallery__caption {
- visibility: visible;
+.iw-result__mini-gallery__image {
+ display: block;
+ position: relative;
+ width: 100%;
+ height: 100%;
+ background-size: cover;
+ background-repeat: no-repeat;
+ background-position: center center;
}
.iw-result__mini-gallery__image > .iw-result__mini-gallery__caption { /* image gallery text */
}
.iw-result__mini-gallery__image > .iw-result__mini-gallery__caption { /* image gallery text */
- visibility: hidden;
- position: absolute;
- bottom: 0;
- left: 0;
- text-align: center;
- color: #fff;
- text-shadow: 0 0 10px rgba( 0, 0, 0, 0.4 ); /* improves legibility on white background*/
- font-size: 0.8em;
- padding: 5px;
- background-color: rgba( 0, 0, 0, 0.5 );
+ visibility: hidden;
+ position: absolute;
+ bottom: 0;
+ left: 0;
+ text-align: center;
+ color: #fff;
+ text-shadow: 0 0 10px rgba( 0, 0, 0, 0.4 ); /* improves legibility on white background*/
+ font-size: 0.8em;
+ padding: 5px;
+ background-color: rgba( 0, 0, 0, 0.5 );
-.iw-result__mini-gallery:nth-child(2),
-.iw-result__mini-gallery:nth-child(3) { /* second and third images are small */
- width: 40%;
- height: 100px;
+.iw-result__mini-gallery__image:hover > .iw-result__mini-gallery__caption {
+ visibility: visible;
}
/* different types of interwiki result boxes */
/* quotation box */
.iw-resultset--quotation .iw-result__content {
}
/* different types of interwiki result boxes */
/* quotation box */
.iw-resultset--quotation .iw-result__content {
- border-left: 4px solid #afb1b5;
- margin-left: 1em;
- padding-top: 0;
- margin-top: 0.25em;
+ border-left: 4px solid #afb1b5;
+ margin-left: 1em;
+ padding-top: 0;
+ margin-top: 0.25em;
-.iw-resultset--quotation .iw-result__title{
- margin-left: 1em;
+.iw-resultset--quotation .iw-result__title {
+ margin-left: 1em;
-.iw-result--quotation .iw-result__title:before{
- content: ' — ';
- display: inline-block;
+.iw-result--quotation .iw-result__title:before {
+ content: ' — ';
+ display: inline-block;
}
.iw-result--quotation .iw-result__footer {
}
.iw-result--quotation .iw-result__footer {
*/
.mw-search-nonefound ~ #mw-search-interwiki {
*/
.mw-search-nonefound ~ #mw-search-interwiki {
}
.mw-search-nonefound ~ #mw-search-interwiki .iw-resultset {
}
.mw-search-nonefound ~ #mw-search-interwiki .iw-resultset {
- width: 30%;
- max-width: 300px;
- margin-left: 0.5em;
- margin-right: 0.5em;
+ width: 30%;
+ max-width: 300px;
+ margin-left: 0.5em;
+ margin-right: 0.5em;
}
/* mobile */
@media only screen and ( max-width: 768px ) {
}
/* mobile */
@media only screen and ( max-width: 768px ) {
- #mw-interwiki-results {
- width: 100%;
- }
- .mw-search-results {
- max-width: none !important;
- }
- .iw-resultset {
- width: 45% !important;
- margin-left: 0.5em !important;
- margin-right: 0.5em !important;
- }
+ #mw-interwiki-results {
+ width: 100%;
+ }
+ .mw-search-results {
+ max-width: none !important;
+ }
+ .iw-resultset {
+ width: 45% !important;
+ margin-left: 0.5em !important;
+ margin-right: 0.5em !important;
+ }
}
@media only screen and ( max-width: 600px ) {
}
@media only screen and ( max-width: 600px ) {
- .iw-resultset {
- width: 100% !important;
- margin-left: 0 !important;
- margin-right: 0 !important;
- max-width: none !important;
- }
+ .iw-resultset {
+ width: 100% !important;
+ margin-left: 0 !important;
+ margin-right: 0 !important;
+ max-width: none !important;
+ }
}
/* Evil temporary hax for cawiki */
}
/* Evil temporary hax for cawiki */
// Remove the inner padding and cancel buttons in Chrome on OS X and Safari on OS X
&::-webkit-search-cancel-button,
&::-webkit-search-decoration {
// Remove the inner padding and cancel buttons in Chrome on OS X and Safari on OS X
&::-webkit-search-cancel-button,
&::-webkit-search-decoration {
- -webkit-appearance: none;
+ -webkit-appearance: none;
+@import 'mediawiki.mixins';
+
.mw-widgets-stashedFileWidget {
display: inline-block;
vertical-align: middle;
.mw-widgets-stashedFileWidget {
display: inline-block;
vertical-align: middle;
vertical-align: middle;
position: relative;
overflow: hidden;
vertical-align: middle;
position: relative;
overflow: hidden;
- -webkit-box-sizing: border-box;
- -moz-box-sizing: border-box;
- box-sizing: border-box;
+ .box-sizing( border-box );
> .mw-widgets-stashedFileWidget-label {
line-height: 2.3em;
margin: 0;
overflow: hidden;
white-space: nowrap;
> .mw-widgets-stashedFileWidget-label {
line-height: 2.3em;
margin: 0;
overflow: hidden;
white-space: nowrap;
- -webkit-box-sizing: border-box;
- -moz-box-sizing: border-box;
- box-sizing: border-box;
+ .box-sizing( border-box );
text-overflow: ellipsis;
left: 0.5em;
right: 2.375em;
text-overflow: ellipsis;
left: 0.5em;
right: 2.375em;
-.mw-icon-question:lang(ar),
-.mw-icon-question:lang(fa),
-.mw-icon-question:lang(ur) {
+/* stylelint-disable indentation */
+.mw-icon-question:lang( ar ),
+.mw-icon-question:lang( fa ),
+.mw-icon-question:lang( ur ) {
-webkit-transform: scaleX( -1 );
-ms-transform: scaleX( -1 );
transform: scaleX( -1 );
-webkit-transform: scaleX( -1 );
-ms-transform: scaleX( -1 );
transform: scaleX( -1 );