|
147 | 147 | $search-hover-elevation: map.get($input-group-schema, 'search-hover-elevation'); |
148 | 148 | $search-disabled-elevation: map.get($input-group-schema, 'search-disabled-elevation'); |
149 | 149 |
|
150 | | - @if $variant == 'material' { |
| 150 | + @if $variant == 'material' and $box-background != transparent { |
151 | 151 | @if not($box-background-hover) and $box-background { |
152 | 152 | $box-background-hover: var(--box-background); |
153 | 153 | } |
|
296 | 296 | } |
297 | 297 |
|
298 | 298 | //material search input |
| 299 | + @if $search-background != transparent { |
| 300 | + @if not($placeholder-color) and $search-background { |
| 301 | + $placeholder-color: hsla(from adaptive-contrast(var(--search-background)) h s l / 0.6); |
| 302 | + } |
299 | 303 |
|
300 | | - @if not($placeholder-color) and $search-background { |
301 | | - $placeholder-color: hsla(from adaptive-contrast(var(--search-background)) h s l / 0.6); |
302 | | - } |
303 | | - |
304 | | - @if not($hover-placeholder-color) and $placeholder-color { |
305 | | - $hover-placeholder-color: var(--placeholder-color); |
306 | | - } |
| 304 | + @if not($hover-placeholder-color) and $placeholder-color { |
| 305 | + $hover-placeholder-color: var(--placeholder-color); |
| 306 | + } |
307 | 307 |
|
308 | | - @if not($idle-secondary-color) and $placeholder-color { |
309 | | - $idle-secondary-color: var(--placeholder-color); |
310 | | - } |
| 308 | + @if not($idle-secondary-color) and $placeholder-color { |
| 309 | + $idle-secondary-color: var(--placeholder-color); |
| 310 | + } |
311 | 311 |
|
312 | | - @if not($idle-text-color) and $search-background { |
313 | | - $idle-text-color: adaptive-contrast(var(--search-background)); |
314 | | - } |
| 312 | + @if not($idle-text-color) and $search-background { |
| 313 | + $idle-text-color: adaptive-contrast(var(--search-background)); |
| 314 | + } |
315 | 315 |
|
316 | | - @if not($focused-secondary-color) and $search-background { |
317 | | - $focused-secondary-color: adaptive-contrast(var(--search-background)); |
318 | | - } |
| 316 | + @if not($focused-secondary-color) and $search-background { |
| 317 | + $focused-secondary-color: adaptive-contrast(var(--search-background)); |
| 318 | + } |
319 | 319 |
|
320 | | - @if not($filled-text-color) and $search-background { |
321 | | - $filled-text-color: adaptive-contrast(var(--search-background)); |
322 | | - } |
| 320 | + @if not($filled-text-color) and $search-background { |
| 321 | + $filled-text-color: adaptive-contrast(var(--search-background)); |
| 322 | + } |
323 | 323 |
|
324 | | - @if not($filled-text-hover-color) and $search-background { |
325 | | - $filled-text-hover-color: adaptive-contrast(var(--search-background)); |
326 | | - } |
| 324 | + @if not($filled-text-hover-color) and $search-background { |
| 325 | + $filled-text-hover-color: adaptive-contrast(var(--search-background)); |
| 326 | + } |
327 | 327 |
|
328 | | - @if not($focused-text-color) and $search-background { |
329 | | - $focused-text-color: adaptive-contrast(var(--search-background)); |
330 | | - } |
| 328 | + @if not($focused-text-color) and $search-background { |
| 329 | + $focused-text-color: adaptive-contrast(var(--search-background)); |
| 330 | + } |
331 | 331 |
|
332 | | - @if not($input-prefix-color) and $search-background { |
333 | | - $input-prefix-color: hsla(from adaptive-contrast(var(--search-background)) h s l / 0.6); |
334 | | - } |
| 332 | + @if not($input-prefix-color) and $search-background { |
| 333 | + $input-prefix-color: hsla(from adaptive-contrast(var(--search-background)) h s l / 0.6); |
| 334 | + } |
335 | 335 |
|
336 | | - @if not($input-prefix-color--filled) and $search-background { |
337 | | - $input-prefix-color--filled: adaptive-contrast(var(--search-background)); |
338 | | - } |
| 336 | + @if not($input-prefix-color--filled) and $search-background { |
| 337 | + $input-prefix-color--filled: adaptive-contrast(var(--search-background)); |
| 338 | + } |
339 | 339 |
|
340 | | - @if not($input-prefix-color--focused) and $search-background { |
341 | | - $input-prefix-color--focused: adaptive-contrast(var(--search-background)); |
342 | | - } |
| 340 | + @if not($input-prefix-color--focused) and $search-background { |
| 341 | + $input-prefix-color--focused: adaptive-contrast(var(--search-background)); |
| 342 | + } |
343 | 343 |
|
344 | | - @if not($input-suffix-color) and $search-background { |
345 | | - $input-suffix-color: hsla(from adaptive-contrast(var(--search-background)) h s l / 0.6); |
346 | | - } |
| 344 | + @if not($input-suffix-color) and $search-background { |
| 345 | + $input-suffix-color: hsla(from adaptive-contrast(var(--search-background)) h s l / 0.6); |
| 346 | + } |
347 | 347 |
|
348 | | - @if not($input-suffix-color--filled) and $search-background { |
349 | | - $input-suffix-color--filled: adaptive-contrast(var(--search-background)); |
350 | | - } |
| 348 | + @if not($input-suffix-color--filled) and $search-background { |
| 349 | + $input-suffix-color--filled: adaptive-contrast(var(--search-background)); |
| 350 | + } |
351 | 351 |
|
352 | | - @if not($input-suffix-color--focused) and $search-background { |
353 | | - $input-suffix-color--focused: adaptive-contrast(var(--search-background)); |
354 | | - } |
| 352 | + @if not($input-suffix-color--focused) and $search-background { |
| 353 | + $input-suffix-color--focused: adaptive-contrast(var(--search-background)); |
| 354 | + } |
355 | 355 |
|
356 | | - @if not($search-disabled-background) and $search-background { |
357 | | - $search-disabled-background: hsla(from var(--search-background) h s l / 0.4); |
358 | | - } |
| 356 | + @if not($search-disabled-background) and $search-background { |
| 357 | + $search-disabled-background: hsla(from var(--search-background) h s l / 0.4); |
| 358 | + } |
359 | 359 |
|
360 | | - @if not($disabled-placeholder-color) and $search-disabled-background { |
361 | | - $disabled-placeholder-color: adaptive-contrast(var(--search-disabled-background)); |
362 | | - } |
| 360 | + @if not($disabled-placeholder-color) and $search-disabled-background { |
| 361 | + $disabled-placeholder-color: adaptive-contrast(var(--search-disabled-background)); |
| 362 | + } |
363 | 363 |
|
364 | | - @if not($disabled-text-color) and $search-disabled-background { |
365 | | - $disabled-text-color: adaptive-contrast(var(--search-disabled-background)); |
| 364 | + @if not($disabled-text-color) and $search-disabled-background { |
| 365 | + $disabled-text-color: adaptive-contrast(var(--search-disabled-background)); |
| 366 | + } |
366 | 367 | } |
367 | 368 |
|
368 | 369 | @if not($search-resting-shadow) { |
|
377 | 378 | $search-disabled-shadow: elevation($search-disabled-elevation); |
378 | 379 | } |
379 | 380 |
|
380 | | - //end material search input |
| 381 | + // //end material search input |
381 | 382 |
|
382 | 383 | @if not($input-prefix-color) and $input-suffix-color { |
383 | 384 | $input-prefix-color: var(--input-suffix-color); |
|
0 commit comments