multi-line, two-line and mw-ui-button-group only loaded where needed
The only usage of mw-ui-button is inside the SpecialMobileWatchList class in MobileFrontend. Thus we needlessly load as a render blocking CSS on all page views multi-line and two-line are likewise only used inside MobileSpecialPageFeed.php mobile.special.styles is loaded on all Special pages so let's load this instead here. This also allows us to use the element on other special pages in future. Change-Id: I2b363543d0356a18194a9d08922428a6cb944797
This commit is contained in:
parent
ee2afb5220
commit
d228b2cbd7
|
@ -290,19 +290,6 @@ input.search {
|
||||||
overflow: hidden;
|
overflow: hidden;
|
||||||
-webkit-text-overflow: ellipsis;
|
-webkit-text-overflow: ellipsis;
|
||||||
text-overflow: ellipsis;
|
text-overflow: ellipsis;
|
||||||
|
|
||||||
// FIXME: this works only in WebKit
|
|
||||||
&.multi-line {
|
|
||||||
white-space: normal;
|
|
||||||
display: -webkit-box;
|
|
||||||
-webkit-box-orient: vertical;
|
|
||||||
}
|
|
||||||
|
|
||||||
&.two-line {
|
|
||||||
-webkit-line-clamp: 2;
|
|
||||||
// fallback for non-WebKit
|
|
||||||
max-height: 2.6em;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
// FIXME: Create generic class to represent both of these headers
|
// FIXME: Create generic class to represent both of these headers
|
||||||
|
@ -385,20 +372,6 @@ input.search {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// FIXME [mediawiki ui] These rules should not be needed in the mobile context
|
|
||||||
.mw-ui-button-group {
|
|
||||||
text-align: center;
|
|
||||||
|
|
||||||
* {
|
|
||||||
float: none !important;
|
|
||||||
}
|
|
||||||
|
|
||||||
// For talk and CTA drawer
|
|
||||||
.mw-ui-block {
|
|
||||||
width: auto;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
// This is here rather than in mainmenu.less because we want to load these rules for non-js users too
|
// This is here rather than in mainmenu.less because we want to load these rules for non-js users too
|
||||||
// Transparent shield hidden by default
|
// Transparent shield hidden by default
|
||||||
.transparent-shield,
|
.transparent-shield,
|
||||||
|
|
|
@ -1,5 +1,19 @@
|
||||||
@import 'minerva.variables';
|
@import 'minerva.variables';
|
||||||
|
|
||||||
|
// FIXME [mediawiki ui] These rules should not be needed in the mobile context
|
||||||
|
.mw-ui-button-group {
|
||||||
|
text-align: center;
|
||||||
|
|
||||||
|
* {
|
||||||
|
float: none !important;
|
||||||
|
}
|
||||||
|
|
||||||
|
// For talk and CTA drawer
|
||||||
|
.mw-ui-block {
|
||||||
|
width: auto;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
.ns-special {
|
.ns-special {
|
||||||
#content {
|
#content {
|
||||||
#section_0 {
|
#section_0 {
|
||||||
|
@ -31,3 +45,20 @@
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Used by MobileSpecialPageFeed.php in MobileFrontend
|
||||||
|
.truncated-text {
|
||||||
|
|
||||||
|
// FIXME: this works only in WebKit
|
||||||
|
&.multi-line {
|
||||||
|
white-space: normal;
|
||||||
|
display: -webkit-box;
|
||||||
|
-webkit-box-orient: vertical;
|
||||||
|
}
|
||||||
|
|
||||||
|
&.two-line {
|
||||||
|
-webkit-line-clamp: 2;
|
||||||
|
// fallback for non-WebKit
|
||||||
|
max-height: 2.6em;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
Loading…
Reference in New Issue