blob: 4c8914ace4fc0f00afc3b735fd3a39cc4808bad0 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
|
/* 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;
&:focus {
background-color: Highlight;
color: HighlightText;
outline: 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;
&:focus-visible {
outline: 0.15em solid SelectedItem;
}
&:focus-visible,
&:hover {
opacity: 1;
}
@media (prefers-contrast) {
opacity: 1;
background-color: ButtonFace;
color: ButtonText;
> .datetime-calendar-button-svg {
background-color: ButtonFace;
-moz-context-properties: fill;
fill: ButtonText;
}
&:focus-visible,
&:hover {
background-color: SelectedItem;
> .datetime-calendar-button-svg {
background-color: SelectedItem;
-moz-context-properties: fill;
fill: SelectedItemText;
}
}
}
}
.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;
}
:host(:is(:disabled, :read-only, [type="time"])) .datetime-calendar-button {
display: none;
}
:host(:is(:disabled, :read-only)) .datetime-edit-field {
user-select: none;
pointer-events: none;
-moz-user-focus: none;
}
|