Bug 1465644 - Part 2. Introduce the emphasized splitter style. r?nchevobbe draft
authorMantaroh Yoshinaga <mantaroh@gmail.com>
Thu, 26 Jul 2018 13:50:15 +0900
changeset 822846 39416e2d0aa88e5f831c4c20a3ac111781cbd048
parent 822845 70dcf8cdeb9c4b8798b70931d815a914d1f2f3f6
push id117487
push userbmo:mantaroh@gmail.com
push dateThu, 26 Jul 2018 04:50:41 +0000
reviewersnchevobbe
bugs1465644
milestone63.0a1
Bug 1465644 - Part 2. Introduce the emphasized splitter style. r?nchevobbe This patch will introduce the emphasized splitter style to the horizontal splitter of devtools. (Only the SplitterBox and the splitter of the split console) MozReview-Commit-ID: FAFYp6PgJ8N
devtools/client/debugger/new/dist/debugger.css
devtools/client/shared/components/splitter/SplitBox.css
devtools/client/themes/splitters.css
devtools/client/themes/variables.css
--- a/devtools/client/debugger/new/dist/debugger.css
+++ b/devtools/client/debugger/new/dist/debugger.css
@@ -516,31 +516,29 @@ menuseparator {
   box-sizing: border-box;
 
   /* Positive z-index positions the splitter on top of its siblings and makes
      it clickable on both sides. */
   z-index: 1;
 }
 
 .split-box.vert > .splitter {
-  min-width: calc(var(--devtools-splitter-inline-start-width) +
-    var(--devtools-splitter-inline-end-width) + 1px);
+  min-width: var(--devtools-vertical-splitter-min-width);
 
   border-left-width: var(--devtools-splitter-inline-start-width);
   border-right-width: var(--devtools-splitter-inline-end-width);
 
   margin-left: calc(-1 * var(--devtools-splitter-inline-start-width) - 1px);
   margin-right: calc(-1 * var(--devtools-splitter-inline-end-width));
 
   cursor: ew-resize;
 }
 
 .split-box.horz > .splitter {
-  min-height: calc(var(--devtools-splitter-top-width) +
-    var(--devtools-splitter-bottom-width) + 1px);
+  min-height: var(--devtools-horizontal-splitter-min-height);
 
   border-top-width: var(--devtools-splitter-top-width);
   border-bottom-width: var(--devtools-splitter-bottom-width);
 
   margin-top: calc(-1 * var(--devtools-splitter-top-width) - 1px);
   margin-bottom: calc(-1 * var(--devtools-splitter-bottom-width));
 
   cursor: ns-resize;
--- a/devtools/client/shared/components/splitter/SplitBox.css
+++ b/devtools/client/shared/components/splitter/SplitBox.css
@@ -43,41 +43,47 @@
   box-sizing: border-box;
 
   /* Positive z-index positions the splitter on top of its siblings and makes
      it clickable on both sides. */
   z-index: 1;
 }
 
 .split-box.vert > .splitter {
-  min-width: calc(var(--devtools-splitter-inline-start-width) +
-    var(--devtools-splitter-inline-end-width) + 1px);
+  min-width: var(--devtools-vertical-splitter-min-width);
 
   border-inline-start-width: var(--devtools-splitter-inline-start-width);
   border-inline-end-width: var(--devtools-splitter-inline-end-width);
 
   margin-inline-start: calc(-1 * var(--devtools-splitter-inline-start-width) - 1px);
   margin-inline-end: calc(-1 * var(--devtools-splitter-inline-end-width));
 
   cursor: ew-resize;
 }
 
 .split-box.horz > .splitter {
-  min-height: calc(var(--devtools-splitter-top-width) +
-    var(--devtools-splitter-bottom-width) + 1px);
+  /* Emphasize the horizontal splitter width and color */
+  min-height: var(--devtools-emphasized-horizontal-splitter-min-height);
+
+  background-color: var(--theme-emphasized-splitter-color);
 
   border-top-width: var(--devtools-splitter-top-width);
   border-bottom-width: var(--devtools-splitter-bottom-width);
 
   margin-top: calc(-1 * var(--devtools-splitter-top-width) - 1px);
   margin-bottom: calc(-1 * var(--devtools-splitter-bottom-width));
 
   cursor: ns-resize;
 }
 
+/* Emphasized splitter has the hover style. */
+.split-box.horz > .splitter:hover {
+  background-color: var(--theme-emphasized-splitter-color-hover);
+}
+
 .split-box.disabled {
   pointer-events: none;
 }
 
 /**
  * Make sure splitter panels are not processing any mouse
  * events. This is good for performance during splitter
  * bar dragging.
--- a/devtools/client/themes/splitters.css
+++ b/devtools/client/themes/splitters.css
@@ -3,26 +3,40 @@
  * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
 
 /* This file is loaded by both browser.xul and toolbox.xul. Therefore, rules
    defined here can not rely on toolbox.xul variables. */
 
 /* Splitters */
 
 :root {
+  /* Draggable splitter element size */
+  --devtools-splitter-element-size: 1px;
+  --devtools-emphasized-splitter-element-size: 2px;
+
   /* Define the widths of the draggable areas on each side of a splitter. top
      and bottom widths are used for horizontal splitters, inline-start and
      inline-end for side splitters.*/
 
   --devtools-splitter-top-width: 2px;
   --devtools-splitter-bottom-width: 2px;
+  --devtools-horizontal-splitter-min-height: calc(var(--devtools-splitter-top-width) +
+                                                  var(--devtools-splitter-bottom-width) +
+                                                  var(--devtools-splitter-element-size));
+  --devtools-emphasized-horizontal-splitter-min-height: calc(var(--devtools-splitter-top-width) +
+                                                             var(--devtools-splitter-bottom-width) +
+                                                             var(--devtools-emphasized-splitter-element-size));
 
   /* Small draggable area on inline-start to avoid overlaps on scrollbars.*/
   --devtools-splitter-inline-start-width: 1px;
   --devtools-splitter-inline-end-width: 4px;
+
+  --devtools-vertical-splitter-min-width: calc(var(--devtools-splitter-inline-start-width) +
+                                               var(--devtools-splitter-inline-end-width) +
+                                               var(--devtools-splitter-element-size));
 }
 
 #appcontent[devtoolstheme="light"] {
   /* These variables are used in browser.xul but inside the toolbox they are overridden by --theme-splitter-color */
   --devtools-splitter-color: #dde1e4;
 }
 
 #appcontent[devtoolstheme="dark"] {
@@ -43,31 +57,41 @@ splitter.devtools-horizontal-splitter,
   box-sizing: border-box;
 
   /* Positive z-index positions the splitter on top of its siblings and makes
      it clickable on both sides. */
   z-index: 1;
 }
 
 splitter.devtools-horizontal-splitter {
-  min-height: calc(var(--devtools-splitter-top-width) +
-    var(--devtools-splitter-bottom-width) + 1px);
+  min-height: var(--devtools-horizontal-splitter-min-height);
 
   border-top-width: var(--devtools-splitter-top-width);
   border-bottom-width: var(--devtools-splitter-bottom-width);
 
   margin-top: calc(-1 * var(--devtools-splitter-top-width) - 1px);
   margin-bottom: calc(-1 * var(--devtools-splitter-bottom-width));
 
   cursor: ns-resize;
 }
 
+#toolbox-deck + splitter.devtools-horizontal-splitter {
+  min-height: var(--devtools-emphasized-horizontal-splitter-min-height);
+}
+
+/**
+ * Emphasized splitter has the hover style.
+ * This emphasized splitter affect splitter console only.
+ */
+#toolbox-deck + splitter.devtools-horizontal-splitter:hover {
+  background-color: var(--theme-emphasized-splitter-color-hover);
+}
+
 .devtools-side-splitter {
-  min-width: calc(var(--devtools-splitter-inline-start-width) +
-    var(--devtools-splitter-inline-end-width) + 1px);
+  min-width: var(--devtools-vertical-splitter-min-width);
 
   border-inline-start-width: var(--devtools-splitter-inline-start-width);
   border-inline-end-width: var(--devtools-splitter-inline-end-width);
 
   margin-inline-start: calc(-1 * var(--devtools-splitter-inline-start-width) - 1px);
   margin-inline-end: calc(-1 * var(--devtools-splitter-inline-end-width));
 
   cursor: ew-resize;
--- a/devtools/client/themes/variables.css
+++ b/devtools/client/themes/variables.css
@@ -36,16 +36,18 @@
   --theme-selection-background: var(--blue-55);
   --theme-selection-background-hover: #F0F9FE;
   --theme-selection-focus-background: var(--toolbarbutton-hover-background);
   --theme-selection-focus-color: var(--grey-70);
   --theme-selection-color: #ffffff;
 
   /* Border color that splits the toolbars/panels/headers. */
   --theme-splitter-color: #e0e0e1;
+  --theme-emphasized-splitter-color: var(--grey-30);
+  --theme-emphasized-splitter-color-hover: var(--grey-40);
 
   --theme-comment: var(--grey-50);
   --theme-comment-alt: #ccd1d5;
 
   --theme-body-color: var(--grey-60);
   --theme-body-color-alt: var(--grey-40);
   --theme-body-color-inactive: #999797;
   --theme-content-color1: #292e33;
@@ -144,16 +146,18 @@
   --theme-selection-background: #204E8A;
   --theme-selection-background-hover: #353B48;
   --theme-selection-focus-background: var(--grey-60);
   --theme-selection-focus-color: var(--grey-30);
   --theme-selection-color: #ffffff;
 
   /* Border color that splits the toolbars/panels/headers. */
   --theme-splitter-color: #3c3c3d;
+  --theme-emphasized-splitter-color: var(--gery-60);
+  --theme-emphasized-splitter-color-hover: var(--grey-50);
 
   --theme-comment: #939393;
   --theme-comment-alt: #939393;
 
   --theme-body-color: #909090;
   --theme-body-color-alt: var(--grey-50);
   --theme-body-color-inactive: var(--grey-40);
   --theme-content-color1: var(--grey-30);