1
1
// Search
2
2
3
3
.td-search {
4
- background : transparent ;
5
- position : relative ;
6
- width : 100% ;
7
-
8
- // Search icon
9
- & __icon {
10
- // Vertically center the content.
11
- display : flex ;
12
- align-items : center ;
13
- height : 100% ;
14
-
15
- // Position this on the left of the input.
16
- position : absolute ;
17
- left : 0.75em ;
18
-
19
- // Click-through to the underlying input.
20
- pointer-events : none ;
21
-
22
- & :before {
23
- @extend .fa ;
24
- content : fa-content ($fa-var-search );
25
- }
26
-
27
- // Styling adjustments for the navbar
28
- @at-root {
29
- .td-navbar & {
30
- color : $navbar-dark-color ;
31
- }
32
- }
4
+ width : auto ;
5
+ padding : 0 ;
6
+ border-radius : 8px ;
7
+ border : 1px solid $white ;
8
+ background : linear-gradient (
9
+ 96deg ,
10
+ rgba (217 , 224 , 226 , 0.7 ) 3.53% ,
11
+ rgba (217 , 224 , 226 , 0 ) 398.97%
12
+ );
13
+ display : flex ;
14
+ align-content : center ;
15
+ // background-color: #EBC017;
16
+ position : relative ;
17
+
18
+ // Search icon
19
+ .td-search__icon {
20
+ // Vertically center the content.
21
+ color : #fff ;
22
+ display : flex ;
23
+ align-items : center ;
24
+ height : 100% ;
25
+
26
+ // Position this on the left of the input.
27
+ position : absolute ;
28
+ left : 0.75em ;
29
+
30
+ // Click-through to the underlying input.
31
+ pointer-events : none ;
32
+
33
+ & :not (:focus ) {
34
+ color : #000 ;
33
35
}
34
-
35
- // Search input element
36
- & __input {
37
- width : 100% ;
38
- text-indent : 1.25em ;
39
-
40
- & :not (:focus ) {
41
- background : transparent ;
42
- }
43
-
44
- & .form-control :focus {
45
- border-color : tint-color ($primary , 95% );
46
- box-shadow : 0 0 0 2px tint-color ($primary , 40% );
47
- color : inherit ;
48
- }
49
-
50
- // Styling adjustments for the navbar
51
- @at-root {
52
- .td-navbar & {
53
- border : none ;
54
- color : $navbar-dark-color ;
55
-
56
- @include placeholder {
57
- color : $navbar-dark-color ;
58
- }
59
- }
60
- }
36
+ & :before {
37
+ @extend .fa ;
38
+ content : fa-content ($fa-var-search );
61
39
}
62
-
63
- // Hide icon on focus
64
- & :focus-within {
65
- .td-search__icon {
66
- display : none ;
67
- }
68
-
69
- .td-search-input {
70
- text-indent : 0px ;
40
+ }
41
+
42
+ // Search input element
43
+ & __input {
44
+ width : 100% ;
45
+ text-indent : 1.25em ;
46
+ line-height : 2rem ;
47
+ border-radius : 8px ;
48
+
49
+ & :not (:focus ) {
50
+ background : transparent ;
51
+ & ::placeholder {
52
+ color : #000 ;
71
53
}
72
54
}
73
-
74
- & :not ( : focus-within ) {
75
- color : $input-placeholder- color ;
55
+
56
+ & .form-control : focus {
57
+ box-shadow : 0 0 0 2 px tint- color( $primary , 40 % ) ;
76
58
}
77
- }
78
-
79
- .td-sidebar .td-search--algolia {
80
- display : block ;
81
- padding : 0 0.5rem ;
82
- > button {
83
- margin : 0 ;
84
- width : 100% ;
59
+ & .form-control :not (:focus ) {
60
+ color : #000 ;
85
61
}
86
62
}
87
-
88
- // Offline search
89
-
90
- .td-search--offline {
91
- & :focus-within {
92
- // Don't hide the search icon on focus: this gives better UX when user
93
- // explores content of search-results popup and focus is lost.
94
-
95
- .td-search__icon {
96
- display : flex ;
97
- color : $input-placeholder-color ;
98
- }
99
- }
63
+ }
64
+
65
+ .td-sidebar .td-search--algolia {
66
+ display : block ;
67
+ padding : 0 0.5rem ;
68
+ > button {
69
+ margin : 0 ;
70
+ width : 100% ;
100
71
}
101
-
102
- .td-offline-search-results {
103
- max-width : 90% ;
104
-
105
- .card {
106
- margin-bottom : $spacer * 0.5 ;
107
-
108
- .card-header {
109
- font-weight : bold ;
110
- }
111
- }
112
-
113
- & __close-button {
114
- // cursor: pointer;
115
- float : right ;
116
-
117
- & :after {
118
- @extend .fas ;
119
- content : fa-content ($fa-var-times );
120
- }
72
+ }
73
+
74
+ // Offline search
75
+
76
+ .td-search--offline {
77
+ & :focus-within {
78
+ // Don't hide the search icon on focus: this gives better UX when user
79
+ // explores content of search-results popup and focus is lost.
80
+
81
+ .td-search__icon {
82
+ display : flex ;
83
+ color : $input-placeholder-color ;
121
84
}
122
85
}
86
+ }
87
+
88
+ .td-offline-search-results {
89
+ max-width : 90% ;
123
90
124
- .popover-body {
125
- background-color :#2e2e31 ;
91
+ .card {
92
+ margin-bottom : $spacer * 0.5 ;
93
+
94
+ .card-header {
95
+ font-weight : bold ;
96
+ }
126
97
}
127
98
128
- // Global Navigation Bar
129
- .td-navbar {
130
- min-height :6rem ;
131
- background-color : $body-bg !important ;
132
- .navbar-brand {
133
- margin : 1.25rem ;
99
+ & __close-button {
100
+ // cursor: pointer;
101
+ float : right ;
102
+
103
+ & :after {
104
+ @extend .fas ;
105
+ content : fa-content ($fa-var-times );
134
106
}
135
- .td-search {
136
- display :flex ;
137
- justify-content : center ;
138
- align-content : center ;
139
- // background-color: #EBC017;
140
- background-color :#2e2e31 ;
141
- border-radius : 1rem ;
142
-
143
-
144
- .td-search__input {
145
- width : 100% ;
146
- text-indent : 1.25em ;
147
- border-radius : 1rem ;
148
- }
149
- .td-search__input :not (:focus ) {
150
- background : transparent ;
151
- border-radius : 1rem ; }
152
- .td-search__input.form-control :focus {
153
- color : inherit ; }
154
- }
155
- .td-search__input.form-control :focus {
156
-
157
- // background-color: #EBC017;
158
- }
159
-
160
- }
107
+ }
108
+ }
109
+
110
+ .popover-body {
111
+ background-color : #2e2e31 ;
112
+ }
0 commit comments