jenkins-bot has submitted this change and it was merged.

Change subject: Border box no longer default
......................................................................


Border box no longer default

Except for VE
Bug: T86366
Change-Id: If685f987eb29c36afc3e2b11ff99c8ad84333b4b
---
M javascripts/View.js
M javascripts/modules/editor/VisualEditorOverlay.js
M less/common.less
M less/reset.less
4 files changed, 14 insertions(+), 24 deletions(-)

Approvals:
  Kaldari: Looks good to me, approved
  jenkins-bot: Verified



diff --git a/javascripts/View.js b/javascripts/View.js
index 9023043..3d5ebd4 100644
--- a/javascripts/View.js
+++ b/javascripts/View.js
@@ -94,6 +94,11 @@
                tagName: 'div',
 
                /**
+                * Whether border box box sizing model should be used
+                * @property Boolean
+                */
+               isBorderBox: true,
+               /**
                 * @property {Mixed}
                 * Specifies the template used in render(). 
Object|String|HoganTemplate
                 */
@@ -146,8 +151,10 @@
                                this.$el = $( '<' + this.tagName + '>' );
                        }
                        this.$el.addClass( this.className );
-                       // FIXME: If this becomes a default should become part 
of className property.
-                       this.$el.addClass( 'view-border-box' );
+                       if ( this.isBorderBox ) {
+                               // FIXME: Merge with className property (?)
+                               this.$el.addClass( 'view-border-box' );
+                       }
 
                        // TODO: if template compilation is too slow, don't 
compile them on a
                        // per object basis, but don't worry about it now 
(maybe add cache to
diff --git a/javascripts/modules/editor/VisualEditorOverlay.js 
b/javascripts/modules/editor/VisualEditorOverlay.js
index c749578..b8a77a0 100644
--- a/javascripts/modules/editor/VisualEditorOverlay.js
+++ b/javascripts/modules/editor/VisualEditorOverlay.js
@@ -11,6 +11,8 @@
         */
        VisualEditorOverlay = EditorOverlayBase.extend( {
                /** @inheritdoc **/
+               isBorderBox: false,
+               /** @inheritdoc **/
                templatePartials: $.extend( {}, 
EditorOverlayBase.prototype.templatePartials, {
                        content: mw.template.get( 'mobile.editor.ve', 
'contentVE.hogan' )
                } ),
@@ -45,8 +47,6 @@
                                skipPreview: false
                        } );
                        this.$continueBtn = self.$( '.continue' ).prop( 
'disabled', true );
-                       // FIXME: This should be done by manipulating className
-                       this.$el.removeClass( 'view-border-box' );
                },
                /**
                 * Destroy the existing VisualEditor target.
diff --git a/less/common.less b/less/common.less
index 49b01ca..f347a70 100644
--- a/less/common.less
+++ b/less/common.less
@@ -31,12 +31,9 @@
        bottom: 0;
 }
 
-// FIXME: Make default or delete based on outcome of T86366
-.alpha {
-       .view-border-box *,
-       .view-border-box {
-               .box-sizing(border-box);
-       }
+.view-border-box *,
+.view-border-box {
+       .box-sizing(border-box);
 }
 
 .mw-mf-image-replacement {
diff --git a/less/reset.less b/less/reset.less
index 04b5f59..06950ca 100644
--- a/less/reset.less
+++ b/less/reset.less
@@ -26,20 +26,6 @@
        font-size: 100%;
 }
 
-// box-sizing rules (currently in flux)
-// FIXME: Make default or delete based on outcome of T86366
-.beta,
-.stable {
-       * {
-               .box-sizing(border-box);
-       }
-}
-
-// CentralNotice banners use regular box-sizing
-div#centralNotice {
-       .box-sizing(content-box);
-}
-
 button {
        border: none;
        background-color: transparent;

-- 
To view, visit https://gerrit.wikimedia.org/r/202760
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings

Gerrit-MessageType: merged
Gerrit-Change-Id: If685f987eb29c36afc3e2b11ff99c8ad84333b4b
Gerrit-PatchSet: 2
Gerrit-Project: mediawiki/extensions/MobileFrontend
Gerrit-Branch: master
Gerrit-Owner: 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

Reply via email to