header-search-wide.css

Same filename in other branches
  1. 10 core/themes/olivero/css/components/header-search-wide.css
  2. 11.x core/themes/olivero/css/components/header-search-wide.css

Header Search Wide Block.

File

core/themes/olivero/css/components/header-search-wide.css

View source
  1. /*
  2. * DO NOT EDIT THIS FILE.
  3. * See the following change record for more information,
  4. * https://www.drupal.org/node/3084859
  5. * @preserve
  6. */
  7. /**
  8. * @file
  9. * Header Search Wide Block.
  10. */
  11. /* Override contextual links so we can position against .site-header. */
  12. .block-search-wide.contextual-region {
  13. position: static;
  14. }
  15. [dir="ltr"] .block-search-wide__wrapper {
  16. left: 0;
  17. }
  18. [dir="rtl"] .block-search-wide__wrapper {
  19. right: 0;
  20. }
  21. [dir="ltr"] .block-search-wide__wrapper {
  22. margin-left: 0;
  23. }
  24. [dir="rtl"] .block-search-wide__wrapper {
  25. margin-right: 0;
  26. }
  27. [dir="ltr"] .block-search-wide__wrapper {
  28. margin-right: 0;
  29. }
  30. [dir="rtl"] .block-search-wide__wrapper {
  31. margin-left: 0;
  32. }
  33. [dir="ltr"] .block-search-wide__wrapper {
  34. padding-left: 0;
  35. }
  36. [dir="rtl"] .block-search-wide__wrapper {
  37. padding-right: 0;
  38. }
  39. [dir="ltr"] .block-search-wide__wrapper {
  40. padding-right: 0;
  41. }
  42. [dir="rtl"] .block-search-wide__wrapper {
  43. padding-left: 0;
  44. }
  45. [dir="ltr"] .block-search-wide__wrapper {
  46. border-left: solid 5.625rem #313637;
  47. }
  48. [dir="rtl"] .block-search-wide__wrapper {
  49. border-right: solid 5.625rem #313637;
  50. }
  51. .block-search-wide__wrapper {
  52. position: absolute;
  53. z-index: 1; /* Ensure left border shows above social region in IE11. */
  54. top: 100%;
  55. display: none;
  56. visibility: hidden;
  57. overflow: hidden;
  58. width: 100vw;
  59. max-width: 98.125rem;
  60. height: 9rem;
  61. max-height: 0;
  62. margin-top: 0;
  63. margin-bottom: 0;
  64. padding-top: 0;
  65. padding-bottom: 0;
  66. transition: all 0.2s;
  67. background: #000;
  68. }
  69. .block-search-wide__wrapper.is-active {
  70. visibility: visible;
  71. max-height: 9rem;
  72. }
  73. .block-search-wide__wrapper form {
  74. display: flex;
  75. -ms-grid-column: 1;
  76. -ms-grid-column-span: 13;
  77. grid-column: 1 / 14;
  78. }
  79. [dir="ltr"] .block-search-wide__wrapper input[type="search"] {
  80. padding-left: 13.5rem;
  81. }
  82. [dir="rtl"] .block-search-wide__wrapper input[type="search"] {
  83. padding-right: 13.5rem;
  84. }
  85. [dir="ltr"] .block-search-wide__wrapper input[type="search"] {
  86. padding-right: 0;
  87. }
  88. [dir="rtl"] .block-search-wide__wrapper input[type="search"] {
  89. padding-left: 0;
  90. }
  91. .block-search-wide__wrapper input[type="search"] {
  92. width: calc(100% + 2.25rem);
  93. height: 9rem;
  94. padding-top: 0;
  95. padding-bottom: 0;
  96. transition: background-size 0.4s;
  97. color: #fff;
  98. border: solid 1px transparent;
  99. box-shadow: none;
  100. font-family: Lora, georgia, serif;
  101. font-size: 2rem;
  102. -webkit-appearance: none;
  103. }
  104. .block-search-wide__wrapper input[type="search"]::-ms-clear {
  105. width: 2.5rem;
  106. opacity: 0.5;
  107. }
  108. .block-search-wide__wrapper input[type="search"]:focus {
  109. outline: solid 4px transparent;
  110. outline-offset: -4px;
  111. /*
  112. We normally indicate focus by animating background-image width. This isn't
  113. available in IE11 when in Windows high contrast mode.
  114. */
  115. }
  116. @media screen and (-ms-high-contrast: active) {
  117. .block-search-wide__wrapper input[type="search"]:focus {
  118. border-bottom-width: 9px;
  119. }
  120. }
  121. .block-search-wide__wrapper .form-item-keys {
  122. flex-grow: 1;
  123. margin: 0;
  124. }
  125. .block-search-wide__wrapper .form-actions {
  126. display: flex;
  127. margin: 0;
  128. }
  129. [dir="ltr"] .block-search-wide__wrapper .search-form__submit {
  130. margin-left: 0;
  131. }
  132. [dir="rtl"] .block-search-wide__wrapper .search-form__submit {
  133. margin-right: 0;
  134. }
  135. [dir="ltr"] .block-search-wide__wrapper .search-form__submit {
  136. margin-right: 0;
  137. }
  138. [dir="rtl"] .block-search-wide__wrapper .search-form__submit {
  139. margin-left: 0;
  140. }
  141. [dir="ltr"] .block-search-wide__wrapper .search-form__submit {
  142. padding-left: 0;
  143. }
  144. [dir="rtl"] .block-search-wide__wrapper .search-form__submit {
  145. padding-right: 0;
  146. }
  147. [dir="ltr"] .block-search-wide__wrapper .search-form__submit {
  148. padding-right: 0;
  149. }
  150. [dir="rtl"] .block-search-wide__wrapper .search-form__submit {
  151. padding-left: 0;
  152. }
  153. .block-search-wide__wrapper .search-form__submit {
  154. position: relative;
  155. overflow: hidden;
  156. -ms-grid-row-align: stretch;
  157. align-self: stretch;
  158. width: 6.25rem;
  159. height: auto;
  160. margin-top: 0;
  161. margin-bottom: 0;
  162. padding-top: 0;
  163. padding-bottom: 0;
  164. cursor: pointer;
  165. border-color: transparent;
  166. background-color: transparent;
  167. /*
  168. When in Windows high contrast mode, FF will not output either background
  169. images or SVGs that are nested directly within a element, so we add a .
  170. */
  171. }
  172. [dir="ltr"] .block-search-wide__wrapper .search-form__submit .icon--search {
  173. right: 0;
  174. }
  175. [dir="rtl"] .block-search-wide__wrapper .search-form__submit .icon--search {
  176. left: 0;
  177. }
  178. .block-search-wide__wrapper .search-form__submit .icon--search {
  179. position: absolute;
  180. top: 0;
  181. display: block;
  182. width: 1.5rem; /* Width of the SVG background image. */
  183. height: 100%;
  184. pointer-events: none;
  185. background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' width='26' height='27.2' viewBox='0 0 26 27.2'%3e %3cpath fill='%23fff' d='M25.8,25.5l-5.3-5.3c2.1-2.1,3.4-5.1,3.4-8.3C23.9,5.3,18.5,0,11.9,0C5.3,0,0,5.3,0,11.9c0,6.6,5.3,11.9,11.9,11.9c2.6,0,5.1-0.9,7-2.3l5.4,5.4c0.4,0.4,1,0.4,1.4,0C26.1,26.6,26.1,25.9,25.8,25.5z M11.9,21.9c-5.5,0-9.9-4.4-9.9-9.9S6.4,2,11.9,2c5.5,0,9.9,4.4,9.9,9.9S17.4,21.9,11.9,21.9z'/%3e%3c/svg%3e");
  186. background-repeat: no-repeat;
  187. background-position: center;
  188. background-size: contain;
  189. }
  190. [dir="ltr"] .block-search-wide__wrapper .search-form__submit .icon--search:after {
  191. left: 0;
  192. }
  193. [dir="rtl"] .block-search-wide__wrapper .search-form__submit .icon--search:after {
  194. right: 0;
  195. }
  196. .block-search-wide__wrapper .search-form__submit .icon--search:after {
  197. position: absolute;
  198. bottom: 0;
  199. width: 100%;
  200. height: 0;
  201. content: "";
  202. transition: transform 0.2s;
  203. transform: scaleX(0);
  204. transform-origin: left;
  205. border-top: solid 0.5625rem #2494db;
  206. }
  207. .block-search-wide__wrapper .search-form__submit:focus {
  208. outline: solid 4px transparent;
  209. outline-offset: -4px;
  210. box-shadow: none;
  211. }
  212. .block-search-wide__wrapper .search-form__submit:focus span:after {
  213. transform: scaleX(1);
  214. }
  215. @media screen and (-ms-high-contrast: active) {
  216. .block-search-wide__wrapper .search-form__submit:focus {
  217. border-bottom-width: 9px;
  218. }
  219. .block-search-wide__wrapper .search-form__submit:focus span:after {
  220. content: none;
  221. }
  222. }
  223. @media screen and (-ms-high-contrast: active) {
  224. /* IE11's high contrast show will not show the background image, so we show the text. */
  225. .block-search-wide__wrapper .search-form__submit .visually-hidden {
  226. position: static;
  227. overflow: visible;
  228. clip: auto;
  229. width: auto;
  230. height: auto;
  231. text-align: center;
  232. }
  233. /* Edge's high contrast does show the background image, so we hide it. */
  234. .block-search-wide__wrapper .search-form__submit .icon--search {
  235. display: none;
  236. }
  237. }
  238. [dir="ltr"] .block-search-wide__container {
  239. padding-right: 2.25rem;
  240. }
  241. [dir="rtl"] .block-search-wide__container {
  242. padding-left: 2.25rem;
  243. }
  244. .block-search-wide__container {
  245. max-width: 84.375rem;
  246. }
  247. .block-search-wide__grid {
  248. display: -ms-grid;
  249. display: grid;
  250. -ms-grid-columns: (1fr)[14];
  251. grid-template-columns: repeat(14, 1fr);
  252. grid-column-gap: 2.25rem;
  253. }
  254. /* Override specificity from container-inline.module.css */
  255. .container-inline .block-search-wide__container {
  256. display: block;
  257. }
  258. .container-inline .block-search-wide__grid {
  259. display: -ms-grid;
  260. display: grid;
  261. }
  262. .block-search-wide__button {
  263. position: relative;
  264. display: none;
  265. width: 3.375rem;
  266. height: 6.75rem;
  267. cursor: pointer;
  268. color: #0d1214; /* Affects SVG search icon. */
  269. border: 0;
  270. background: transparent;
  271. -webkit-appearance: none;
  272. }
  273. .block-search-wide__button:focus {
  274. position: relative;
  275. outline: 0;
  276. }
  277. .block-search-wide__button:focus:after {
  278. position: absolute;
  279. top: 50%;
  280. left: 50%;
  281. width: 80%;
  282. height: 3.375rem;
  283. content: "";
  284. transform: translate(-50%, -50%);
  285. border: solid 2px #2494db;
  286. border-radius: 0.25rem;
  287. }
  288. .block-search-wide__button[aria-expanded="true"] {
  289. background: #000;
  290. }
  291. .block-search-wide__button[aria-expanded="true"]:focus:after {
  292. border-color: #fff;
  293. }
  294. .block-search-wide__button[aria-expanded="true"] .block-search-wide__button-close:before,
  295. .block-search-wide__button[aria-expanded="true"] .block-search-wide__button-close:after {
  296. position: absolute;
  297. top: 50%;
  298. left: 50%;
  299. width: 1.6875rem;
  300. height: 0;
  301. content: "";
  302. border-top: solid 2px #fff;
  303. }
  304. .block-search-wide__button[aria-expanded="true"] .block-search-wide__button-close:before {
  305. transform: translate(-50%, -50%) rotate(-45deg);
  306. }
  307. .block-search-wide__button[aria-expanded="true"] .block-search-wide__button-close:after {
  308. transform: translate(-50%, -50%) rotate(45deg);
  309. }
  310. .block-search-wide__button[aria-expanded="true"] svg {
  311. display: none;
  312. }
  313. [dir="ltr"] .block-search-wide__button svg {
  314. margin-left: auto;
  315. }
  316. [dir="rtl"] .block-search-wide__button svg {
  317. margin-right: auto;
  318. }
  319. [dir="ltr"] .block-search-wide__button svg {
  320. margin-right: auto;
  321. }
  322. [dir="rtl"] .block-search-wide__button svg {
  323. margin-left: auto;
  324. }
  325. @media (forced-colors: active) {
  326. .block-search-wide__button {
  327. background: ButtonFace;
  328. }
  329. .block-search-wide__button path {
  330. fill: ButtonText;
  331. }
  332. }
  333. /* Provide rudimentary access to site search if JS is disabled. */
  334. html:not(.js) .search-block-form:focus-within .block-search-wide__wrapper {
  335. visibility: visible;
  336. max-height: 9rem;
  337. }
  338. /* Necessary to override specificity of transpiled PostCSS properties from default input focus styling. */
  339. [dir] .block-search-wide__wrapper input[type="search"] {
  340. background-color: transparent;
  341. background-image: linear-gradient(#2494db, #2494db); /* Two values are needed for IE11 support. */
  342. background-repeat: no-repeat;
  343. background-position: bottom left; /* LTR */
  344. background-size: 0% 0.625rem;
  345. }
  346. [dir] .block-search-wide__wrapper input[type="search"]:focus {
  347. background-size: 100% 0.5625rem;
  348. }
  349. [dir="rtl"] .block-search-wide__wrapper input[type="search"] {
  350. background-position: bottom right;
  351. }
  352. [dir="rtl"] .block-search-wide__wrapper .search-form__submit .icon--search:after {
  353. transform-origin: right;
  354. }
  355. @media (min-width: 75rem) {
  356. body:not(.is-always-mobile-nav) .block-search-wide__wrapper,
  357. body:not(.is-always-mobile-nav) .block-search-wide__button {
  358. display: block;
  359. }
  360. }

Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.