|
3 | 3 | // * See COPYING.txt for license details.
|
4 | 4 | // */
|
5 | 5 |
|
6 |
| -@autocomplete-background: @color-white; |
7 |
| -@autocomplete-border: 1px solid @form-element-input__border-color; |
8 |
| -@autocomplete-item-border: 1px solid @color-gray90; |
9 |
| -@autocomplete-item-hover: @color-gray91; |
10 |
| -@autocomplete-item-amount-color: @color-gray60; |
| 6 | +// |
| 7 | +// Variables |
| 8 | +// _____________________________________________ |
| 9 | + |
| 10 | +@autocomplete__background-color: @color-white; |
| 11 | +@autocomplete__border: 1px solid @form-element-input__border-color; |
| 12 | +@autocomplete-item__border: 1px solid @color-gray90; |
| 13 | +@autocomplete-item__hover__color: @color-gray91; |
| 14 | +@autocomplete-item-amount__color: @color-gray60; |
11 | 15 |
|
12 | 16 | //
|
13 |
| -// Common |
14 |
| -//-------------------------------------- |
| 17 | +// Common |
| 18 | +// _____________________________________________ |
15 | 19 |
|
16 | 20 | & when (@media-common = true) {
|
| 21 | + .block-search { |
| 22 | + margin-bottom: 0; |
17 | 23 |
|
18 |
| -.block-search { |
19 |
| - margin-bottom: 0; |
20 |
| - |
21 |
| - .block { |
22 |
| - &-title { |
23 |
| - display: none; |
| 24 | + .block { |
| 25 | + &-title { |
| 26 | + display: none; |
| 27 | + } |
24 | 28 | }
|
25 |
| - } |
26 | 29 |
|
27 |
| - .block-content { |
28 |
| - margin-bottom: 0; |
29 |
| - } |
| 30 | + .block-content { |
| 31 | + margin-bottom: 0; |
| 32 | + } |
30 | 33 |
|
31 |
| - .label { |
32 |
| - .lib-icon-font( |
| 34 | + .label { |
| 35 | + .lib-icon-font( |
33 | 36 | @_icon-font-content: @icon-search,
|
34 | 37 | @_icon-font-size: 35px,
|
35 | 38 | @_icon-font-line-height: 33px,
|
36 | 39 | @_icon-font-color: @minicart-icons-color,
|
37 | 40 | @_icon-font-color-hover: @minicart-icons-color-hover,
|
38 | 41 | @_icon-font-color-active: @minicart-icons-color-hover,
|
39 | 42 | @_icon-font-text-hide: true
|
40 |
| - ); |
41 |
| - display: inline-block; |
42 |
| - float: right; |
| 43 | + ); |
| 44 | + display: inline-block; |
| 45 | + float: right; |
43 | 46 |
|
44 |
| - &.active { |
45 |
| - + .control { |
46 |
| - input { |
47 |
| - position: static; |
| 47 | + &.active { |
| 48 | + + .control { |
| 49 | + input { |
| 50 | + position: static; |
| 51 | + } |
48 | 52 | }
|
49 | 53 | }
|
50 | 54 | }
|
51 |
| - } |
52 | 55 |
|
53 |
| - .action.search { |
54 |
| - display: none; |
55 |
| - } |
| 56 | + .action.search { |
| 57 | + display: none; |
| 58 | + } |
56 | 59 |
|
57 |
| - .control { |
58 |
| - border-top: 1px solid @border-color__base; |
59 |
| - clear: both; |
60 |
| - margin: 0 -@layout__width-xs-indent -1px; |
61 |
| - padding: 0 @layout__width-xs-indent; |
62 |
| - } |
| 60 | + .control { |
| 61 | + border-top: 1px solid @border-color__base; |
| 62 | + clear: both; |
| 63 | + margin: 0 -@layout__width-xs-indent -1px; |
| 64 | + padding: 0 @layout__width-xs-indent; |
| 65 | + } |
63 | 66 |
|
64 |
| - input { |
65 |
| - left: -300%; |
66 |
| - position: absolute; |
67 |
| - margin: 15px 0; |
| 67 | + input { |
| 68 | + left: -300%; |
| 69 | + margin: 15px 0; |
| 70 | + position: absolute; |
| 71 | + } |
| 72 | + |
| 73 | + .nested { |
| 74 | + display: none; |
| 75 | + } |
68 | 76 | }
|
69 | 77 |
|
70 |
| - .nested { |
| 78 | + .search-autocomplete { |
| 79 | + &:extend(.abs-add-box-sizing all); |
71 | 80 | display: none;
|
72 |
| - } |
73 |
| -} |
| 81 | + margin-top: -15px; |
| 82 | + overflow: hidden; |
| 83 | + position: absolute; |
| 84 | + z-index: 3; |
74 | 85 |
|
75 |
| -.search-autocomplete { |
76 |
| - display: none; |
77 |
| - position: absolute; |
78 |
| - z-index: 3; |
79 |
| - overflow: hidden; |
80 |
| - margin-top: -15px; |
81 |
| - &:extend(.abs-add-box-sizing all); |
82 |
| - |
83 |
| - ul { |
84 |
| - .lib-list-reset-styles(); |
85 |
| - |
86 |
| - li { |
87 |
| - &:not(:empty) { |
88 |
| - .lib-css(background, @autocomplete-background); |
89 |
| - .lib-css(border, @autocomplete-border); |
90 |
| - border-top: 0; |
91 |
| - } |
| 86 | + ul { |
| 87 | + .lib-list-reset-styles(); |
92 | 88 |
|
93 |
| - .lib-css(border-top, @autocomplete-item-border); |
94 |
| - cursor: pointer; |
95 |
| - margin: 0; |
96 |
| - padding: @indent__xs @indent__xl @indent__xs @indent__s; |
97 |
| - position: relative; |
98 |
| - text-align: left; |
99 |
| - white-space: normal; |
| 89 | + li { |
| 90 | + .lib-css(border-top, @autocomplete-item__border); |
| 91 | + cursor: pointer; |
| 92 | + margin: 0; |
| 93 | + padding: @indent__xs @indent__xl @indent__xs @indent__s; |
| 94 | + position: relative; |
| 95 | + text-align: left; |
| 96 | + white-space: normal; |
| 97 | + |
| 98 | + &:not(:empty) { |
| 99 | + border-top: 0; |
| 100 | + .lib-css(border, @autocomplete__border); |
| 101 | + .lib-css(background, @autocomplete__background-color); |
| 102 | + } |
100 | 103 |
|
101 |
| - &:first-child { |
102 |
| - border-top: none; |
103 |
| - } |
| 104 | + &:first-child { |
| 105 | + border-top: none; |
| 106 | + } |
104 | 107 |
|
105 |
| - &:hover, |
106 |
| - &.selected { |
107 |
| - .lib-css(background, @autocomplete-item-hover); |
108 |
| - } |
| 108 | + &:hover, |
| 109 | + &.selected { |
| 110 | + .lib-css(background, @autocomplete-item__hover__color); |
| 111 | + } |
109 | 112 |
|
110 |
| - .amount { |
111 |
| - .lib-css(color, @autocomplete-item-amount-color); |
112 |
| - position: absolute; |
113 |
| - right: 7px; |
114 |
| - top: @indent__xs; |
| 113 | + .amount { |
| 114 | + .lib-css(color, @autocomplete-item-amount__color); |
| 115 | + position: absolute; |
| 116 | + right: 7px; |
| 117 | + top: @indent__xs; |
| 118 | + } |
115 | 119 | }
|
116 | 120 | }
|
117 | 121 | }
|
118 |
| -} |
119 | 122 |
|
120 |
| -.form.search.advanced { |
121 |
| - .fields.range { |
122 |
| - .field { |
123 |
| - &:first-child { |
124 |
| - position: relative; |
| 123 | + .form.search.advanced { |
| 124 | + .fields.range { |
| 125 | + .field { |
| 126 | + &:first-child { |
| 127 | + position: relative; |
| 128 | + |
| 129 | + .control { |
| 130 | + padding-right: 25px; |
| 131 | + |
| 132 | + &:after { |
| 133 | + content: ' \2013 '; |
| 134 | + display: inline-block; |
| 135 | + position: absolute; |
| 136 | + right: 0; |
| 137 | + text-align: center; |
| 138 | + top: 6px; |
| 139 | + width: 25px; |
| 140 | + } |
| 141 | + } |
| 142 | + } |
125 | 143 |
|
126 |
| - .control { |
127 |
| - padding-right: 25px; |
| 144 | + &:last-child { |
| 145 | + position: relative; |
128 | 146 |
|
129 |
| - &:after { |
130 |
| - content: ' \2013 '; |
131 |
| - display: inline-block; |
132 |
| - text-align: center; |
133 |
| - width: 25px; |
| 147 | + div.mage-error[generated] { |
| 148 | + left: 0; |
134 | 149 | position: absolute;
|
135 |
| - right: 0; |
136 |
| - top: 6px; |
| 150 | + top: 32px; |
137 | 151 | }
|
138 | 152 | }
|
139 |
| - } |
140 |
| - |
141 |
| - &:last-child { |
142 |
| - position: relative; |
143 | 153 |
|
144 |
| - div.mage-error[generated] { |
145 |
| - position: absolute; |
146 |
| - top: 32px; |
147 |
| - left: 0; |
| 154 | + &.with-addon { |
| 155 | + .control { |
| 156 | + padding-right: 45px; |
| 157 | + } |
148 | 158 | }
|
149 | 159 | }
|
| 160 | + } |
150 | 161 |
|
151 |
| - &.with-addon { |
152 |
| - .control { |
153 |
| - padding-right: 45px; |
| 162 | + .group.price { |
| 163 | + .addon { |
| 164 | + .addafter { |
| 165 | + background: none; |
| 166 | + border: 0; |
| 167 | + padding-top: 6px; |
| 168 | + position: absolute; |
| 169 | + right: 0; |
| 170 | + top: 0; |
154 | 171 | }
|
155 | 172 | }
|
156 | 173 | }
|
157 | 174 | }
|
158 |
| - |
159 |
| - .group.price { |
160 |
| - .addon { |
161 |
| - .addafter { |
162 |
| - background: none; |
163 |
| - border: 0; |
164 |
| - padding-top: 6px; |
165 |
| - position: absolute; |
166 |
| - right: 0; |
167 |
| - top: 0; |
168 |
| - } |
169 |
| - } |
| 175 | + |
| 176 | + .search.summary { |
| 177 | + margin-bottom: @indent__s; |
170 | 178 | }
|
171 | 179 | }
|
172 | 180 |
|
173 |
| -} |
174 |
| - |
175 | 181 | //
|
176 |
| -// Mobile |
177 |
| -//-------------------------------------- |
| 182 | +// Mobile |
| 183 | +// _____________________________________________ |
| 184 | + |
178 | 185 | .media-width(@extremum, @break) when (@extremum = 'max') and (@break = @screen__m) {
|
179 | 186 | .block-search {
|
180 | 187 | .block-content {
|
|
190 | 197 | }
|
191 | 198 |
|
192 | 199 | //
|
193 |
| -// Desktop |
194 |
| -//-------------------------------------- |
| 200 | +// Desktop |
| 201 | +// _____________________________________________ |
| 202 | + |
195 | 203 | .media-width(@extremum, @break) when (@extremum = 'min') and (@break = @screen__m) {
|
196 | 204 | .block-search {
|
197 |
| - position: relative; |
198 | 205 | float: right;
|
199 | 206 | padding-left: 15px;
|
| 207 | + position: relative; |
200 | 208 | width: 250px;
|
201 | 209 | z-index: 4;
|
202 | 210 |
|
|
217 | 225 | }
|
218 | 226 |
|
219 | 227 | input {
|
220 |
| - position: static; |
221 |
| - padding-right: 35px; |
222 |
| - margin: 0; |
223 | 228 | .lib-input-placeholder(@form-element-input-placeholder__color);
|
| 229 | + margin: 0; |
| 230 | + padding-right: 35px; |
| 231 | + position: static; |
224 | 232 | }
|
225 | 233 |
|
226 | 234 | .action.search {
|
227 |
| - position: absolute; |
228 | 235 | display: inline-block;
|
229 |
| - right: 10px; |
230 |
| - top: 0; |
231 |
| - z-index: 1; |
232 | 236 | .lib-button-icon(
|
233 |
| - @_icon-font-content: @icon-search, |
234 |
| - @_icon-font-text-hide: true, |
235 |
| - @_icon-font-color: @header-icons-color |
| 237 | + @_icon-font-content: @icon-search, |
| 238 | + @_icon-font-text-hide: true, |
| 239 | + @_icon-font-color: @header-icons-color |
236 | 240 | );
|
237 | 241 | .lib-button-reset();
|
| 242 | + padding: @indent__xs 0; |
| 243 | + position: absolute; |
| 244 | + right: 10px; |
| 245 | + top: 0; |
| 246 | + z-index: 1; |
238 | 247 |
|
239 | 248 | &:focus {
|
240 | 249 | &:before {
|
241 | 250 | .lib-css(color, @color-gray20);
|
242 | 251 | }
|
243 | 252 | }
|
244 |
| - |
245 |
| - padding: @indent__xs 0; |
246 | 253 | }
|
247 | 254 | }
|
248 | 255 |
|
|
0 commit comments