Skip to content

Commit 74d89f2

Browse files
author
JoelCDL
committed
Add search comp styles if popovers aren’t supported
Display header search form and hide search toggle button with a no-popover class if popover API isn’t supported in the browser. The no-popover class is automatically removed if the popover API is supported; see 657e593 for this change.
1 parent 657e593 commit 74d89f2

1 file changed

Lines changed: 16 additions & 0 deletions

File tree

src/css/components/search.css

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -67,6 +67,22 @@
6767
mask: url('data-url:npm:fa-solid/magnifying-glass.svg') center / contain;
6868
}
6969

70+
/* If popover API isn't supported: */
71+
72+
html.no-popover {
73+
.c-search-form {
74+
display: flex;
75+
width: auto;
76+
height: auto;
77+
margin-inline-end: unset;
78+
opacity: 1;
79+
}
80+
81+
.c-search-toggle {
82+
display: none;
83+
}
84+
}
85+
7086
@media (width > 45rem) {
7187
.c-search-form {
7288
&:popover-open {

0 commit comments

Comments
 (0)