Closed nikhilweee closed 8 months ago
Turns out I can do this if I use !important
, but is there any other way?
input::placeholder {
opacity: 0.5 !important;
}
If you scope it tighter it will override Pagefind's style. e.g. something like
.your-body-class .pagefind-ui__search-input::placeholder {
opacity: 0.5;
}
Where .your-body-class
is some classname you already have on your page.
Should take precedence over Pagefind's selector. .pagefind-ui__search-input
is the classname you want to target 🙂
Since the placeholder is hidden behind a shadow root, is there a way to apply custom CSS to the search input placeholder?