1 /* This Source Code Form is subject to the terms of the Mozilla Public
2 * License, v. 2.0. If a copy of the MPL was not distributed with this
3 * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
5 /* ===== tree.css ===================================================
6 == Styles used by the XUL tree element.
7 ======================================================================= */
9 @namespace url
("http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul");
10 @namespace html url
("http://www.w3.org/1999/xhtml");
12 /* ::::: tree ::::: */
16 background-color: Field
;
19 -moz-default-appearance: listbox
;
20 @media
(-moz-platform: linux
) {
22 border: 1px solid ThreeDShadow
;
26 /* ::::: tree rows ::::: */
28 treechildren::-moz-tree-row
{
29 border: 1px solid transparent
;
32 treechildren::-moz-tree-row
,
33 treecol:not
([hideheader
="true"]),
34 .tree-columnpicker-button {
35 min-height: max
(24px, 1.3em);
38 treechildren::-moz-tree-row
(multicol
, odd
) {
39 background-color: -moz-oddtreerow
;
42 @media not
(prefers-contrast
) {
43 treechildren::-moz-tree-row
(hover
) {
44 background-color: hsla
(0,0%,50%,.15);
48 treechildren::-moz-tree-row
(selected
) {
49 background-color: -moz-cellhighlight
;
52 treechildren::-moz-tree-row
(selected
, focus
) {
53 background-color: SelectedItem
;
56 treechildren::-moz-tree-row
(current
, focus
) {
57 outline: var
(--default-focusring
);
58 outline-color: SelectedItem
;
59 outline-offset: calc
(-1 * var
(--default-focusring-width
));
62 treechildren::-moz-tree-row
(selected
, current
, focus
) {
63 outline-color: #F3D982;
66 /* ::::: tree cells ::::: */
68 treechildren::-moz-tree-cell
{
72 treechildren::-moz-tree-cell-text
{
76 treechildren::-moz-tree-image
(selected
),
77 treechildren::-moz-tree-twisty
(selected
),
78 treechildren::-moz-tree-cell-text
(selected
) {
79 color: -moz-cellhighlighttext
;
82 treechildren::-moz-tree-image
(selected
, focus
),
83 treechildren::-moz-tree-twisty
(selected
, focus
),
84 treechildren::-moz-tree-cell-text
(selected
, focus
) {
85 color: SelectedItemText
;
89 /* ::::: lines connecting cells ::::: */
91 treechildren::-moz-tree-line
{
92 border: 1px dotted ThreeDShadow
;
95 treechildren::-moz-tree-line
(selected
, focus
) {
96 border: 1px dotted SelectedItemText
;
100 /* ::::: tree separator ::::: */
102 treechildren::-moz-tree-separator
{
103 border-top: 1px solid ThreeDShadow
;
104 border-bottom: 1px solid ThreeDHighlight
;
108 /* ::::: drop feedback ::::: */
110 treechildren::-moz-tree-cell-text
(primary
, dropOn
) {
111 background-color: SelectedItem
;
112 color: SelectedItemText
;
115 treechildren::-moz-tree-drop-feedback
{
116 background-color: SelectedItem
;
119 margin-inline-start: 5px;
122 /* ::::: tree columns ::::: */
125 .tree-columnpicker-button {
127 -moz-default-appearance: treeheadercell
;
128 background-color: -moz-ColHeader
;
129 color: -moz-ColHeaderText
;
131 justify-content: center
;
134 border-inline-start: 1px solid ThreeDLightShadow
;
136 @media
(-moz-platform: linux
) or
((-moz-platform: windows
) and
(prefers-color-scheme: dark
)) {
138 box-shadow: inset
0 -1px ThreeDLightShadow
;
142 background-color: -moz-ColHeaderHover
;
143 color: -moz-ColHeaderHoverText
;
145 &:where
(:hover:active
) {
146 background-color: -moz-ColHeaderActive
;
147 color: -moz-ColHeaderActiveText
;
152 margin: 0 !important
;
155 treecol:where
([ordinal
="1"]) {
156 border-inline-start: none
;
159 treecol
[hideheader
="true"] {
163 /* ::::: column drag and drop styles ::::: */
165 treecol
[dragging
="true"] {
169 treechildren::-moz-tree-column
(insertbefore
) {
170 border-inline-start: 1px solid ThreeDShadow
;
173 treechildren::-moz-tree-column
(insertafter
) {
174 border-inline-end: 1px solid ThreeDShadow
;
177 /* ::::: column picker ::::: */
179 .tree-columnpicker-button {
180 list-style-image: url
("chrome://global/skin/icons/columnpicker.svg");
181 -moz-context-properties: fill
;
187 .tree-columnpicker-button .button-text {
191 /* ::::: tree icons ::::: */
193 treechildren::-moz-tree-image
{
194 -moz-context-properties: fill
;
198 /* ::::: twisty ::::: */
200 treechildren::-moz-tree-twisty
{
203 width: 12px; /* The image's width is 12 pixels */
204 list-style-image: url
("chrome://global/skin/icons/arrow-right-12.svg");
205 -moz-context-properties: fill
;
209 treechildren:-moz-locale-dir
(rtl
)::-moz-tree-twisty
(closed
) {
210 list-style-image: url
("chrome://global/skin/icons/arrow-left-12.svg");
213 treechildren::-moz-tree-twisty
(open
) {
214 list-style-image: url
("chrome://global/skin/icons/arrow-down-12.svg");
217 treechildren::-moz-tree-indentation
{
221 /* ::::: editable tree ::::: */
223 treechildren::-moz-tree-row
(selected
, editing
) {
224 background-color: transparent
;
228 treechildren::-moz-tree-cell-text
(selected
, editing
),
229 treechildren::-moz-tree-image
(selected
, editing
) {
233 html|input
.tree-input
{
241 outline: var
(--focus-outline
);
242 margin-block: -1px 0;
243 margin-inline: -2px 0;
253 @media not
(-moz-platform: macos
) {
254 /* ::::: sort direction indicator ::::: */
255 .treecol-sortdirection {
256 list-style-image: url
("chrome://global/skin/tree/sort-asc.svg");
257 -moz-context-properties: fill
;
261 treecol
[sortDirection
="ascending"]:not
([hideheader
="true"]) > & {
265 treecol
[sortDirection
="descending"]:not
([hideheader
="true"]) > & {
267 list-style-image: url
("chrome://global/skin/tree/sort-dsc.svg");
272 @media (-moz-platform: macos
) and
(not
(prefers-contrast
)) {
273 /* We show a `SelectedItem` background on selected rows, so we do not need the
274 dotted outline in that case. For users who have Full Keyboard Access
275 enabled, macOS draws a blue highlight above the row highlight, so keyboard-
276 only users can still discern the currently-selected row when multiple rows
278 treechildren::-moz-tree-row
(selected
, current
, focus
) {