Files
tubestation/toolkit/content/widgets/datetimebox.css
Emilio Cobos Álvarez 67aa45faaf Bug 1804557 - Don't specify outline on hover of the datetime calendar button. r=ayeddi
Do it only when focused, as usual. I don't think we have any other
outline on hover and it instantly threw me off as a bug... But let me
know if it's intentional.

Differential Revision: https://phabricator.services.mozilla.com/D164157
2022-12-08 13:54:56 +00:00

105 lines
2.3 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/. */
.datetimebox {
display: flex;
line-height: normal;
/* TODO: Enable selection once bug 1455893 is fixed */
user-select: none;
}
.datetime-input-box-wrapper {
display: inline-flex;
flex: 1;
background-color: inherit;
min-width: 0;
justify-content: space-between;
align-items: center;
}
.datetime-input-edit-wrapper {
overflow: hidden;
white-space: nowrap;
flex-grow: 1;
}
.datetime-edit-field {
display: inline;
text-align: center;
padding: 1px 3px;
border: 0;
margin: 0;
ime-mode: disabled;
outline: none;
}
.datetime-edit-field:not([disabled="true"]):focus {
background-color: Highlight;
color: HighlightText;
outline: none;
}
.datetime-edit-field[disabled="true"],
.datetime-edit-field[readonly="true"] {
user-select: none;
}
.datetime-calendar-button {
-moz-context-properties: fill;
color: inherit;
font-size: inherit;
fill: currentColor;
opacity: .65;
background-color: transparent;
border: none;
border-radius: 0.2em;
flex: none;
margin-block: 0;
margin-inline: 0.075em 0.15em;
padding: 0 0.15em;
line-height: 1;
}
.datetime-calendar-button:focus-visible {
outline: 0.15em solid SelectedItem;
}
.datetime-calendar-button:is(:focus-visible, :hover) {
opacity: 1;
}
.datetime-calendar-button-svg {
pointer-events: none;
/* When using a very small font-size, we don't want the button to take extra
* space (which will affect the baseline of the form control) */
max-width: 1em;
max-height: 1em;
}
@media (prefers-contrast) {
.datetime-calendar-button {
opacity: 1;
background-color: ButtonFace;
color: ButtonText;
}
.datetime-calendar-button:focus-visible,
.datetime-calendar-button:hover {
background-color: SelectedItem;
}
.datetime-calendar-button:focus-visible > .datetime-calendar-button-svg,
.datetime-calendar-button:hover > .datetime-calendar-button-svg {
background-color: SelectedItem;
-moz-context-properties: fill;
fill: SelectedItemText;
}
.datetime-calendar-button-svg {
background-color: ButtonFace;
-moz-context-properties: fill;
fill: ButtonText;
}
}