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

Auto appending a data attribute for search parameters #2215

Open
h4-h opened this issue Jan 7, 2024 · 0 comments
Open

Auto appending a data attribute for search parameters #2215

h4-h opened this issue Jan 7, 2024 · 0 comments

Comments

@h4-h
Copy link

h4-h commented Jan 7, 2024

There is already a feature for automatically add a data attribute for matching urls and I think this is awesome feature. You can find the source code in the runtime/active_url.ts file.

And I suggest add something like this for search parameters:

tailwind:

data-[param-<name>-<exact|includes>=<value>]:<style>

css:

element[data-param-<name>-<exact|includes>=<value>] {
  <style>
}

Example:
url: /search?q=shirt&size=xl
data-[param-size-exact=x] = false
data-[param-size-exact=xl] = true
data-[param-size-includes=x] = true

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
1 participant