Bug 1413478 - Fix styling of snapshot delete button in memory tool;r=gregtatum draft
authorJulian Descottes <jdescottes@mozilla.com>
Wed, 01 Nov 2017 10:31:08 +0100
changeset 690024 dec3dbb87a79296e71146fdea839b76cf2c883ce
parent 689820 ee21e5f7f1c1726e0ed2697eb45df54cdceedd36
child 738451 3f15750c9a981342305f8006a6aadf1373f485ec
push id87170
push userjdescottes@mozilla.com
push dateWed, 01 Nov 2017 09:34:38 +0000
reviewersgregtatum
bugs1413478
milestone58.0a1
Bug 1413478 - Fix styling of snapshot delete button in memory tool;r=gregtatum MozReview-Commit-ID: FbAWplGGR1
devtools/client/memory/components/SnapshotListItem.js
devtools/client/themes/memory.css
--- a/devtools/client/memory/components/SnapshotListItem.js
+++ b/devtools/client/memory/components/SnapshotListItem.js
@@ -84,19 +84,20 @@ module.exports = createClass({
       details = dom.span({ className: "snapshot-state" }, statusText);
     }
 
     let saveLink = !snapshot.path ? void 0 : dom.a({
       onClick: () => onSave(snapshot),
       className: "save",
     }, L10N.getStr("snapshot.io.save"));
 
-    let deleteButton = !snapshot.path ? void 0 : dom.button({
+    let deleteButton = !snapshot.path ? void 0 : dom.div({
       onClick: () => onDelete(snapshot),
-      className: "devtools-button delete",
+      className: "delete",
+      "aria-role": "button",
       title: L10N.getStr("snapshot.io.delete")
     });
 
     return (
       dom.li({ className, onClick },
         dom.span({
           className: `snapshot-title ${wantThrobber ? " devtools-throbber" : ""}`
         },
--- a/devtools/client/themes/memory.css
+++ b/devtools/client/themes/memory.css
@@ -209,23 +209,25 @@ html, body, #app, #memory-tool {
 
 .snapshot-list-item .delete {
   cursor: pointer;
   position: relative;
   min-height: 1em;
   min-width: 1.3em;
 }
 
-.snapshot-list-item.selected .delete::before {
-  filter: invert(1);
-}
-
 .snapshot-list-item .delete::before {
+  display: block;
+  width: 16px;
+  height: 16px;
+  content: "";
   background-image: url("chrome://devtools/skin/images/close.svg");
-  background-position: 0.2em 0;
+  background-repeat: no-repeat;
+  -moz-context-properties: fill;
+  fill: currentColor;
 }
 
 .snapshot-list-item > .snapshot-title {
   margin-bottom: 14px;
 }
 
 .snapshot-list-item > .snapshot-title > input[type=checkbox] {
   margin: 0;