Esanders has uploaded a new change for review.

  https://gerrit.wikimedia.org/r/268923

Change subject: VE: Move Vector-specific styles to a separate stylesheet
......................................................................

VE: Move Vector-specific styles to a separate stylesheet

Also create an equivalent stylesheet for Monobook.

Change-Id: I8ef570e91ec5d4c80fd46158be6ab5976a788a05
---
M Resources.php
A modules/editor/editors/visualeditor/mw.flow.ve.Target-monobook.less
A modules/editor/editors/visualeditor/mw.flow.ve.Target-vector.less
M modules/editor/editors/visualeditor/mw.flow.ve.Target.less
M modules/styles/editors-common.less
M modules/styles/flow/widgets/editor/mw.flow.ui.EditorSwitcherWidget.less
6 files changed, 118 insertions(+), 31 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/Flow 
refs/changes/23/268923/1

diff --git a/Resources.php b/Resources.php
index b5cc3f4..c3092be 100644
--- a/Resources.php
+++ b/Resources.php
@@ -552,6 +552,14 @@
                        'editor/editors/visualeditor/mw.flow.ve.Target.less',
                        
'editor/editors/visualeditor/ui/mw.flow.ve.ui.Icons.less',
                ),
+               'skinStyles' => array(
+                       'vector' => array(
+                               
'editor/editors/visualeditor/mw.flow.ve.Target-vector.less',
+                       ),
+                       'monobook' => array(
+                               
'editor/editors/visualeditor/mw.flow.ve.Target-monobook.less',
+                       ),
+               ),
                'dependencies' => array(
                        'es5-shim',
                        'ext.visualEditor.core',
diff --git 
a/modules/editor/editors/visualeditor/mw.flow.ve.Target-monobook.less 
b/modules/editor/editors/visualeditor/mw.flow.ve.Target-monobook.less
new file mode 100644
index 0000000..5455334
--- /dev/null
+++ b/modules/editor/editors/visualeditor/mw.flow.ve.Target-monobook.less
@@ -0,0 +1,51 @@
+@import 'mediawiki.mixins';
+@import 'mediawiki.ui/variables';
+@import 'flow.variables';
+@import 'flow.colors';
+
+.flow-component {
+       .ve-init-target {
+               &.flow-ui-focused {
+                       outline: none;
+                       border-color: #a7dcff;
+                       box-shadow: 0 0 0.3em #a7dcff, 0 0 0 white;
+               }
+       }
+
+       .oo-ui-toolbar {
+               // Undo .mw-body-content font-size (0.875em) and apply 
font-size matching OOUI theme (0.8em)
+               // TODO: Make this theme specific
+               font-size: 0.8em/0.625/1.27; /* 0.8em / x-small / 127% */
+               .oo-ui-toolbar {
+                       // But don't let these rules double-apply for nested 
toolbars
+                       font-size: 1em;
+               }
+       }
+
+       .oo-ui-toolbar-bar {
+               // The default border is only appropriate in the default ve, 
with
+               // the toolbar above the editing surface.
+               border: none;
+               // When we apply a pending texture to the editor, we don't want 
the toolbar to display
+               // in solid white on top of that.
+               background: transparent;
+       }
+}
+
+.flow-editor {
+               // Undo border & box-shadow on textarea and re-apply it on the
+               // div that contains textarea + legal text + switch button
+               &.flow-ui-focused {
+                       outline: none;
+                       border-color: #a7dcff;
+                       box-shadow: 0 0 0.3em #a7dcff, 0 0 0 white;
+               }
+}
+
+.flow-ui-editorSwitcherWidget {
+       &-focused {
+               outline: none;
+               border-color: #a7dcff;
+               box-shadow: 0 0 0.3em #a7dcff, 0 0 0 white;
+       }
+}
diff --git a/modules/editor/editors/visualeditor/mw.flow.ve.Target-vector.less 
b/modules/editor/editors/visualeditor/mw.flow.ve.Target-vector.less
new file mode 100644
index 0000000..b9181ed
--- /dev/null
+++ b/modules/editor/editors/visualeditor/mw.flow.ve.Target-vector.less
@@ -0,0 +1,57 @@
+@import 'mediawiki.mixins';
+@import 'mediawiki.ui/variables';
+@import 'flow.variables';
+@import 'flow.colors';
+
+.flow-component {
+       .ve-init-target {
+               &.flow-ui-focused {
+                       border-color: @colorProgressive;
+                       box-shadow: inset 0 0 0 2px @colorProgressive;
+               }
+       }
+
+       .oo-ui-toolbar {
+               // The 2px of positive margin gives room for the blue border of 
the
+               // documentNode (via .mw-ui-input)
+               margin: (-@editorToolbarHeight - 2px) 2px 2px 2px;
+
+               // Undo .mw-body-content font-size (0.875em) and apply 
font-size matching OOUI theme (0.8em)
+               // TODO: Make this theme specific
+               font-size: 0.8/0.875em;
+               .oo-ui-toolbar {
+                       // But don't let these rules double-apply for nested 
toolbars
+                       font-size: 1em;
+               }
+       }
+
+       .oo-ui-toolbar-bar {
+               // The default border is only appropriate in the default ve, 
with
+               // the toolbar above the editing surface.
+               border: none;
+               box-shadow: none;
+               // When we apply a pending texture to the editor, we don't want 
the toolbar to display
+               // in solid white on top of that.
+               background: transparent;
+       }
+
+       .oo-ui-toolGroup {
+               border: none;
+       }
+}
+
+.flow-editor {
+               // Undo border & box-shadow on textarea and re-apply it on the
+               // div that contains textarea + legal text + switch button
+               &.flow-ui-focused {
+                       border-color: @colorProgressive;
+                       box-shadow: inset 0 0 0 2px @colorProgressive;
+               }
+}
+
+.flow-ui-editorSwitcherWidget {
+       &-focused {
+               border-color: @colorProgressive;
+               box-shadow: inset 0 0 0 2px @colorProgressive;
+       }
+}
diff --git a/modules/editor/editors/visualeditor/mw.flow.ve.Target.less 
b/modules/editor/editors/visualeditor/mw.flow.ve.Target.less
index 0227bc2..651764a 100644
--- a/modules/editor/editors/visualeditor/mw.flow.ve.Target.less
+++ b/modules/editor/editors/visualeditor/mw.flow.ve.Target.less
@@ -7,11 +7,6 @@
 .flow-component {
        .ve-init-target {
                border: 1px solid #CCC;
-
-               &.flow-ui-focused {
-                       border-color: @colorProgressive;
-                       box-shadow: inset 0 0 0 2px @colorProgressive;
-               }
        }
 
        .ve-ce-documentNode,
diff --git a/modules/styles/editors-common.less 
b/modules/styles/editors-common.less
index a3b8a0a..5fb5bfe 100644
--- a/modules/styles/editors-common.less
+++ b/modules/styles/editors-common.less
@@ -7,31 +7,12 @@
 .flow-component {
        .oo-ui-toolbar {
                // The -@editorToolbarHeight matches the padding-bottom on 
.ve-ui-surface to put the toolbar inside
-               // the editing area. The 2px of positive margin gives room for 
the blue border of the
-               // documentNode (via .mw-ui-input)
-               margin: (-@editorToolbarHeight - 2px) 2px 2px 2px;
-
-               // Undo .mw-body-content font-size (0.875em) and apply 
font-size matching OOUI theme (0.8em)
-               // TODO: Make this theme specific
-               font-size: 0.8/0.875em;
+               // the editing area.
+               margin-top: -@editorToolbarHeight;
                .oo-ui-toolbar {
                        // But don't let these rules double-apply for nested 
toolbars
                        margin: 0;
-                       font-size: 1em;
                }
        }
 
-       .oo-ui-toolbar-bar {
-               // The default border is only appropriate in the default ve, 
with
-               // the toolbar above the editing surface.
-               border: none;
-               box-shadow: none;
-               // When we apply a pending texture to the editor, we don't want 
the toolbar to display
-               // in solid white on top of that.
-               background: transparent;
-       }
-
-       .oo-ui-toolGroup {
-               border: none;
-       }
 }
diff --git 
a/modules/styles/flow/widgets/editor/mw.flow.ui.EditorSwitcherWidget.less 
b/modules/styles/flow/widgets/editor/mw.flow.ui.EditorSwitcherWidget.less
index eaaf62f..fc575da 100644
--- a/modules/styles/flow/widgets/editor/mw.flow.ui.EditorSwitcherWidget.less
+++ b/modules/styles/flow/widgets/editor/mw.flow.ui.EditorSwitcherWidget.less
@@ -47,11 +47,6 @@
        -o-transition: border 0.2s cubic-bezier(0.39, 0.575, 0.565, 1), 
box-shadow 0.2s cubic-bezier(0.39, 0.575, 0.565, 1);
        transition: border 0.2s cubic-bezier(0.39, 0.575, 0.565, 1), box-shadow 
0.2s cubic-bezier(0.39, 0.575, 0.565, 1);
 
-       &-focused {
-               border-color: @colorProgressive;
-               box-shadow: inset 0 0 0 2px @colorProgressive;
-       }
-
        // Undo top margin on error box
        &-error.flow-errors {
                margin-top: 0;

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I8ef570e91ec5d4c80fd46158be6ab5976a788a05
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/Flow
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

Reply via email to