-
Notifications
You must be signed in to change notification settings - Fork 13.5k
/
Copy pathselect.md.solid.scss
97 lines (84 loc) · 2.57 KB
/
select.md.solid.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
@import "./select.vars";
// Select Fill: Solid
// ----------------------------------------------------------------
:host(.select-fill-solid) {
--background: #{$background-color-step-50};
--border-color: #{$background-color-step-500};
--border-radius: 4px;
--padding-start: 16px;
--padding-end: 16px;
min-height: 56px;
}
/**
* The solid fill style has a border
* at the bottom of the select wrapper.
* As a result, the border on the "bottom
* content" is not needed.
*/
:host(.select-fill-solid) .select-wrapper {
border-bottom: var(--border-width) var(--border-style) var(--border-color);
}
/**
* If the select has a validity state, the
* border should reflect that as a color.
*/
:host(.select-expanded.select-fill-solid.ion-valid),
:host(.has-focus.select-fill-solid.ion-valid),
:host(.select-fill-solid.ion-touched.ion-invalid) {
--border-color: var(--highlight-color);
}
/**
* The bottom content should never have
* a border with the solid style.
*/
:host(.select-fill-solid) .select-bottom {
border-top: none;
}
/**
* Background and border should be
* slightly darker on hover.
*/
@media (any-hover: hover) {
:host(.select-fill-solid:hover) {
--background: #{$background-color-step-100};
--border-color: #{$background-color-step-750};
}
}
/**
* Background and border should be
* much darker on focus.
*/
:host(.select-fill-solid.select-expanded),
:host(.select-fill-solid.has-focus) {
--background: #{$background-color-step-150};
--border-color: var(--highlight-color);
}
:host(.select-fill-solid) .select-wrapper {
/**
* Only the top left and top right borders should.
* have a radius when using a solid fill.
*/
@include border-radius(var(--border-radius), var(--border-radius), 0px, 0px);
}
// Select Label
// ----------------------------------------------------------------
:host(.label-floating.select-fill-solid) .label-text-wrapper {
/**
* Label text should not extend
* beyond the bounds of the select.
*/
max-width: calc(100% / #{$form-control-label-stacked-scale});
}
// Select Icon
// ----------------------------------------------------------------
/**
* When the select has a solid fill and
* in an item, then the icon should
* take on the highlight color.
*/
:host(.in-item.select-expanded.select-fill-solid) .select-wrapper .select-icon,
:host(.in-item.has-focus.select-fill-solid) .select-wrapper .select-icon,
:host(.in-item.has-focus.ion-valid.select-fill-solid) .select-wrapper .select-icon,
:host(.in-item.ion-touched.ion-invalid.select-fill-solid) .select-wrapper .select-icon {
color: var(--highlight-color);
}