header-search-narrow.css

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

Header Search Narrow Block.

File

core/themes/olivero/css/components/header-search-narrow.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 Narrow Block.
  10. */
  11. .block-search-narrow {
  12. margin-right: -1.125rem;
  13. margin-bottom: 2.25rem;
  14. margin-left: -1.125rem;
  15. background: #000;
  16. }
  17. .block-search-narrow .search-block-form {
  18. display: flex;
  19. }
  20. .block-search-narrow .form-item {
  21. flex-grow: 1;
  22. margin: 0;
  23. }
  24. .block-search-narrow .form-actions {
  25. margin: 0;
  26. }
  27. [dir="ltr"] .block-search-narrow input[type="search"] {
  28. padding-left: 1.125rem;
  29. }
  30. [dir="rtl"] .block-search-narrow input[type="search"] {
  31. padding-right: 1.125rem;
  32. }
  33. [dir="ltr"] .block-search-narrow input[type="search"] {
  34. padding-right: 1.125rem;
  35. }
  36. [dir="rtl"] .block-search-narrow input[type="search"] {
  37. padding-left: 1.125rem;
  38. }
  39. .block-search-narrow input[type="search"] {
  40. width: calc(100% + 2.25rem);
  41. height: 3.375rem;
  42. padding-top: 0;
  43. padding-bottom: 0;
  44. transition: background-size 0.4s;
  45. color: #fff;
  46. border: solid 1px transparent;
  47. background-color: transparent;
  48. background-image: linear-gradient(#2494db, #2494db); /* Two values are needed for IE11 support. */
  49. background-repeat: no-repeat;
  50. background-position: bottom left; /* LTR */
  51. background-size: 0% 0.3125rem;
  52. box-shadow: none;
  53. font-family: Lora, georgia, serif;
  54. font-size: 1rem;
  55. -webkit-appearance: none;
  56. }
  57. .block-search-narrow input[type="search"]::-ms-clear {
  58. width: 2.5rem;
  59. opacity: 0.5;
  60. }
  61. .block-search-narrow input[type="search"]:focus {
  62. outline: solid 4px transparent;
  63. outline-offset: -4px;
  64. background-size: 100% 0.3125rem;
  65. /*
  66. We normally indicate focus by animating background-image width. This isn't
  67. available in IE11 when in Windows high contrast mode.
  68. */
  69. }
  70. @media screen and (-ms-high-contrast: active) {
  71. .block-search-narrow input[type="search"]:focus {
  72. border-bottom-width: 5px;
  73. }
  74. }
  75. @media (min-width: 43.75rem) {
  76. [dir="ltr"] .block-search-narrow input[type="search"] {
  77. padding-left: 2.25rem;
  78. }
  79. [dir="rtl"] .block-search-narrow input[type="search"] {
  80. padding-right: 2.25rem;
  81. }
  82. [dir="ltr"] .block-search-narrow input[type="search"] {
  83. padding-right: 2.25rem;
  84. }
  85. [dir="rtl"] .block-search-narrow input[type="search"] {
  86. padding-left: 2.25rem;
  87. }
  88. .block-search-narrow input[type="search"] {
  89. height: 4.5rem;
  90. }
  91. }
  92. [dir="ltr"] .block-search-narrow .search-form__submit {
  93. margin-left: 0;
  94. }
  95. [dir="rtl"] .block-search-narrow .search-form__submit {
  96. margin-right: 0;
  97. }
  98. [dir="ltr"] .block-search-narrow .search-form__submit {
  99. margin-right: 0;
  100. }
  101. [dir="rtl"] .block-search-narrow .search-form__submit {
  102. margin-left: 0;
  103. }
  104. [dir="ltr"] .block-search-narrow .search-form__submit {
  105. padding-left: 0;
  106. }
  107. [dir="rtl"] .block-search-narrow .search-form__submit {
  108. padding-right: 0;
  109. }
  110. [dir="ltr"] .block-search-narrow .search-form__submit {
  111. padding-right: 0;
  112. }
  113. [dir="rtl"] .block-search-narrow .search-form__submit {
  114. padding-left: 0;
  115. }
  116. .block-search-narrow .search-form__submit {
  117. position: relative;
  118. overflow: hidden;
  119. -ms-grid-row-align: stretch;
  120. align-self: stretch;
  121. width: 3.375rem;
  122. height: auto;
  123. margin-top: 0;
  124. margin-bottom: 0;
  125. padding-top: 0;
  126. padding-bottom: 0;
  127. cursor: pointer;
  128. border-color: transparent;
  129. background-color: transparent;
  130. /*
  131. When in Windows high contrast mode, FF will not output either background
  132. images or SVGs that are nested directly within a element, so we add a .
  133. */
  134. }
  135. [dir="ltr"] .block-search-narrow .search-form__submit .icon--search {
  136. left: 0;
  137. }
  138. [dir="rtl"] .block-search-narrow .search-form__submit .icon--search {
  139. right: 0;
  140. }
  141. .block-search-narrow .search-form__submit .icon--search {
  142. position: absolute;
  143. top: 0;
  144. display: block;
  145. width: 100%; /* Width of the SVG background image. */
  146. height: 100%;
  147. pointer-events: none;
  148. 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");
  149. background-repeat: no-repeat;
  150. background-position: center;
  151. background-size: auto;
  152. }
  153. [dir="ltr"] .block-search-narrow .search-form__submit .icon--search:after {
  154. left: 0;
  155. }
  156. [dir="rtl"] .block-search-narrow .search-form__submit .icon--search:after {
  157. right: 0;
  158. }
  159. .block-search-narrow .search-form__submit .icon--search:after {
  160. position: absolute;
  161. bottom: 0;
  162. width: 100%;
  163. height: 0;
  164. content: "";
  165. transition: transform 0.2s;
  166. transform: scaleX(0);
  167. transform-origin: left; /* LTR */
  168. border-top: solid 0.3125rem #2494db;
  169. }
  170. @media (forced-colors: active) {
  171. .block-search-narrow .search-form__submit .icon--search {
  172. background: buttontext;
  173. -webkit-mask-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");
  174. mask-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");
  175. -webkit-mask-repeat: no-repeat;
  176. mask-repeat: no-repeat;
  177. -webkit-mask-position: center;
  178. mask-position: center;
  179. }
  180. }
  181. .block-search-narrow .search-form__submit:focus {
  182. outline: solid 4px transparent;
  183. outline-offset: -4px;
  184. box-shadow: none;
  185. }
  186. .block-search-narrow .search-form__submit:focus span:after {
  187. transform: scaleX(1);
  188. }
  189. @media screen and (-ms-high-contrast: active) {
  190. .block-search-narrow .search-form__submit:focus {
  191. border-bottom-width: 9px;
  192. }
  193. .block-search-narrow .search-form__submit:focus span:after {
  194. content: none;
  195. }
  196. }
  197. @media (min-width: 43.75rem) {
  198. .block-search-narrow .search-form__submit {
  199. width: 5rem;
  200. }
  201. }
  202. @media screen and (-ms-high-contrast: active) {
  203. /* IE11's high contrast show will not show the background image, so we show the text. */
  204. .block-search-narrow .search-form__submit .visually-hidden {
  205. position: static;
  206. overflow: visible;
  207. clip: auto;
  208. width: auto;
  209. height: auto;
  210. text-align: center;
  211. }
  212. /* Edge's high contrast does show the background image, so we hide it. */
  213. .block-search-narrow .search-form__submit .icon--search {
  214. display: none;
  215. }
  216. }
  217. /* 500px is the width of the primary nav at mobile. */
  218. @media (min-width: 31.25rem) {
  219. [dir="ltr"] .block-search-narrow {
  220. margin-left: 0;
  221. }
  222. [dir="rtl"] .block-search-narrow {
  223. margin-right: 0;
  224. }
  225. [dir="ltr"] .block-search-narrow {
  226. margin-right: 0;
  227. }
  228. [dir="rtl"] .block-search-narrow {
  229. margin-left: 0;
  230. }
  231. }
  232. @media (min-width: 75rem) {
  233. body:not(.is-always-mobile-nav) .block-search-narrow {
  234. display: none;
  235. }
  236. }
  237. [dir="rtl"] .block-search-narrow input[type="search"] {
  238. background-position: bottom right;
  239. }
  240. [dir="rtl"] .block-search-narrow .search-form__submit .icon--search:after {
  241. transform-origin: right;
  242. }

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