You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Add $search-highlight-bg SCSS variable for search result highlight color #14148
Search result highlighting on destination pages (the ?q= parameter feature) uses bare <mark> elements, which inherit Bootstrap's default styling via $mark-bg / --bs-highlight-bg (yellow-100).
Users can already customize this through Bootstrap:
/*-- scss:defaults --*/$mark-bg: #d1ecf1;
or via CSS:
:root{--bs-highlight-bg:#d1ecf1;}
However, $mark-bg affects all <mark> elements on the page, not just search highlights. It would be useful to have a Quarto-specific SCSS variable like $search-highlight-bg that targets only search result marks, and is documented alongside other SCSS variables at https://quarto.org/docs/output-formats/html-themes.html#sass-variables.
This could be implemented by adding a CSS class to the <mark> elements created in quarto-search.js (line 1138):
Activity