header-search-wide.css

Same filename in other branches
  1. 9 core/themes/olivero/css/components/header-search-wide.css
  2. 10 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. .block-search-wide__wrapper {
  16. position: absolute;
  17. z-index: 1; /* Ensure left border shows above social region in IE11. */
  18. inset-block-start: 100%;
  19. inset-inline-start: calc(-1 * var(--content-left));
  20. display: none;
  21. visibility: hidden;
  22. overflow: hidden;
  23. width: calc(100% + var(--content-left));
  24. max-width: var(--max-bg-color);
  25. height: var(--sp8);
  26. max-height: 0;
  27. margin-block: 0;
  28. margin-inline-start: 0;
  29. margin-inline-end: 0;
  30. padding-block: 0;
  31. padding-inline-start: 0;
  32. padding-inline-end: 0;
  33. transition: all 0.2s;
  34. border-inline-start: solid var(--content-left) var(--color--gray-20);
  35. background: var(--color--black);
  36. }
  37. .block-search-wide__wrapper.is-active {
  38. visibility: visible;
  39. max-height: var(--sp8);
  40. }
  41. .block-search-wide__wrapper form {
  42. display: flex;
  43. grid-column: 1 / 14;
  44. }
  45. .block-search-wide__wrapper input[type="search"] {
  46. width: calc(100% + var(--sp2));
  47. height: var(--sp8);
  48. padding-block: 0;
  49. padding-inline-start: var(--sp12);
  50. padding-inline-end: 0;
  51. transition: background-size 0.4s;
  52. color: var(--color--white);
  53. border: solid 1px transparent;
  54. box-shadow: none;
  55. font-family: var(--font-serif);
  56. font-size: 2rem;
  57. -webkit-appearance: none;
  58. }
  59. .block-search-wide__wrapper input[type="search"]:focus {
  60. outline: solid 4px transparent;
  61. outline-offset: -4px;
  62. }
  63. .block-search-wide__wrapper .form-item-keys {
  64. flex-grow: 1;
  65. margin: 0;
  66. }
  67. .block-search-wide__wrapper .form-actions {
  68. display: flex;
  69. margin: 0;
  70. }
  71. .block-search-wide__wrapper .search-form__submit {
  72. position: relative;
  73. overflow: hidden;
  74. align-self: stretch;
  75. width: 6.25rem;
  76. height: auto;
  77. margin-block: 0;
  78. margin-inline-start: 0;
  79. margin-inline-end: 0;
  80. padding-block: 0;
  81. padding-inline-start: 0;
  82. padding-inline-end: 0;
  83. cursor: pointer;
  84. border-color: transparent;
  85. background-color: transparent;
  86. /*
  87. When in Windows high contrast mode, FF will not output either background
  88. images or SVGs that are nested directly within a element, so we add a .
  89. */
  90. }
  91. .block-search-wide__wrapper .search-form__submit .icon--search {
  92. position: absolute;
  93. inset-block-start: 0;
  94. inset-inline-end: 0;
  95. display: block;
  96. width: 1.5rem; /* Width of the SVG background image. */
  97. height: 100%;
  98. pointer-events: none;
  99. 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");
  100. background-repeat: no-repeat;
  101. background-position: center;
  102. background-size: contain;
  103. }
  104. .block-search-wide__wrapper .search-form__submit .icon--search::after {
  105. position: absolute;
  106. inset-block-end: 0;
  107. inset-inline-start: 0;
  108. width: 100%;
  109. height: 0;
  110. content: "";
  111. transition: transform 0.2s;
  112. transform: scaleX(0);
  113. transform-origin: left;
  114. border-block-start: solid var(--sp0-5) var(--color--primary-50);
  115. }
  116. .block-search-wide__wrapper .search-form__submit:focus {
  117. outline: solid 4px transparent;
  118. outline-offset: -4px;
  119. box-shadow: none;
  120. }
  121. .block-search-wide__wrapper .search-form__submit:focus span::after {
  122. transform: scaleX(1);
  123. }
  124. @media screen and (-ms-high-contrast: active) {
  125. .block-search-wide__wrapper .search-form__submit:focus {
  126. border-bottom-width: var(--sp0-5);
  127. }
  128. .block-search-wide__wrapper .search-form__submit:focus span::after {
  129. content: none;
  130. }
  131. }
  132. @media screen and (-ms-high-contrast: active) {
  133. /* Edge's high contrast does show the background image, so we hide it. */
  134. .block-search-wide__wrapper .search-form__submit .icon--search {
  135. display: none;
  136. }
  137. }
  138. .block-search-wide__container {
  139. max-width: var(--max-width);
  140. padding-inline-end: var(--sp2);
  141. }
  142. .block-search-wide__grid {
  143. display: grid;
  144. grid-template-columns: repeat(var(--grid-col-count), 1fr);
  145. grid-column-gap: var(--grid-gap);
  146. }
  147. /* Override specificity from container-inline.module.css */
  148. .container-inline .block-search-wide__container {
  149. display: block;
  150. }
  151. .container-inline .block-search-wide__grid {
  152. display: grid;
  153. }
  154. .block-search-wide__button {
  155. position: relative;
  156. display: none;
  157. width: var(--sp3);
  158. height: var(--sp6);
  159. cursor: pointer;
  160. color: var(--color-text-neutral-loud); /* Affects SVG search icon. */
  161. border: 0;
  162. background: transparent;
  163. -webkit-appearance: none;
  164. }
  165. .block-search-wide__button:focus {
  166. position: relative;
  167. outline: 0;
  168. }
  169. .block-search-wide__button:focus::after {
  170. position: absolute;
  171. top: 50%;
  172. left: 50%;
  173. width: 80%;
  174. height: var(--sp3);
  175. content: "";
  176. transform: translate(-50%, -50%);
  177. border: solid 2px var(--color--primary-50);
  178. border-radius: 0.25rem;
  179. }
  180. .block-search-wide__button[aria-expanded="true"] {
  181. background: var(--color--black);
  182. }
  183. .block-search-wide__button[aria-expanded="true"]:focus::after {
  184. border-color: var(--color--white);
  185. }
  186. .block-search-wide__button[aria-expanded="true"] .block-search-wide__button-close::before,
  187. .block-search-wide__button[aria-expanded="true"] .block-search-wide__button-close::after {
  188. position: absolute;
  189. top: 50%;
  190. left: 50%;
  191. width: var(--sp1-5);
  192. height: 0;
  193. content: "";
  194. border-block-start: solid 2px var(--color--white);
  195. }
  196. .block-search-wide__button[aria-expanded="true"] .block-search-wide__button-close::before {
  197. transform: translate(-50%, -50%) rotate(-45deg);
  198. }
  199. .block-search-wide__button[aria-expanded="true"] .block-search-wide__button-close::after {
  200. transform: translate(-50%, -50%) rotate(45deg);
  201. }
  202. .block-search-wide__button[aria-expanded="true"] svg {
  203. display: none;
  204. }
  205. .block-search-wide__button svg {
  206. margin-inline-start: auto;
  207. margin-inline-end: auto;
  208. }
  209. @media (forced-colors: active) {
  210. .block-search-wide__button {
  211. background: ButtonFace;
  212. }
  213. .block-search-wide__button path {
  214. fill: ButtonText;
  215. }
  216. }
  217. /* Provide rudimentary access to site search if JS is disabled. */
  218. html:not(.js) .search-block-form:focus-within .block-search-wide__wrapper {
  219. visibility: visible;
  220. max-height: var(--sp8);
  221. }
  222. /* Necessary to override specificity of transpiled PostCSS properties from default input focus styling. */
  223. [dir] .block-search-wide__wrapper input[type="search"] {
  224. background-color: transparent;
  225. background-image: linear-gradient(var(--color--primary-50), var(--color--primary-50)); /* Two values are needed for IE11 support. */
  226. background-repeat: no-repeat;
  227. background-position: bottom left; /* LTR */
  228. background-size: 0% 0.625rem;
  229. }
  230. [dir] .block-search-wide__wrapper input[type="search"]:focus {
  231. background-size: 100% var(--sp0-5);
  232. }
  233. [dir="rtl"] .block-search-wide__wrapper input[type="search"] {
  234. background-position: bottom right;
  235. }
  236. [dir="rtl"] .block-search-wide__wrapper .search-form__submit .icon--search::after {
  237. transform-origin: right;
  238. }
  239. @media (min-width: 75rem) {
  240. body:not(.is-always-mobile-nav) .block-search-wide__wrapper,
  241. body:not(.is-always-mobile-nav) .block-search-wide__button {
  242. display: block;
  243. }
  244. }

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