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

Change subject: mw.ViewPageTarget: Move .mw-body-content down to .ve-ce-surface
......................................................................


mw.ViewPageTarget: Move .mw-body-content down to .ve-ce-surface

Update VE core submodule to master (109a3cf):

* 109a3cf ve.ce.Surface: Remove font-size: 1em;

Follows-up I5818dce6265.

* When applied to ve-ui-surface, it applies to both of its children,
  namely ve-ce-surface and ve-ui-surface-overlay. The latter
  (containing things like context menu and inspectors) should not
  inherit styles intended for rendering of wikipage content by
  the skin.

* Move mw-content-{ltr,rtl} from an outer parent to a slightly
  deeper parent of the actual content. It's now on documentNode.
  Still high enough to apply to all content. This was to ensure
  it remains a child of mw-body-content, like in MediaWiki core.

* Updated padding/margin hack again. Since now the font-size
  applies on the surface, this once again means that now 1em
  on the surface != 1em on the documentNode, so we need the
  calculation again. Brought it back and this time documented
  what it is based on.

Bug: 64599
Change-Id: I9ee4582a6a0ec9e128f5c36a6dbf2adbd0b216a1
---
M lib/ve
M modules/ve-mw/init/styles/ve.init.mw.ViewPageTarget-vector.css
M modules/ve-mw/init/ve.init.mw.Target.js
3 files changed, 9 insertions(+), 5 deletions(-)

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



diff --git a/lib/ve b/lib/ve
index 330a69e..109a3cf 160000
--- a/lib/ve
+++ b/lib/ve
-Subproject commit 330a69ebd363244e614d2b067ed304ea0c24e199
+Subproject commit 109a3cf6f57e8f0602e520cc4932b7b97597520a
diff --git a/modules/ve-mw/init/styles/ve.init.mw.ViewPageTarget-vector.css 
b/modules/ve-mw/init/styles/ve.init.mw.ViewPageTarget-vector.css
index b236fe9..fa379e5 100644
--- a/modules/ve-mw/init/styles/ve.init.mw.ViewPageTarget-vector.css
+++ b/modules/ve-mw/init/styles/ve.init.mw.ViewPageTarget-vector.css
@@ -19,7 +19,7 @@
 }
 
 .ve-init-mw-viewPageTarget-surface .ve-ce-documentNode {
-       padding: 0 1.5em;
+       padding: 0 1.714em; /* surface-margin-left (1.5em) / (mw-body-content 
font-size) 0.875em */
 }
 
 .ve-init-mw-viewPageTarget-surface .oo-ui-menuWidget {
diff --git a/modules/ve-mw/init/ve.init.mw.Target.js 
b/modules/ve-mw/init/ve.init.mw.Target.js
index dc72a5b..96b40a7 100644
--- a/modules/ve-mw/init/ve.init.mw.Target.js
+++ b/modules/ve-mw/init/ve.init.mw.Target.js
@@ -1317,13 +1317,17 @@
                        setTimeout( function () {
                                // Initialize surface
                                target.surface.getContext().hide();
-                               target.surface.$element.addClass( 
'mw-body-content' );
-                               target.$document = 
target.surface.$element.find( '.ve-ce-documentNode' );
+                               target.$document = 
target.surface.view.$element.find( '.ve-ce-documentNode' );
                                target.$element.append( target.surface.$element 
);
                                target.setUpToolbar();
 
-                               // Add appropriately mw-content-ltr or 
mw-content-rtl class
-                               target.surface.view.$element.addClass(
+                               // Apply mw-body-content to the view 
(ve-ce-surface).
+                               // Not to surface (ve-ui-surface), since that 
contains both the view
+                               // and the overlay container, and we don't want 
inspectors to
+                               // inherit skin typography styles for wikipage 
content.
+                               target.surface.view.$element.addClass( 
'mw-body-content' );
+                               target.$document.addClass(
+                                       // Add appropriately mw-content-ltr or 
mw-content-rtl class
                                        'mw-content-' + mw.config.get( 
'wgVisualEditor' ).pageLanguageDir
                                );
                                target.active = true;

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I9ee4582a6a0ec9e128f5c36a6dbf2adbd0b216a1
Gerrit-PatchSet: 7
Gerrit-Project: mediawiki/extensions/VisualEditor
Gerrit-Branch: master
Gerrit-Owner: Krinkle <[email protected]>
Gerrit-Reviewer: Catrope <[email protected]>
Gerrit-Reviewer: Jforrester <[email protected]>
Gerrit-Reviewer: Trevor Parscal <[email protected]>
Gerrit-Reviewer: jenkins-bot <>

_______________________________________________
MediaWiki-commits mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits

Reply via email to