diff --git a/themes/fid_bbi/scss/blocks/search.scss b/themes/fid_bbi/scss/blocks/search.scss index 412f366b3691201eb9e9b3401283d7ebfc1702c4..cc2d454d2fc952d78d535c6d536d55f57ea4dc5b 100644 --- a/themes/fid_bbi/scss/blocks/search.scss +++ b/themes/fid_bbi/scss/blocks/search.scss @@ -85,13 +85,10 @@ cursor: pointer; } - .icon { - height: g(1.5); - width: g(1.5); - padding: g(.25); - } - input { + opacity: 0; + position: absolute; + @include hover { ~ .icon { background: $shade; @@ -104,6 +101,12 @@ } } + .icon { + height: g(1.5); + width: g(1.5); + padding: g(.25); + } + :checked ~ .icon path { fill: currentColor; } diff --git a/themes/fid_bbi/templates/layout/layout.phtml b/themes/fid_bbi/templates/layout/layout.phtml index 610fe11e98a223a49189438ad42e06ec57680b4d..b54501eba4f82de3ccc10559f3992fa415229f3a 100644 --- a/themes/fid_bbi/templates/layout/layout.phtml +++ b/themes/fid_bbi/templates/layout/layout.phtml @@ -81,7 +81,7 @@ <script> // For styling checkbox and radio inputs, the label must be appended to the // input, but Zend only generates inputs within labels. - const checkboxRadioInputs = document.querySelectorAll('[type=checkbox], [type=radio]') + const checkboxRadioInputs = document.querySelectorAll('main [type=checkbox], main [type=radio]') for (let i = 0; i < checkboxRadioInputs.length; i++) { const input = checkboxRadioInputs[i] const parent = input.parentNode