search.css

Same filename in other branches
  1. 7.x modules/search/search.css
  2. 9 core/profiles/demo_umami/themes/umami/css/components/blocks/search/search.css
  3. 8.9.x core/profiles/demo_umami/themes/umami/css/components/blocks/search/search.css
  4. 10 core/profiles/demo_umami/themes/umami/css/components/blocks/search/search.css

This file is used to style the search block.

File

core/profiles/demo_umami/themes/umami/css/components/blocks/search/search.css

View source
  1. /**
  2. * @file
  3. * This file is used to style the search block.
  4. */
  5. .search-block-form {
  6. display: none;
  7. }
  8. @media screen and (min-width: 48em) {
  9. .search-block-form {
  10. display: block;
  11. }
  12. }
  13. .search-block-form form {
  14. display: flex;
  15. margin-top: 1.3rem;
  16. margin-bottom: 1.2rem;
  17. }
  18. .search-iconwrap {
  19. /* Compensate for focus styling that offsets left alignment of icon */
  20. margin-left: -7px;
  21. }
  22. @media screen and (min-width: 48em) {
  23. .search-iconwrap {
  24. display: none;
  25. }
  26. }
  27. /* Search icon for mobile */
  28. .search-link {
  29. display: flex;
  30. align-items: center;
  31. justify-content: flex-end;
  32. width: 40px;
  33. height: 40px;
  34. /* Centres the icon when focused/hovered */
  35. margin-right: -7px;
  36. padding-right: 7px;
  37. }
  38. .search-link:focus,
  39. .search-link:hover {
  40. background-color: #fff;
  41. }
  42. .search-link svg {
  43. display: block;
  44. width: 26px;
  45. height: auto;
  46. }
  47. /* Search input */
  48. .search-block-form .form-type-search {
  49. margin-top: 0;
  50. margin-bottom: 0;
  51. border: 1px solid #dbdbdb;
  52. border-top-left-radius: 3px; /* LTR */
  53. border-bottom-right-radius: 3px; /* LTR */
  54. }
  55. [dir="rtl"] .search-block-form .form-type-search {
  56. border-top-left-radius: 0;
  57. border-top-right-radius: 3px;
  58. border-bottom-right-radius: 3px;
  59. border-bottom-left-radius: 0;
  60. }
  61. .search-block-form .form-search {
  62. width: auto;
  63. height: auto;
  64. margin: 0;
  65. padding: 7px 8px 7px 32px;
  66. color: #464646;
  67. border: 2px solid #fff;
  68. background: url(../../../../images/svg/search.svg) no-repeat 0.5em center #fff;
  69. font-size: 0.875rem;
  70. line-height: normal;
  71. }
  72. @media screen and (min-width: 48em) {
  73. .search-block-form .form-search {
  74. width: 20rem;
  75. }
  76. }
  77. .search-block-form .form-search:focus {
  78. border: 2px solid #008068;
  79. border-top-left-radius: 2px; /* LTR */
  80. border-bottom-left-radius: 2px; /* LTR */
  81. }
  82. [dir="rtl"] .search-block-form .form-search:focus {
  83. border-top-left-radius: 0;
  84. border-top-right-radius: 2px;
  85. border-bottom-right-radius: 2px;
  86. border-bottom-left-radius: 0;
  87. }
  88. .form-search::placeholder {
  89. opacity: 1;
  90. }
  91. .form-type-search .form-search {
  92. box-sizing: border-box; /* Override input[type="search"] of normalize.css */
  93. }
  94. /* Search submit */
  95. .search-block-form .form-actions {
  96. position: relative;
  97. margin: 0;
  98. padding: 0;
  99. border-top: 1px solid #dbdbdb;
  100. border-right: 1px solid #dbdbdb; /* LTR */
  101. border-bottom: 1px solid #dbdbdb;
  102. border-top-right-radius: 3px; /* LTR */
  103. border-bottom-right-radius: 3px; /* LTR */
  104. }
  105. [dir="rtl"] .search-block-form .form-actions {
  106. border-right: none;
  107. border-left: 1px solid #dbdbdb;
  108. border-top-left-radius: 3px;
  109. border-top-right-radius: 0;
  110. border-bottom-right-radius: 0;
  111. border-bottom-left-radius: 3px;
  112. }
  113. .search-block-form .form-actions .button {
  114. margin: 0;
  115. }
  116. .search-block-form .form-submit {
  117. margin: 0;
  118. padding: 0.6em 1.25em 0.4em;
  119. transition:
  120. background-color 0.5s ease,
  121. border 0.5s ease;
  122. color: #000;
  123. border: 2px solid #fff;
  124. background-color: #fff;
  125. font-size: 0.875rem;
  126. }
  127. @media screen and (min-width: 48em) {
  128. .search-block-form .form-submit {
  129. border-top-left-radius: 0; /* LTR */
  130. border-bottom-left-radius: 0; /* LTR */
  131. }
  132. [dir="rtl"] .search-block-form .form-submit {
  133. border-top-left-radius: 3px;
  134. border-top-right-radius: 0;
  135. border-bottom-right-radius: 0;
  136. border-bottom-left-radius: 3px;
  137. }
  138. }
  139. .search-block-form .form-submit:focus,
  140. .search-block-form .form-submit:hover {
  141. margin: 0;
  142. border: 2px solid #008068;
  143. outline-offset: 2px;
  144. background-color: #e6eee0;
  145. }

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