From 26a029d407be480d791972afb5975cf62c9360a6 Mon Sep 17 00:00:00 2001 From: Daniel Baumann Date: Fri, 19 Apr 2024 02:47:55 +0200 Subject: Adding upstream version 124.0.1. Signed-off-by: Daniel Baumann --- toolkit/themes/windows/global/richlistbox.css | 121 ++++++++++++++++++++++++++ 1 file changed, 121 insertions(+) create mode 100644 toolkit/themes/windows/global/richlistbox.css (limited to 'toolkit/themes/windows/global/richlistbox.css') diff --git a/toolkit/themes/windows/global/richlistbox.css b/toolkit/themes/windows/global/richlistbox.css new file mode 100644 index 0000000000..316f00e9c3 --- /dev/null +++ b/toolkit/themes/windows/global/richlistbox.css @@ -0,0 +1,121 @@ +/* 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/. */ + +@namespace url("http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul"); + +richlistbox { + margin: 2px 4px; + background-color: Field; + color: FieldText; + border: 1px solid ThreeDShadow; +} + +richlistbox[disabled="true"] { + color: GrayText; +} + +richlistitem[selected="true"] { + background-color: -moz-cellhighlight; + color: -moz-cellhighlighttext; +} + +richlistbox:where(:focus) > richlistitem[selected="true"] { + background-color: SelectedItem; + color: SelectedItemText; +} + +richlistbox[seltype="multiple"]:focus > richlistitem[current="true"], +richlistbox.theme-listbox:focus > richlistitem[current="true"] { + outline: var(--default-focusring); + outline-color: SelectedItem; + outline-offset: calc(-1 * var(--default-focusring-width)); +} + +richlistbox[seltype="multiple"]:focus > richlistitem[current="true"][selected="true"], +richlistbox.theme-listbox:focus > richlistitem[current="true"][selected="true"] { + outline-color: #F3D982; /* TODO: find a suitable system color */ +} + +richlistbox.theme-listbox > richlistitem { + border: 1px solid transparent; +} + +richlistbox.theme-listbox > richlistitem[selected="true"] { + background-color: -moz-cellhighlight; + color: -moz-cellhighlighttext; +} + +richlistbox.theme-listbox:focus > richlistitem[selected="true"] { + background-color: SelectedItem; + color: SelectedItemText; +} + +richlistbox.theme-listbox > richlistitem > label { + margin: 0; + padding-block: 0 1px; + padding-inline: 4px 0; + white-space: nowrap; +} + +@media not (prefers-contrast) { + richlistbox.theme-listbox > richlistitem { + --listitem-selectedTextColor: rgb(0,0,0); + --listitem-selectedColor: rgb(217,217,217); + --listitem-selectedBorder: var(--listitem-selectedColor); + --listitem-selectedBottomBorder: rgb(204,204,204); + --listitem-selectedBackground: var(--listitem-selectedColor); + --listitem-selectedImage: none; + --listitem-selectedCurrentBorder: rgb(123,195,255); + --listitem-selectedFocusColor: rgb(205,232,255); + --listitem-selectedFocusBorder: var(--listitem-selectedFocusColor); + --listitem-selectedFocusBottomBorder: rgb(165,214,255); + --listitem-selectedFocusBackground: var(--listitem-selectedFocusColor); + --listitem-selectedFocusImage: none; + --listitem-selectedFocusCurrentBorder: var(--listitem-selectedFocusColor); + --listitem-selectedFocusCurrentBottomBorder: var(--listitem-selectedFocusBottomBorder); + --listitem-selectedFocusCurrentBackground: var(--listitem-selectedFocusColor); + + color: FieldText; + margin-inline: 1px; + padding-block: 1px; + border-width: 1px; + background-repeat: no-repeat; + background-size: 100% 100%; + } + + richlistbox.theme-listbox > richlistitem[selected="true"] { + border-top-color: var(--listitem-selectedBorder); + border-inline-color: var(--listitem-selectedBorder); + border-bottom-color: var(--listitem-selectedBottomBorder); + background-image: var(--listitem-selectedImage); + background-color: var(--listitem-selectedBackground); + color: var(--listitem-selectedTextColor); + } + + richlistbox.theme-listbox:focus > richlistitem[selected="true"] { + border-top-color: var(--listitem-selectedFocusBorder); + border-inline-color: var(--listitem-selectedFocusBorder); + border-bottom-color: var(--listitem-selectedFocusBottomBorder); + background-image: var(--listitem-selectedFocusImage); + background-color: var(--listitem-selectedFocusBackground); + color: var(--listitem-selectedTextColor); + } + + richlistbox.theme-listbox:focus > richlistitem[current="true"] { + border-color: var(--listitem-selectedCurrentBorder); + outline: none; + } + + richlistbox.theme-listbox:focus > richlistitem[selected="true"][current="true"] { + border-top-color: var(--listitem-selectedFocusCurrentBorder); + border-inline-color: var(--listitem-selectedFocusCurrentBorder); + border-bottom-color: var(--listitem-selectedFocusCurrentBottomBorder); + background-color: var(--listitem-selectedFocusCurrentBackground); + outline: none; + } +} + +listheader { + color: -moz-DialogText; +} -- cgit v1.2.3