jenkins-bot has submitted this change and it was merged.
Change subject: Hygiene: Make border-box the default
......................................................................
Hygiene: Make border-box the default
Make our development lives easier.
Change-Id: Ib86b383d72597ae307558bbf50f53c2b09d25956
---
M includes/skins/MinervaTemplate.php
M includes/skins/MinervaTemplateBeta.php
M includes/skins/SkinMinerva.php
M includes/skins/UserLoginMobileTemplate.php
M includes/specials/SpecialMobileDiff.php
M includes/specials/SpecialUserProfile.php
M javascripts/common/Overlay.js
M javascripts/common/toast.js
M javascripts/modules/editor/EditorOverlayBase.js
M javascripts/modules/editor/VisualEditorOverlay.js
M javascripts/modules/nearbypages.js
M javascripts/modules/notifications/NotificationsOverlay.js
M javascripts/modules/uploads/PhotoUploadOverlay.js
M javascripts/modules/uploads/UploadTutorial.js
M javascripts/widgets/progress-bar.js
M less/common/OverlayNew.less
M less/common/common.less
M less/common/reset.less
M less/modules/talk.less
M less/tablet/common.less
M templates/OverlayNew.html
M templates/modules/editor/EditorOverlay.html
M templates/modules/editor/EditorOverlayBase.html
M templates/modules/search/SearchOverlay.html
M templates/overlays/talkSectionAdd.html
M templates/page.html
M templates/talkSection.html
M templates/uploads/PhotoUploadOverlay.html
M templates/uploads/PhotoUploadProgress.html
29 files changed, 44 insertions(+), 49 deletions(-)
Approvals:
Kaldari: Looks good to me, approved
jenkins-bot: Verified
diff --git a/includes/skins/MinervaTemplate.php
b/includes/skins/MinervaTemplate.php
index d5cf0a1..45de367 100644
--- a/includes/skins/MinervaTemplate.php
+++ b/includes/skins/MinervaTemplate.php
@@ -226,12 +226,12 @@
echo $data[ 'headelement' ];
?>
<div id="mw-mf-viewport">
- <div id="mw-mf-page-left" class="navigation-drawer
border-box">
+ <div id="mw-mf-page-left" class="navigation-drawer">
<?php
$this->renderMainMenu( $data );
?>
</div>
- <div id='mw-mf-page-center' class="border-box">
+ <div id="mw-mf-page-center">
<?php
foreach( $this->data['banners'] as
$banner ):
echo $banner;
diff --git a/includes/skins/MinervaTemplateBeta.php
b/includes/skins/MinervaTemplateBeta.php
index 59c7574..c0c6059 100644
--- a/includes/skins/MinervaTemplateBeta.php
+++ b/includes/skins/MinervaTemplateBeta.php
@@ -2,7 +2,7 @@
class MinervaTemplateBeta extends MinervaTemplate {
// FIXME: Remove variable when secondary page actions menu moves to
stable
protected $languageButtonClassName = 'mw-ui-button mw-ui-progressive
button
- languageSelector border-box icon icon-32px';
+ languageSelector icon icon-32px';
public function renderPageActions( $data ) {
if ( !$this->isMainPage ) {
diff --git a/includes/skins/SkinMinerva.php b/includes/skins/SkinMinerva.php
index 7655d6c..ec9be88 100644
--- a/includes/skins/SkinMinerva.php
+++ b/includes/skins/SkinMinerva.php
@@ -554,7 +554,7 @@
protected function prepareSearch( BaseTemplate $tpl ) {
$searchBox = array(
'id' => 'searchInput',
- 'class' => 'search border-box',
+ 'class' => 'search',
'autocomplete' => 'off',
// The placeholder gets fed to HTML::element later
which escapes all
// attribute values, so no need to escape the string
here.
diff --git a/includes/skins/UserLoginMobileTemplate.php
b/includes/skins/UserLoginMobileTemplate.php
index ea33959..5e347e2 100644
--- a/includes/skins/UserLoginMobileTemplate.php
+++ b/includes/skins/UserLoginMobileTemplate.php
@@ -68,14 +68,14 @@
'class' => 'inputs-box',
) ) .
Html::input( 'wpName', $username, 'text',
- array( 'class' => 'loginText border-box',
+ array( 'class' => 'loginText',
'placeholder' => wfMessage(
'mobile-frontend-username-placeholder' )->text(),
'id' => 'wpName1',
'tabindex' => '1',
'size' => '20',
'required' ) ) .
Html::input( 'wpPassword', null, 'password',
- array( 'class' => 'loginPassword border-box',
+ array( 'class' => 'loginPassword',
'placeholder' => wfMessage(
'mobile-frontend-password-placeholder' )->text(),
'id' => 'wpPassword1',
'tabindex' => '2',
diff --git a/includes/specials/SpecialMobileDiff.php
b/includes/specials/SpecialMobileDiff.php
index bd0f73a..123fc57 100644
--- a/includes/specials/SpecialMobileDiff.php
+++ b/includes/specials/SpecialMobileDiff.php
@@ -222,7 +222,7 @@
$output->addHtml(
Html::openElement( 'div', array( 'id' =>
'mw-mf-userinfo',
- 'class' => 'buttonBar position-fixed
border-box' ) )
+ 'class' => 'buttonBar position-fixed' ) )
);
$userId = $this->rev->getUser();
diff --git a/includes/specials/SpecialUserProfile.php
b/includes/specials/SpecialUserProfile.php
index d738340..b7f4af8 100644
--- a/includes/specials/SpecialUserProfile.php
+++ b/includes/specials/SpecialUserProfile.php
@@ -51,7 +51,7 @@
'href' => $title->getLocalUrl() )
) .
$page->getMediumThumbnailHtml() .
- Html::openElement( 'div', array( 'class' => 'caption
border-box' ) ) .
+ Html::openElement( 'div', array( 'class' => 'caption' )
) .
$this->msg(
'mobile-frontend-profile-last-upload-caption' )
->numParams( $daysAgo ) // $1
->params( $this->targetUser->getName() ) // $2
@@ -77,7 +77,7 @@
$html = Html::openElement( 'div', array( 'class' =>
'card' ) )
. Html::openElement( 'div', array( 'class' =>
'container' ) )
. MobilePage::getPlaceHolderThumbnailHtml(
'list-thumb-thanks' )
- . Html::openElement( 'div', array( 'class' =>
'caption border-box' ) )
+ . Html::openElement( 'div', array( 'class' =>
'caption' ) )
. $this->msg(
'mobile-frontend-profile-last-thank',
$user,
$this->targetUser
@@ -109,7 +109,7 @@
$html = Html::openElement( 'div', array( 'class' =>
'card' ) )
. Html::openElement( 'div', array( 'class' =>
'container image' ) )
. $thumbnail
- . Html::openElement( 'div', array( 'class' =>
'caption border-box' ) )
+ . Html::openElement( 'div', array( 'class' =>
'caption' ) )
. $this->msg(
'mobile-frontend-profile-last-edit',
$rev->getTitle(),
$daysAgo,
diff --git a/javascripts/common/Overlay.js b/javascripts/common/Overlay.js
index d095b7e..e985a73 100644
--- a/javascripts/common/Overlay.js
+++ b/javascripts/common/Overlay.js
@@ -27,7 +27,7 @@
/**
* @type {String}
*/
- className: 'overlay border-box',
+ className: 'overlay',
template: M.template.get( 'OverlayNew' ),
defaults: {
headerButtonsListClassName: 'bottom-border',
diff --git a/javascripts/common/toast.js b/javascripts/common/toast.js
index a177eef..62c7cd0 100644
--- a/javascripts/common/toast.js
+++ b/javascripts/common/toast.js
@@ -6,7 +6,7 @@
* @extends Drawer
*/
Toast = Drawer.extend( {
- className: 'toast position-fixed border-box',
+ className: 'toast position-fixed',
minHideDelay: 1000,
/**
* @method
diff --git a/javascripts/modules/editor/EditorOverlayBase.js
b/javascripts/modules/editor/EditorOverlayBase.js
index bd388e3..e726de8 100644
--- a/javascripts/modules/editor/EditorOverlayBase.js
+++ b/javascripts/modules/editor/EditorOverlayBase.js
@@ -26,7 +26,7 @@
sourceEditorMsg: mw.msg(
'mobile-frontend-editor-source-editor' ),
},
template: M.template.get( 'modules/editor/EditorOverlayBase' ),
- className: 'overlay editor-overlay border-box',
+ className: 'overlay editor-overlay',
_updateEditCount: function() {
this.editCount += 1;
diff --git a/javascripts/modules/editor/VisualEditorOverlay.js
b/javascripts/modules/editor/VisualEditorOverlay.js
index 02f8e98..cec802c 100644
--- a/javascripts/modules/editor/VisualEditorOverlay.js
+++ b/javascripts/modules/editor/VisualEditorOverlay.js
@@ -13,7 +13,7 @@
header: M.template.get(
'modules/editor/VisualEditorOverlayHeader' ),
content: M.template.get(
'modules/editor/VisualEditorOverlay' )
},
- className: 'overlay editor-overlay editor-overlay-ve
border-box',
+ className: 'overlay editor-overlay editor-overlay-ve',
initialize: function( options ) {
var self = this;
options.previewingMsg = mw.msg(
'mobile-frontend-page-saving', options.title );
diff --git a/javascripts/modules/nearbypages.js
b/javascripts/modules/nearbypages.js
index 317e5b3..ec4fc5a 100644
--- a/javascripts/modules/nearbypages.js
+++ b/javascripts/modules/nearbypages.js
@@ -21,7 +21,7 @@
var $btn;
if ( M.router.isSupported() ) {
- $btn = $( '<a class="mw-ui-button mw-ui-progressive
button nearby icon icon-32px border-box">' ).attr( 'href', '#geonotahack' );
+ $btn = $( '<a class="mw-ui-button mw-ui-progressive
button nearby icon icon-32px">' ).attr( 'href', '#geonotahack' );
M.router.route( /^geonotahack$/, loadGeoNotAHack );
} else {
$btn = $( '<button class="mw-ui-button
mw-ui-progressive nearby icon icon-32px">' ).on( 'click', loadGeoNotAHack );
diff --git a/javascripts/modules/notifications/NotificationsOverlay.js
b/javascripts/modules/notifications/NotificationsOverlay.js
index 295b19b..f70c009 100644
--- a/javascripts/modules/notifications/NotificationsOverlay.js
+++ b/javascripts/modules/notifications/NotificationsOverlay.js
@@ -10,7 +10,7 @@
*/
NotificationsOverlay = Overlay.extend( {
active: false,
- className: 'overlay notifications-overlay border-box',
+ className: 'overlay notifications-overlay',
templatePartials: {
content: M.template.get(
'modules/notifications/NotificationsOverlay' )
},
diff --git a/javascripts/modules/uploads/PhotoUploadOverlay.js
b/javascripts/modules/uploads/PhotoUploadOverlay.js
index 675c09e..912c55b 100644
--- a/javascripts/modules/uploads/PhotoUploadOverlay.js
+++ b/javascripts/modules/uploads/PhotoUploadOverlay.js
@@ -27,7 +27,7 @@
]
},
- className: 'overlay photo-overlay border-box',
+ className: 'overlay photo-overlay',
templatePartials: {
content: M.template.get( 'uploads/PhotoUploadOverlay' )
diff --git a/javascripts/modules/uploads/UploadTutorial.js
b/javascripts/modules/uploads/UploadTutorial.js
index 79ecf52..88a99c0 100644
--- a/javascripts/modules/uploads/UploadTutorial.js
+++ b/javascripts/modules/uploads/UploadTutorial.js
@@ -8,7 +8,7 @@
UploadTutorial = Overlay.extend( {
template: M.template.get( 'uploads/UploadTutorial' ),
- className: 'overlay carousel border-box tutorial',
+ className: 'overlay carousel tutorial',
defaults: {
pages: [
diff --git a/javascripts/widgets/progress-bar.js
b/javascripts/widgets/progress-bar.js
index 0f0de05..ad64dec 100644
--- a/javascripts/widgets/progress-bar.js
+++ b/javascripts/widgets/progress-bar.js
@@ -3,7 +3,7 @@
var View = M.require( 'View' ), ProgressBar;
ProgressBar = View.extend( {
- className: 'progress-bar border-box',
+ className: 'progress-bar',
template: '<div class="value"></div>',
diff --git a/less/common/OverlayNew.less b/less/common/OverlayNew.less
index 938aa45..22e6ae0 100644
--- a/less/common/OverlayNew.less
+++ b/less/common/OverlayNew.less
@@ -28,8 +28,8 @@
//
// Markup:
// <div class="overlay-enabled">
-// <div class="overlay border-box visible">
-// <div class="overlay-header-container border-box visible">
+// <div class="overlay visible">
+// <div class="overlay-header-container visible">
// <div class="overlay-header">
// <ul class="bottom-border">
// <li><button class="cancel icon">Close</button></li>
@@ -49,8 +49,8 @@
//
// Markup:
// <div class="overlay-enabled">
-// <div class="overlay border-box visible">
-// <div class="overlay-header-container border-box visible">
+// <div class="overlay visible">
+// <div class="overlay-header-container visible">
// <div class="overlay-header">
// <ul class="bottom-border">
// <li><button class="cancel icon">Close</button></li>
@@ -73,8 +73,8 @@
//
// Markup:
// <div class="overlay-enabled">
-// <div class="overlay border-box visible">
-// <div class="overlay-header-container border-box visible">
+// <div class="overlay visible">
+// <div class="overlay-header-container visible">
// <div class="overlay-header">
// <ul class="bottom-border">
// <li><button class="cancel icon">Close</button></li>
@@ -306,8 +306,8 @@
// All types of overlays (progressive and constructive) apply here.
//
// Markup:
-// <div class="overlay border-box overlay-bottom position-fixed visible">
-// <div class="overlay-header-container border-box visible">
+// <div class="overlay overlay-bottom position-fixed visible">
+// <div class="overlay-header-container visible">
// <div class="overlay-header">
// <ul class="bottom-border">
// <li><button class="cancel icon">Close</button></li>
diff --git a/less/common/common.less b/less/common/common.less
index fc7c326..ade5af8 100644
--- a/less/common/common.less
+++ b/less/common/common.less
@@ -54,13 +54,6 @@
}
}
-#mw-mf-page-left,
-#mw-mf-page-center,
-// FIXME: Remove above when cache is clear
-.border-box {
- .box-sizing(border-box);
-}
-
#content_wrapper {
.error {
color: #C85353;
diff --git a/less/common/reset.less b/less/common/reset.less
index 675439e..283971f 100644
--- a/less/common/reset.less
+++ b/less/common/reset.less
@@ -2,6 +2,7 @@
v2.0 | 20110126
License: none (public domain)
*/
+@import "minerva.mixins";
html, body, div, span,
h1, h2, h3, h4, h5, h6, p, blockquote, pre,
@@ -21,6 +22,7 @@
font: inherit;
vertical-align: baseline;
background: none;
+ .box-sizing(border-box);
}
button {
border: none;
diff --git a/less/modules/talk.less b/less/modules/talk.less
index 29c2ee0..4280919 100644
--- a/less/modules/talk.less
+++ b/less/modules/talk.less
@@ -9,7 +9,7 @@
line-height: 38px;
font-weight: bold;
color: #FFF;
- padding-left: 4px;
+ margin-left: 4px;
font-size: 9px; // FIXME: use pixels for time being as the icon
in pixels.
}
}
diff --git a/less/tablet/common.less b/less/tablet/common.less
index 9871d58..92ef57d 100644
--- a/less/tablet/common.less
+++ b/less/tablet/common.less
@@ -6,7 +6,7 @@
@import "minerva.mixins";
-@contentMaxWidth: 890px;
+@contentMaxWidth: 890px + (@contentPaddingTablet * 2);
@media all and (min-width: @wgMFDeviceWidthTablet) {
.beta, .alpha {
diff --git a/templates/OverlayNew.html b/templates/OverlayNew.html
index b3b7094..7552622 100644
--- a/templates/OverlayNew.html
+++ b/templates/OverlayNew.html
@@ -1,4 +1,4 @@
-<div class="overlay-header-container border-box visible {{#fixedHeader}}
position-fixed{{/fixedHeader}}">
+<div class="overlay-header-container visible {{#fixedHeader}}
position-fixed{{/fixedHeader}}">
<div class="overlay-header">
<ul class="bottom-border">
<li><button class="cancel
icon">{{closeMsg}}</button></li>
diff --git a/templates/modules/editor/EditorOverlay.html
b/templates/modules/editor/EditorOverlay.html
index ae5f4a3..62f8e22 100644
--- a/templates/modules/editor/EditorOverlay.html
+++ b/templates/modules/editor/EditorOverlay.html
@@ -1,2 +1,2 @@
-<textarea class="border-box wikitext-editor" cols="40" rows="10"
placeholder="{{placeholder}}"></textarea>
+<textarea class="wikitext-editor" cols="40" rows="10"
placeholder="{{placeholder}}"></textarea>
<div class="preview content"></div>
diff --git a/templates/modules/editor/EditorOverlayBase.html
b/templates/modules/editor/EditorOverlayBase.html
index 39c51eb..70de5b2 100644
--- a/templates/modules/editor/EditorOverlayBase.html
+++ b/templates/modules/editor/EditorOverlayBase.html
@@ -1,4 +1,4 @@
-<div class="overlay-header-container border-box visible position-fixed">
+<div class="overlay-header-container visible position-fixed">
{{>header}}
<div class="overlay-header save-header hideable hidden">
<ul class="bottom-border">
@@ -26,13 +26,13 @@
<div class="panels">
<div class="save-panel panel hideable hidden">
- <input class="summary border-box" placeholder="{{summaryMsg}}"
/>
+ <input class="summary" placeholder="{{summaryMsg}}" />
<p class="license">{{{licenseMsg}}}</p>
</div>
<div class="captcha-panel panel hideable hidden">
<div class="inputs-box">
<img src="">
- <input class="captcha-word border-box"
placeholder="{{captchaMsg}}" />
+ <input class="captcha-word"
placeholder="{{captchaMsg}}" />
</div>
</div>
</div>
diff --git a/templates/modules/search/SearchOverlay.html
b/templates/modules/search/SearchOverlay.html
index d05c150..4db4288 100644
--- a/templates/modules/search/SearchOverlay.html
+++ b/templates/modules/search/SearchOverlay.html
@@ -1,5 +1,5 @@
<div class="search-overlay-contents">
- <div class="overlay-header-container border-box visible position-fixed">
+ <div class="overlay-header-container visible position-fixed">
<div class="overlay-header">
<ul class="bottom-border">
<li><button class="cancel
icon">{{closeMsg}}</button></li>
diff --git a/templates/overlays/talkSectionAdd.html
b/templates/overlays/talkSectionAdd.html
index ebc3860..dbaaad9 100644
--- a/templates/overlays/talkSectionAdd.html
+++ b/templates/overlays/talkSectionAdd.html
@@ -2,6 +2,6 @@
<p class="license">{{{licenseMsg}}}</p>
</div>
<div class="panel">
- <input type="text" class="border-box summary"
placeholder="{{topicTitlePlaceHolder}}">
+ <input type="text" class="summary"
placeholder="{{topicTitlePlaceHolder}}">
</div>
-<textarea class="border-box wikitext-editor" cols="40" rows="10"
placeholder="{{topicContentPlaceHolder}}"></textarea>
+<textarea class="wikitext-editor" cols="40" rows="10"
placeholder="{{topicContentPlaceHolder}}"></textarea>
diff --git a/templates/page.html b/templates/page.html
index 8415d3e..05d79dc 100644
--- a/templates/page.html
+++ b/templates/page.html
@@ -26,7 +26,7 @@
{{#hasLanguages}}
<div id="page-secondary-actions">
<a href="{{languageUrl}}"
- class="mw-ui-button mw-ui-progressive button
languageSelector border-box icon icon-32px icon-text">
+ class="mw-ui-button mw-ui-progressive button
languageSelector icon icon-32px icon-text">
{{languageLabel}}
</a>
</div>
@@ -35,7 +35,7 @@
{{^inBetaOrAlpha}}
{{#hasLanguages}}
<a href="{{languageUrl}}"
- class="mw-ui-button mw-ui-progressive button languageSelector
border-box icon icon-32px icon-text">
+ class="mw-ui-button mw-ui-progressive button languageSelector
icon icon-32px icon-text">
{{languageLabel}}
</a>
{{/hasLanguages}}
diff --git a/templates/talkSection.html b/templates/talkSection.html
index 6f1c5a3..98ecad3 100644
--- a/templates/talkSection.html
+++ b/templates/talkSection.html
@@ -6,7 +6,7 @@
<div class="comment">
<div class="list-header">{{reply}}</div>
<div class="comment-content">
- <textarea class="border-box wikitext-editor"></textarea>
+ <textarea class="wikitext-editor"></textarea>
<p class="license">
{{info}}
{{{licenseMsg}}}
diff --git a/templates/uploads/PhotoUploadOverlay.html
b/templates/uploads/PhotoUploadOverlay.html
index 1c4527c..768d305 100644
--- a/templates/uploads/PhotoUploadOverlay.html
+++ b/templates/uploads/PhotoUploadOverlay.html
@@ -1,6 +1,6 @@
<div class="content">
<div class="preview loading"></div>
<p>{{ownerStatement}} <a href="#/upload-tutorial" class="help
inline">{{help}}</a></p>
- <textarea name="description" placeholder="{{descriptionPlaceholder}}"
class="border-box"></textarea>
+ <textarea name="description"
placeholder="{{descriptionPlaceholder}}"></textarea>
<p class="license">{{{license}}}</p>
</div>
diff --git a/templates/uploads/PhotoUploadProgress.html
b/templates/uploads/PhotoUploadProgress.html
index 7dd8562..d7503e5 100644
--- a/templates/uploads/PhotoUploadProgress.html
+++ b/templates/uploads/PhotoUploadProgress.html
@@ -1,4 +1,4 @@
-<div class="overlay-header-container border-box visible position-fixed">
+<div class="overlay-header-container visible position-fixed">
<div class="overlay-header progress-header hideable">
<ul class="bottom-border">
<li><button class="cancel
icon">{{closeMsg}}</button></li>
--
To view, visit https://gerrit.wikimedia.org/r/133188
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings
Gerrit-MessageType: merged
Gerrit-Change-Id: Ib86b383d72597ae307558bbf50f53c2b09d25956
Gerrit-PatchSet: 10
Gerrit-Project: mediawiki/extensions/MobileFrontend
Gerrit-Branch: master
Gerrit-Owner: Jdlrobson <[email protected]>
Gerrit-Reviewer: Awjrichards <[email protected]>
Gerrit-Reviewer: JGonera <[email protected]>
Gerrit-Reviewer: Jdlrobson <[email protected]>
Gerrit-Reviewer: Kaldari <[email protected]>
Gerrit-Reviewer: jenkins-bot <>
_______________________________________________
MediaWiki-commits mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits