header-search-narrow.css

Same filename in other branches
  1. 9 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-inline: calc(-1 * var(--sp));
  13. margin-block-end: var(--sp2);
  14. background: var(--color--black);
  15. }
  16. .block-search-narrow .search-block-form {
  17. display: flex;
  18. }
  19. .block-search-narrow .form-item {
  20. flex-grow: 1;
  21. margin: 0;
  22. }
  23. .block-search-narrow .form-actions {
  24. margin: 0;
  25. }
  26. .block-search-narrow input[type="search"] {
  27. width: calc(100% + var(--sp2));
  28. height: var(--sp3);
  29. padding-block: 0;
  30. padding-inline-start: var(--sp);
  31. padding-inline-end: var(--sp);
  32. transition: background-size 0.4s;
  33. color: var(--color--white);
  34. border: solid 1px transparent;
  35. background-color: transparent;
  36. background-image: linear-gradient(var(--color--primary-50), var(--color--primary-50)); /* Two values are needed for IE11 support. */
  37. background-repeat: no-repeat;
  38. background-position: bottom left; /* LTR */
  39. background-size: 0% 0.3125rem;
  40. box-shadow: none;
  41. font-family: var(--font-serif);
  42. font-size: 1rem;
  43. -webkit-appearance: none;
  44. }
  45. .block-search-narrow input[type="search"]:focus {
  46. outline: solid 4px transparent;
  47. outline-offset: -4px;
  48. background-size: 100% 0.3125rem;
  49. }
  50. @media (min-width: 43.75rem) {
  51. .block-search-narrow input[type="search"] {
  52. height: var(--sp4);
  53. padding-inline-start: var(--sp2);
  54. padding-inline-end: var(--sp2);
  55. }
  56. }
  57. .block-search-narrow .search-form__submit {
  58. position: relative;
  59. overflow: hidden;
  60. align-self: stretch;
  61. width: var(--sp3);
  62. height: auto;
  63. margin-block: 0;
  64. margin-inline-start: 0;
  65. margin-inline-end: 0;
  66. padding-block: 0;
  67. padding-inline-start: 0;
  68. padding-inline-end: 0;
  69. cursor: pointer;
  70. border-color: transparent;
  71. background-color: transparent;
  72. /*
  73. When in Windows high contrast mode, FF will not output either background
  74. images or SVGs that are nested directly within a element, so we add a .
  75. */
  76. }
  77. .block-search-narrow .search-form__submit .icon--search {
  78. position: absolute;
  79. inset-block-start: 0;
  80. inset-inline-start: 0;
  81. display: block;
  82. width: 100%; /* Width of the SVG background image. */
  83. height: 100%;
  84. pointer-events: none;
  85. 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");
  86. background-repeat: no-repeat;
  87. background-position: center;
  88. background-size: auto;
  89. }
  90. .block-search-narrow .search-form__submit .icon--search::after {
  91. position: absolute;
  92. inset-block-end: 0;
  93. inset-inline-start: 0;
  94. width: 100%;
  95. height: 0;
  96. content: "";
  97. transition: transform 0.2s;
  98. transform: scaleX(0);
  99. transform-origin: left; /* LTR */
  100. border-block-start: solid 0.3125rem var(--color--primary-50);
  101. }
  102. @media (forced-colors: active) {
  103. .block-search-narrow .search-form__submit .icon--search {
  104. background: buttontext;
  105. -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");
  106. 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");
  107. -webkit-mask-repeat: no-repeat;
  108. mask-repeat: no-repeat;
  109. -webkit-mask-position: center;
  110. mask-position: center;
  111. }
  112. }
  113. .block-search-narrow .search-form__submit:focus {
  114. outline: solid 4px transparent;
  115. outline-offset: -4px;
  116. box-shadow: none;
  117. }
  118. .block-search-narrow .search-form__submit:focus span::after {
  119. transform: scaleX(1);
  120. }
  121. @media screen and (-ms-high-contrast: active) {
  122. .block-search-narrow .search-form__submit:focus {
  123. border-bottom-width: var(--sp0-5);
  124. }
  125. .block-search-narrow .search-form__submit:focus span::after {
  126. content: none;
  127. }
  128. }
  129. @media (min-width: 43.75rem) {
  130. .block-search-narrow .search-form__submit {
  131. width: 5rem;
  132. }
  133. }
  134. @media screen and (-ms-high-contrast: active) {
  135. /* IE11's high contrast show will not show the background image, so we show the text. */
  136. .block-search-narrow .search-form__submit .visually-hidden {
  137. position: static;
  138. overflow: visible;
  139. clip: auto;
  140. width: auto;
  141. height: auto;
  142. text-align: center;
  143. }
  144. /* Edge's high contrast does show the background image, so we hide it. */
  145. .block-search-narrow .search-form__submit .icon--search {
  146. display: none;
  147. }
  148. }
  149. /* 500px is the width of the primary nav at mobile. */
  150. @media (min-width: 31.25rem) {
  151. .block-search-narrow {
  152. margin-inline-start: 0;
  153. margin-inline-end: 0;
  154. }
  155. }
  156. @media (min-width: 75rem) {
  157. body:not(.is-always-mobile-nav) .block-search-narrow {
  158. display: none;
  159. }
  160. }
  161. [dir="rtl"] .block-search-narrow input[type="search"] {
  162. background-position: bottom right;
  163. }
  164. [dir="rtl"] .block-search-narrow .search-form__submit .icon--search::after {
  165. transform-origin: right;
  166. }

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