| 1 |
@import '../../../minerva.less/minerva.variables.less'; |
| 2 |
|
| 3 |
// These styles transform the SearchOverlay appearance in the Minerva skin. |
| 4 |
// Since SearchOverlay can be used by other skins, these styles are kept separate from |
| 5 |
// the others. |
| 6 |
|
| 7 |
.overlay.search-overlay { |
| 8 |
.spinner-container { |
| 9 |
top: @height-site-header; |
| 10 |
} |
| 11 |
|
| 12 |
.with-results, |
| 13 |
.without-results { |
| 14 |
margin: 0; |
| 15 |
} |
| 16 |
|
| 17 |
.clear { |
| 18 |
background: none; |
| 19 |
position: absolute; |
| 20 |
top: 50%; |
| 21 |
right: 0; |
| 22 |
transform: translateY( -50% ); |
| 23 |
} |
| 24 |
|
| 25 |
.search-box { |
| 26 |
position: relative; |
| 27 |
} |
| 28 |
} |
| 29 |
|
| 30 |
// Calculate padding based off icon and branding box widths, |
| 31 |
// accounting for `box-sizing: border-box` on the icon |
| 32 |
@spacing-search-horizontal-ems: unit( @spacing-horizontal-button / @font-size-browser, ems ); |
| 33 |
|
| 34 |
@media all and ( min-width: @min-width-breakpoint-tablet ) { |
| 35 |
.overlay.search-overlay { |
| 36 |
@searchPadding: @min-size-interactive-touch-ems + @min-width-branding-box-ems - @spacing-search-horizontal-ems; |
| 37 |
|
| 38 |
.search-box, |
| 39 |
.search-content, |
| 40 |
.spinner-container, |
| 41 |
.results { |
| 42 |
width: @width-search-box; |
| 43 |
margin-left: @searchPadding; |
| 44 |
} |
| 45 |
|
| 46 |
// Ensure search overlay content is aligned with .heading-container |
| 47 |
.overlay-header-container, |
| 48 |
.overlay-content { |
| 49 |
padding-left: @padding-content; |
| 50 |
padding-right: @padding-content; |
| 51 |
box-sizing: border-box; |
| 52 |
} |
| 53 |
|
| 54 |
.overlay-title { |
| 55 |
width: auto; |
| 56 |
} |
| 57 |
|
| 58 |
.overlay-content { |
| 59 |
// Override default width styles |
| 60 |
width: 90%; |
| 61 |
max-width: none; |
| 62 |
} |
| 63 |
|
| 64 |
.spinner-container { |
| 65 |
left: auto; |
| 66 |
right: auto; |
| 67 |
} |
| 68 |
} |
| 69 |
} |
| 70 |
|
| 71 |
/* Keeps search input aligned */ |
| 72 |
@media all and ( min-width: @min-width-breakpoint-tablet ) and ( max-width: @min-width-breakpoint-desktop ) { |
| 73 |
.overlay-title { |
| 74 |
padding-left: 0 !important; |
| 75 |
} |
| 76 |
} |
| 77 |
|
| 78 |
/* FIXME: Remove when T366859 has been addressed */ |
| 79 |
@media screen and ( min-width: 720px ) { |
| 80 |
.overlay.search-overlay { |
| 81 |
@T366859-searchPadding: @min-size-interactive-touch-ems + @T366859-min-width-branding-box-ems - @spacing-search-horizontal-ems; |
| 82 |
|
| 83 |
.search-box, |
| 84 |
.search-content, |
| 85 |
.spinner-container, |
| 86 |
.results { |
| 87 |
margin-left: @T366859-searchPadding; |
| 88 |
} |
| 89 |
} |
| 90 |
} |
| 91 |
|
| 92 |
@media screen and ( min-width: @min-width-breakpoint-desktop ) { |
| 93 |
.overlay.search-overlay { |
| 94 |
// Normally .overlay-content would have these styles by default |
| 95 |
// But since we need to account for .heading-container padding in .overlay-content, |
| 96 |
// we apply these styles directly to the search results instead. |
| 97 |
.search-results-view { |
| 98 |
margin-left: auto; |
| 99 |
margin-right: auto; |
| 100 |
width: 90%; |
| 101 |
max-width: @max-width-content-tablet; |
| 102 |
} |
| 103 |
} |
| 104 |
} |