Esanders has uploaded a new change for review. https://gerrit.wikimedia.org/r/294327
Change subject: Create separate CSS hack class for Edge ...................................................................... Create separate CSS hack class for Edge ..and apply to hacks which are still broken in Edge. Bug: T111081 Change-Id: I026917056ae81212ed4af411b097952fdddf7010 --- M src/ce/styles/nodes/ve.ce.FocusableNode.css M src/ce/styles/ve.ce.Surface.css M src/init/ve.init.Platform.js M src/init/ve.init.Target.js M src/ui/styles/dialogs/ve.ui.FindAndReplaceDialog.css 5 files changed, 27 insertions(+), 12 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/VisualEditor/VisualEditor refs/changes/27/294327/1 diff --git a/src/ce/styles/nodes/ve.ce.FocusableNode.css b/src/ce/styles/nodes/ve.ce.FocusableNode.css index 74b5391..0beb27d 100644 --- a/src/ce/styles/nodes/ve.ce.FocusableNode.css +++ b/src/ce/styles/nodes/ve.ce.FocusableNode.css @@ -79,13 +79,13 @@ opacity: 0.15; } -/* Support: IE */ +/* Support: IE, Edge */ /* Set opacity directly on the highlights, rather than their containers, otherwise the opacity isn't applied at all */ -.ve-init-target-ie .ve-ce-surface-highlights-focused .ve-ce-focusableNode-highlight { +.ve-init-target-ie-or-edge .ve-ce-surface-highlights-focused .ve-ce-focusableNode-highlight { opacity: 0.5; } -.ve-init-target-ie .ve-ce-surface-highlights-blurred .ve-ce-focusableNode-highlight { +.ve-init-target-ie-or-edge .ve-ce-surface-highlights-blurred .ve-ce-focusableNode-highlight { opacity: 0.15; } diff --git a/src/ce/styles/ve.ce.Surface.css b/src/ce/styles/ve.ce.Surface.css index b26ded4..5250119 100644 --- a/src/ce/styles/ve.ce.Surface.css +++ b/src/ce/styles/ve.ce.Surface.css @@ -34,10 +34,10 @@ background: #000; } -/* Support: IE */ +/* Support: IE, Edge */ /* Set opacity directly on the highlights, rather than their containers, otherwise the opacity isn't applied at all */ -.ve-init-target-ie .ve-ce-surface-deactivatedSelection > div { +.ve-init-target-ie-or-edge .ve-ce-surface-deactivatedSelection > div { opacity: 0.5; } @@ -72,7 +72,7 @@ /* Support: IE */ /* Prevent IE from wrapping link text in <u> and <font color> tags */ -.ve-init-target-ie .ve-ce-surface-paste a { +.ve-init-target-ie-or-edge .ve-ce-surface-paste a { text-decoration: underline !important; /* stylelint-disable-line declaration-no-important */ color: #06c; } diff --git a/src/init/ve.init.Platform.js b/src/init/ve.init.Platform.js index e348ebd..29a68c9 100644 --- a/src/init/ve.init.Platform.js +++ b/src/init/ve.init.Platform.js @@ -72,9 +72,6 @@ /** * Check whether we are running in Internet Explorer. * - * FIXME T126026: This should not be needed, and it should eventually be removed. - * If this hasn't died in a fire by the end of September 2015, Roan has failed. - * * @static * @method * @inheritable @@ -85,6 +82,18 @@ }; /** + * Check whether we are running in Edge. + * + * @static + * @method + * @inheritable + * @return {boolean} We are in Edge + */ +ve.init.Platform.static.isEdge = function () { + return $.client.profile().name === 'edge'; +}; + +/** * Check whether we are running on iOS * * @static diff --git a/src/init/ve.init.Target.js b/src/init/ve.init.Target.js index aeb73f7..de260fd 100644 --- a/src/init/ve.init.Target.js +++ b/src/init/ve.init.Target.js @@ -46,6 +46,12 @@ this.$element.addClass( 've-init-target-ie' ); } + // We don't have any Edge CSS bugs that aren't present in IE, so + // use a combined class to simplify selectors. + if ( ve.init.platform.constructor.static.isEdge() ) { + this.$element.addClass( 've-init-target-ie-or-edge' ); + } + // Events this.onDocumentKeyDownHandler = this.onDocumentKeyDown.bind( this ); this.onTargetKeyDownHandler = this.onTargetKeyDown.bind( this ); diff --git a/src/ui/styles/dialogs/ve.ui.FindAndReplaceDialog.css b/src/ui/styles/dialogs/ve.ui.FindAndReplaceDialog.css index 718c018..6e7aed0 100644 --- a/src/ui/styles/dialogs/ve.ui.FindAndReplaceDialog.css +++ b/src/ui/styles/dialogs/ve.ui.FindAndReplaceDialog.css @@ -62,13 +62,13 @@ background: #1f850b; } -/* Support: IE */ +/* Support: IE, Edge */ /* Set opacity directly on the highlights, rather than their containers, otherwise the opacity isn't applied at all */ -.ve-init-target-ie .ve-ui-findAndReplaceDialog-findResult > div { +.ve-init-target-ie-or-edge .ve-ui-findAndReplaceDialog-findResult > div { opacity: 0.2; } -.ve-init-target-ie .ve-ui-findAndReplaceDialog-findResult-focused > div { +.ve-init-target-ie-or-edge .ve-ui-findAndReplaceDialog-findResult-focused > div { opacity: 0.4; } -- To view, visit https://gerrit.wikimedia.org/r/294327 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I026917056ae81212ed4af411b097952fdddf7010 Gerrit-PatchSet: 1 Gerrit-Project: VisualEditor/VisualEditor Gerrit-Branch: master Gerrit-Owner: Esanders <esand...@wikimedia.org> _______________________________________________ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits