mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-11-01 14:45:29 +00:00
ae7bd89cb6
Devtools autocomplete popups are hosted in a different document from the input being autocompleted. To allow accessibility tools such as screen readers to still make sense of this widget, a clone of the suggestion list is now inserted in the same document as the input, and the aria-activedescendant attribute is updated on the input accordingly. MozReview-Commit-ID: 8rFjF6nvEyU --HG-- extra : rebase_source : 04a4574aee30206c3ac5dbeadcebaea89f0888c3
234 lines
5.9 KiB
CSS
234 lines
5.9 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/. */
|
|
|
|
@import url("splitters.css");
|
|
|
|
:root {
|
|
font: message-box;
|
|
}
|
|
|
|
:root[platform="mac"] {
|
|
--monospace-font-family: Menlo, monospace;
|
|
}
|
|
|
|
:root[platform="win"] {
|
|
--monospace-font-family: Consolas, monospace;
|
|
}
|
|
|
|
:root[platform="linux"],
|
|
:root.theme-firebug {
|
|
--monospace-font-family: monospace;
|
|
}
|
|
|
|
:root.theme-firebug {
|
|
--proportional-font-family: Lucida Grande, Tahoma, sans-serif;
|
|
}
|
|
|
|
.devtools-monospace {
|
|
font-family: var(--monospace-font-family);
|
|
}
|
|
|
|
:root[platform="linux"] .devtools-monospace {
|
|
font-size: 80%;
|
|
}
|
|
|
|
|
|
/* Autocomplete Popup */
|
|
|
|
.devtools-autocomplete-popup {
|
|
-moz-appearance: none !important;
|
|
box-shadow: 0 1px 0 hsla(209,29%,72%,.25) inset;
|
|
background-color: transparent;
|
|
border-radius: 3px;
|
|
overflow-x: hidden;
|
|
max-height: 20rem;
|
|
}
|
|
|
|
/* Reset list styles. */
|
|
.devtools-autocomplete-popup ul {
|
|
list-style: none;
|
|
}
|
|
|
|
.devtools-autocomplete-popup ul,
|
|
.devtools-autocomplete-popup li {
|
|
margin: 0;
|
|
}
|
|
|
|
:root[platform="linux"] .devtools-autocomplete-popup {
|
|
/* Root font size is bigger on Linux, adjust rem-based values. */
|
|
max-height: 16rem;
|
|
}
|
|
|
|
.devtools-autocomplete-listbox {
|
|
-moz-appearance: none !important;
|
|
background-color: transparent;
|
|
border-width: 0px !important;
|
|
margin: 0;
|
|
padding: 2px;
|
|
}
|
|
|
|
.devtools-autocomplete-listbox .autocomplete-item {
|
|
width: 100%;
|
|
background-color: transparent;
|
|
border-radius: 4px;
|
|
padding: 1px 0;
|
|
/* Force text-align even in RTL locales to ensure a correct display of the popup */
|
|
text-align: left;
|
|
}
|
|
|
|
.devtools-autocomplete-listbox .autocomplete-selected {
|
|
background-color: rgba(0,0,0,0.2);
|
|
}
|
|
|
|
.devtools-autocomplete-listbox.dark-theme .autocomplete-selected,
|
|
.devtools-autocomplete-listbox.dark-theme .autocomplete-item:hover {
|
|
background-color: rgba(0,0,0,0.5);
|
|
}
|
|
|
|
.devtools-autocomplete-listbox.dark-theme .autocomplete-selected > .autocomplete-value,
|
|
.devtools-autocomplete-listbox:focus.dark-theme .autocomplete-selected > .initial-value {
|
|
color: hsl(208,100%,60%);
|
|
}
|
|
|
|
.devtools-autocomplete-listbox.dark-theme .autocomplete-selected > span {
|
|
color: #eee;
|
|
}
|
|
|
|
.devtools-autocomplete-listbox.dark-theme .autocomplete-item > span {
|
|
color: #ccc;
|
|
}
|
|
|
|
.devtools-autocomplete-listbox .autocomplete-item > .initial-value,
|
|
.devtools-autocomplete-listbox .autocomplete-item > .autocomplete-value {
|
|
margin: 0;
|
|
padding: 0;
|
|
cursor: default;
|
|
}
|
|
|
|
.devtools-autocomplete-listbox .autocomplete-item > .autocomplete-count {
|
|
text-align: end;
|
|
}
|
|
|
|
/* Rest of the dark and light theme */
|
|
|
|
.devtools-autocomplete-popup,
|
|
.theme-dark .CodeMirror-hints,
|
|
.theme-dark .CodeMirror-Tern-tooltip {
|
|
border: 1px solid hsl(210,11%,10%);
|
|
background-image: linear-gradient(to bottom, hsla(209,18%,18%,0.9), hsl(210,11%,16%));
|
|
}
|
|
|
|
.devtools-autocomplete-popup.light-theme,
|
|
.light-theme .CodeMirror-hints,
|
|
.light-theme .CodeMirror-Tern-tooltip {
|
|
border: 1px solid hsl(210,24%,90%);
|
|
background-image: linear-gradient(to bottom, hsla(209,18%,100%,0.9), hsl(210,24%,95%));
|
|
}
|
|
|
|
.devtools-autocomplete-popup.light-theme {
|
|
box-shadow: 0 1px 0 hsla(209,29%,90%,.25) inset;
|
|
}
|
|
|
|
.theme-firebug .devtools-autocomplete-popup {
|
|
border-color: var(--theme-splitter-color);
|
|
border-radius: 5px;
|
|
font-size: var(--theme-autompletion-font-size);
|
|
}
|
|
|
|
.devtools-autocomplete-popup.firebug-theme {
|
|
background: var(--theme-body-background);
|
|
}
|
|
|
|
.devtools-autocomplete-listbox.firebug-theme .autocomplete-selected,
|
|
.devtools-autocomplete-listbox.firebug-theme .autocomplete-item:hover,
|
|
.devtools-autocomplete-listbox.light-theme .autocomplete-selected,
|
|
.devtools-autocomplete-listbox.light-theme .autocomplete-item:hover {
|
|
background-color: rgba(128,128,128,0.3);
|
|
}
|
|
|
|
.devtools-autocomplete-listbox.firebug-theme .autocomplete-selected > .autocomplete-value,
|
|
.devtools-autocomplete-listbox:focus.firebug-theme .autocomplete-selected > .initial-value,
|
|
.devtools-autocomplete-listbox.light-theme .autocomplete-selected > .autocomplete-value,
|
|
.devtools-autocomplete-listbox:focus.light-theme .autocomplete-selected > .initial-value {
|
|
color: #222;
|
|
}
|
|
|
|
.devtools-autocomplete-listbox.firebug-theme .autocomplete-item > span,
|
|
.devtools-autocomplete-listbox.light-theme .autocomplete-item > span {
|
|
color: #666;
|
|
}
|
|
|
|
/* Autocomplete list clone used for accessibility. */
|
|
|
|
.devtools-autocomplete-list-aria-clone {
|
|
/* Cannot use display:none or visibility:hidden : screen readers ignore the element. */
|
|
position: fixed;
|
|
overflow: hidden;
|
|
margin: 0;
|
|
width: 0;
|
|
height: 0;
|
|
}
|
|
|
|
.devtools-autocomplete-list-aria-clone li {
|
|
/* Prevent screen readers from prefacing every item with 'bullet'. */
|
|
list-style-type: none;
|
|
}
|
|
|
|
/* links to source code, like displaying `myfile.js:45` */
|
|
|
|
.devtools-source-link {
|
|
font-family: var(--monospace-font-family);
|
|
color: var(--theme-highlight-blue);
|
|
cursor: pointer;
|
|
white-space: nowrap;
|
|
display: flex;
|
|
text-decoration: none;
|
|
font-size: 11px;
|
|
width: 12em; /* probably should be changed for each tool */
|
|
}
|
|
|
|
.devtools-source-link:hover {
|
|
text-decoration: underline;
|
|
}
|
|
|
|
.devtools-source-link > .filename {
|
|
text-overflow: ellipsis;
|
|
text-align: end;
|
|
overflow: hidden;
|
|
margin: 2px 0px;
|
|
cursor: pointer;
|
|
}
|
|
|
|
.devtools-source-link > .line-number {
|
|
flex: none;
|
|
margin: 2px 0px;
|
|
cursor: pointer;
|
|
}
|
|
|
|
/* Keyboard focus highlight styles */
|
|
|
|
:-moz-focusring {
|
|
outline: var(--theme-focus-outline);
|
|
outline-offset: -1px;
|
|
}
|
|
|
|
textbox[focused="true"] {
|
|
border-color: var(--theme-focus-border-color-textbox);
|
|
box-shadow: var(--theme-focus-box-shadow-textbox);
|
|
transition: all 0.2s ease-in-out
|
|
}
|
|
|
|
textbox :-moz-focusring {
|
|
box-shadow: none;
|
|
outline: none;
|
|
}
|
|
|
|
/* Form fields should already have box-shadow hightlight */
|
|
select:-moz-focusring,
|
|
input[type="radio"]:-moz-focusring,
|
|
input[type="checkbox"]:-moz-focusring,
|
|
checkbox:-moz-focusring {
|
|
outline: none;
|
|
}
|