Files
firefox/devtools/client/shared/components/Tree.css
T
Alexandre Poirot 27ee6fdd0f Bug 1906125 - [devtools] Unify VirtualizedTree and Tree CSS and move SourcesTree specifics to Tree. r=devtools-reviewers,nchevobbe
- make them both use .theme-twisty to show an arrow icon.
- move some specifics stylings of SourcesTree to the base class.
- make SourcesTree use the arrow React component provided by Tree class.
- use .theme-twisty instead of .arrow (which already implements rotation and colors on expand). But it uses "open" instead of "expanded" classname.
  (VirtualizedTree was already using theme-twisty)

This impacts the Source Tree, ObjectInspector (console, debugger), Watch Expressions, memory panel (dominator view).

Differential Revision: https://phabricator.services.mozilla.com/D215637
2024-07-10 21:25:46 +00:00

90 lines
2.1 KiB
CSS

/* 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/. */
/* We can remove the outline since we do add our own focus style on nodes */
.tree:focus {
outline: none;
}
.tree.inline {
display: inline-block;
}
.tree.nowrap {
white-space: nowrap;
}
.tree.noselect {
user-select: none;
}
.tree .tree-node {
display: flex;
}
.tree-indent {
display: inline-block;
width: 12px;
margin-inline-start: 3px;
border-inline-start: 1px solid #a2d1ff;
flex-shrink: 0;
height: 0;
}
.tree-node[data-expandable="false"] .tree-last-indent {
/* The 13px value is taken from the total width and margins of the arrow
element of expandables nodes (10px width + 3px margins). That way the
node's text are indented the same for both expandable and non-expandable
nodes */
margin-inline-end: 13px;
}
.tree .tree-node[data-expandable="true"] {
cursor: default;
}
/* add a grey background when hovering any line of the tree */
.tree .tree-node:not(.focused):hover {
background-color: var(--theme-toolbar-background-hover);
}
/* In the webconsole object inspector, it is styled as a button */
.tree .theme-twisty {
background-color: transparent;
border: none;
font-family: inherit;
font-size: inherit;
}
/* avoid distinct background when hovering the arrow*/
.tree .theme-twisty:hover {
background-color: var(--theme-toolbar-background-hover);
}
.tree .tree-node.focused {
color: var(--theme-selection-color);
background-color: var(--theme-selection-background);
/* Make folder/file icons white on dark focused background */
.img {
background-color: white;
fill: white;
}
/* also toggle the color of the expand arrows */
.theme-twisty {
fill: white;
/* avoid distinct background when hovering the arrow */
&:hover {
background-color: var(--theme-selection-background);
}
}
/* Invert text selection color in selected rows */
::selection {
color: var(--theme-selection-background);
background-color: var(--theme-selection-color);
}
}