search.css 3.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158
  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: background-color 0.5s ease;
  120. transition: border 0.5s ease;
  121. color: #000;
  122. border: 2px solid #fff;
  123. background-color: #fff;
  124. font-size: 0.875rem;
  125. }
  126. @media screen and (min-width: 48em) {
  127. .search-block-form .form-submit {
  128. border-top-left-radius: 0; /* LTR */
  129. border-bottom-left-radius: 0; /* LTR */
  130. }
  131. [dir=rtl] .search-block-form .form-submit {
  132. border-top-left-radius: 3px;
  133. border-top-right-radius: 0;
  134. border-bottom-right-radius: 0;
  135. border-bottom-left-radius: 3px;
  136. }
  137. }
  138. .search-block-form .form-submit:focus,
  139. .search-block-form .form-submit:hover {
  140. margin: 0;
  141. border: 2px solid #008068;
  142. outline-offset: 2px;
  143. background-color: #e6eee0;
  144. }