forked from Brightspace/valence-ui-input
-
Notifications
You must be signed in to change notification settings - Fork 0
/
search.scss
81 lines (77 loc) · 1.46 KB
/
search.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
@import 'input.scss';
@mixin vui-input-search-container() {
position: relative;
& input[type="text"],
& input[type="search"] {
@include vui-input();
appearance: none;
-webkit-appearance: textfield;
&:focus,
&:hover,
&.vui-input-hover,
&.vui-input-focus {
padding-right: calc(2.2rem - 1px);
}
&,
&:disabled,
&:focus:disabled,
&:hover:disabled {
padding-right: 2.2rem;
}
&::-webkit-search-decoration {
-webkit-appearance: none;
}
[dir="rtl"] & {
&:focus,
&:hover,
&.vui-input-hover,
&.vui-input-focus {
padding-left: calc(2.2rem - 1px);
padding-right: calc(1rem - 1px);
}
&,
&:disabled,
&:focus:disabled,
&:hover:disabled {
padding-right: 1rem;
padding-left: 2.2rem;
}
}
}
}
@mixin vui-input-search-button() {
@include _vui-input-search-button-helper($vui-search);
}
@mixin vui-input-search-clear-button() {
@include _vui-input-search-button-helper($vui-clear);
}
@mixin _vui-input-search-button-helper( $image ) {
border: none;
background-color: transparent;
background-image: $image;
background-position: right center;
background-repeat: no-repeat;
cursor: pointer;
height: 1.2rem;
margin: 0;
opacity: 0.7;
padding: 0;
position: absolute;
right: 1rem;
text-indent: -10000px;
top: 0.45rem;
width: 1.2rem;
&, &:focus {
outline: none;
}
&:disabled, &:disabled:hover {
opacity: 0.5;
}
&:hover, &:focus {
opacity: 1;
}
[dir="rtl"] & {
left: 1rem;
right: auto;
}
}