Bug 1453529 - Update box model diagram in dark theme with new darker colors. r=jdescottes draft
authorGabriel Luong <gabriel.luong@gmail.com>
Mon, 30 Apr 2018 01:48:18 -0400
changeset 789684 e41e3fecf94e19e480160b84f770aae4fb55e582
parent 789672 b3e2845ac301da9d9d015d4a268eb6abc9f434b0
push id108304
push userbmo:gl@mozilla.com
push dateMon, 30 Apr 2018 05:49:45 +0000
reviewersjdescottes
bugs1453529
milestone61.0a1
Bug 1453529 - Update box model diagram in dark theme with new darker colors. r=jdescottes MozReview-Commit-ID: LtoxUNKemSz
devtools/client/themes/boxmodel.css
--- a/devtools/client/themes/boxmodel.css
+++ b/devtools/client/themes/boxmodel.css
@@ -1,23 +1,33 @@
 /* This Source Code Form is subject to the terms of the Mozilla Public
  * License, v. 2.0. If a copy of the MPL was not distributed with this
  * file, You can obtain one at http://mozilla.org/MPL/2.0/ */
 
-/**
- * This is the stylesheet of the Box Model view implemented in the layout panel.
- */
+:root {
+  --marginbox-color: #FDFFDF;
+  --borderbox-color: var(--grey-50);
+  --paddingbox-color: #E3DCFF;
+  --contentbox-color: #CFF0FB;
+  --marginbox-border-color: #D8E60A;
+  --contentbox-border-color: #54A9FF;
+  --position-border-color: var(--grey-50);
+}
+
+:root.theme-dark {
+  --marginbox-color: #73764A;
+  --borderbox-color: var(--grey-70);
+  --paddingbox-color: #6657A6;
+  --contentbox-color: #407AA4;
+  --marginbox-border-color: #BDCA00;
+  --contentbox-border-color: #00B8FF;
+  --position-border-color: var(--grey-40);
+}
 
 .boxmodel-container {
-  --marginbox-color: #fdffdf;
-  --borderbox-color: var(--grey-50);
-  --paddingbox-color: #e3dcff;
-  --contentbox-color: #cff0fb;
-  --marginbox-border-color: #d8e60a;
-  --contentbox-border-color: #54A9FF;
   overflow: auto;
   padding-bottom: 4px;
   max-width: 600px;
   margin: 0 auto;
 }
 
 /* Header */
 
@@ -55,18 +65,24 @@
 
 .boxmodel-position,
 .boxmodel-margin,
 .boxmodel-padding {
   color: var(--grey-50);
 }
 
 .theme-dark .boxmodel-margin,
+.theme-dark .boxmodel-border,
+.theme-dark .boxmodel-padding,
 .theme-dark .boxmodel-size {
-  color: var(--grey-60);
+  color: var(--grey-10);
+}
+
+.theme-dark .boxmodel-position {
+  color: var(--grey-30);
 }
 
 /* Regions are 3 nested elements with wide borders and outlines */
 
 .boxmodel-contents {
   height: 18px;
   outline: dashed 1px var(--contentbox-border-color);
 }
@@ -236,24 +252,24 @@
   width: auto;
   height: 30px;
 }
 
 /* Box Model Positioning: contains top, right, bottom, left */
 
 .boxmodel-position.boxmodel-top,
 .boxmodel-position.boxmodel-bottom {
-  border-left: 1px solid var(--grey-50);
+  border-left: 1px solid var(--position-border-color);
   left: calc(50% - 2px);
   padding-left: 1px;
 }
 
 .boxmodel-position.boxmodel-right,
 .boxmodel-position.boxmodel-left {
-  border-top: 1px solid var(--grey-50);
+  border-top: 1px solid var(--position-border-color);
   line-height: 15px;
   top: calc(50% - 1px);
   width: 30px;
 }
 
 .boxmodel-position.boxmodel-top {
   top: -18px;
 }
@@ -299,16 +315,26 @@
   height: 15px;
   padding-top: 1px;
   padding-left: 4px;
   padding-right: 4px;
   border-radius: 3px;
   margin: 0px 0px;
 }
 
+.theme-dark .boxmodel-legend[data-box="margin"],
+.theme-dark .boxmodel-legend[data-box="border"],
+.theme-dark .boxmodel-legend[data-box="padding"] {
+  color: var(--grey-10);
+}
+
+.theme-dark .boxmodel-legend[data-box="position"] {
+  color: var(--grey-30);
+}
+
 /* Editable fields */
 
 .boxmodel-editable {
   position: relative;
   border: 1px dashed transparent;
   -moz-user-select: none;
   white-space: nowrap;
 }