Bug 1222737 - Added extra line break when expanding properties in the panel and selecting all; r?pbro
Changed spans to divs to add the extra line break in the selection.
And add display:inline to them to keep the layout intact
MozReview-Commit-ID: IAUJGx2zC25
--- a/devtools/client/inspector/computed/computed.js
+++ b/devtools/client/inspector/computed/computed.js
@@ -1142,23 +1142,28 @@ PropertyView.prototype = {
window: this.tree.styleWindow,
target: link
});
shortcuts.on("Return", () => selector.openStyleEditor());
let status = createChild(p, "span", {
dir: "ltr",
class: "rule-text theme-fg-color3 " + selector.statusClass,
- title: selector.statusText,
+ title: selector.statusText
+ });
+
+ let keyDiv = createChild(status, "div", {
+ class: "inline",
textContent: selector.sourceText
});
- let valueSpan = createChild(status, "span", {
- class: "other-property-value theme-fg-color1"
+
+ let valueDiv = createChild(status, "div", {
+ class: "inline other-property-value theme-fg-color1"
});
- valueSpan.appendChild(selector.outputFragment);
+ valueDiv.appendChild(selector.outputFragment);
promises.push(selector.ready);
}
this.matchedSelectorsContainer.innerHTML = "";
this.matchedSelectorsContainer.appendChild(frag);
return promise.all(promises);
},
--- a/devtools/client/themes/computed.css
+++ b/devtools/client/themes/computed.css
@@ -128,16 +128,20 @@
.theme-firebug .property-content {
font-family: var(--proportional-font-family);
}
.theme-firebug .property-view {
border-bottom: 1px solid rgba(0, 0, 0, 0.1);
}
+.inline {
+ display: inline;
+}
+
.visually-hidden {
opacity: 0;
}
/* From skin */
.expander {
visibility: hidden;
}