diff --git a/resources/unpacked/devtools/front_end/ui/module.json b/resources/unpacked/devtools/front_end/ui/module.json index c8ef97359e..79f1c77c3b 100644 --- a/resources/unpacked/devtools/front_end/ui/module.json +++ b/resources/unpacked/devtools/front_end/ui/module.json @@ -76,6 +76,7 @@ "textButton.css", "textPrompt.css", "tooltip.css", - "treeoutline.css" + "treeoutline.css", + "treeoutline-dirac.css" ] } diff --git a/resources/unpacked/devtools/front_end/ui/treeoutline-dirac.css b/resources/unpacked/devtools/front_end/ui/treeoutline-dirac.css new file mode 100644 index 0000000000..f1d64eee35 --- /dev/null +++ b/resources/unpacked/devtools/front_end/ui/treeoutline-dirac.css @@ -0,0 +1,16 @@ +:host-context(.console-message) .tree-outline li { + min-height: 10px; /* min-height: 16px; was causing fat line in console if tree-outline was used */ +} + +/* do not apply padding to tree-outline when hosted in .console-message */ +:host-context(.console-message) { + padding: 0px; +} + +:host-context(.console-message) .object-properties-section-root-element::before { + -webkit-mask-position: -4px -96px !important; +} + +:host-context(.console-message) .object-properties-section-root-element.expanded::before { + -webkit-mask-position: -20px -96px !important; +} diff --git a/resources/unpacked/devtools/front_end/ui/treeoutline.js b/resources/unpacked/devtools/front_end/ui/treeoutline.js index 7755b1cdc7..5b613d8435 100644 --- a/resources/unpacked/devtools/front_end/ui/treeoutline.js +++ b/resources/unpacked/devtools/front_end/ui/treeoutline.js @@ -323,6 +323,7 @@ function TreeOutlineInShadow() // Redefine element to the external one. this.element = createElement("div"); this._shadowRoot = WebInspector.createShadowRootWithCoreStyles(this.element, "ui/treeoutline.css"); + WebInspector.appendStyle(this._shadowRoot, "ui/treeoutline-dirac.css"); this._disclosureElement = this._shadowRoot.createChild("div", "tree-outline-disclosure"); this._disclosureElement.appendChild(innerElement); this._renderSelection = true;