forked from carbon-design-system/carbon
-
Notifications
You must be signed in to change notification settings - Fork 0
/
_time-picker.scss
107 lines (90 loc) · 2.47 KB
/
_time-picker.scss
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
//
// Copyright IBM Corp. 2016, 2018
//
// This source code is licensed under the Apache-2.0 license found in the
// LICENSE file in the root directory of this source tree.
//
@use '../../config' as *;
@use '../../motion' as *;
@use '../../spacing' as *;
@use '../../theme' as *;
@use '../../type' as *;
@use '../../utilities/convert' as *;
@use '../../utilities/focus-outline' as *;
@use '../../utilities/placeholder-colors' as *;
/// Time picker styles
/// @access public
/// @group time-picker
@mixin time-picker {
.#{$prefix}--time-picker {
display: flex;
align-items: flex-end;
}
.#{$prefix}--time-picker__select {
justify-content: center;
&:not(:last-of-type) {
margin: 0 $spacing-01;
}
}
.#{$prefix}--time-picker__input {
display: flex;
flex-direction: column;
}
.#{$prefix}--time-picker .#{$prefix}--select-input {
width: auto;
min-width: auto;
padding-right: rem(48px);
margin: 0;
line-height: 1;
}
.#{$prefix}--time-picker__input-field {
@include focus-outline('reset');
@include type-style('code-02');
display: flex;
width: 4.875rem;
height: rem(40px);
align-items: center;
transition: outline $duration-fast-01 motion(standard, productive),
background-color $duration-fast-01 motion(standard, productive);
&::placeholder {
@include placeholder-colors;
}
}
// V11: Possibly deprecate
.#{$prefix}--time-picker--light .#{$prefix}--select-input {
background-color: $field-02;
&:hover {
background-color: $field-hover;
}
&:disabled,
&:hover:disabled {
border-bottom: 1px solid transparent;
background-color: transparent;
color: $text-disabled;
cursor: not-allowed;
}
}
.#{$prefix}--time-picker--sm .#{$prefix}--select-input,
.#{$prefix}--time-picker--sm .#{$prefix}--time-picker__input-field {
height: rem(32px);
max-height: rem(32px);
}
.#{$prefix}--time-picker--lg .#{$prefix}--select-input,
.#{$prefix}--time-picker--lg .#{$prefix}--time-picker__input-field {
height: rem(48px);
max-height: rem(48px);
}
// readonly
.#{$prefix}--time-picker--readonly .#{$prefix}--time-picker__input-field {
background-color: transparent;
}
.#{$prefix}--time-picker--readonly .#{$prefix}--select-input {
background-color: transparent;
cursor: default;
}
.#{$prefix}--time-picker--readonly
.#{$prefix}--select-input
+ .#{$prefix}--select__arrow {
fill: $icon-disabled;
}
}