Catrope 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 (be38e90):
* be38e90 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: Verified; Looks good to me, approved
diff --git a/lib/ve b/lib/ve
index d21c272..be38e90 160000
--- a/lib/ve
+++ b/lib/ve
-Subproject commit d21c272adfbba03a02f7242e02ceed2d3024a559
+Subproject commit be38e9007fdceeec53a8350a2f67fe880c530acc
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 941db9a..6a1b6ba 100644
--- a/modules/ve-mw/init/ve.init.mw.Target.js
+++ b/modules/ve-mw/init/ve.init.mw.Target.js
@@ -1315,13 +1315,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/130745
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings
Gerrit-MessageType: merged
Gerrit-Change-Id: I9ee4582a6a0ec9e128f5c36a6dbf2adbd0b216a1
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/VisualEditor
Gerrit-Branch: wmf/1.24wmf2
Gerrit-Owner: Catrope <[email protected]>
Gerrit-Reviewer: Catrope <[email protected]>
Gerrit-Reviewer: jenkins-bot <>
_______________________________________________
MediaWiki-commits mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits