Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

UI: Add data-pagefind-meta attribute on repeatable UX elements #742

Open
regisphilibert opened this issue Nov 19, 2024 · 1 comment
Open
Labels
improvement Not a bug Pagefind UI The prebuilt Pagefind UI components

Comments

@regisphilibert
Copy link

Currently it's impossible to CSS target a result tag based on the meta it holds as its produced html is simply:

<li class="pagefind-ui__result-tag svelte-xxxx">Genre: Litterature</li>

By adding a simple attribute to it, it would allow users to style them differently based on the meta.

The following would enable CSS targeting for repeatable elements such as result tags.

<li class="pagefind-ui__result-tag svelte-xxxx" data-pagefind-meta="Genre">Genre: Litterature</li>

This could also be applied to

  • . pagefind-ui__filter-block
  • Other repeatable elements I'm not aware of :)
@bglw
Copy link
Contributor

bglw commented Nov 19, 2024

Great idea! Will do.

@bglw bglw added improvement Not a bug Pagefind UI The prebuilt Pagefind UI components labels Nov 19, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
improvement Not a bug Pagefind UI The prebuilt Pagefind UI components
Projects
None yet
Development

No branches or pull requests

2 participants