fresh icon indicating copy to clipboard operation
fresh copied to clipboard

Auto appending a data attribute for search parameters

Open h4-h opened this issue 2 years ago • 0 comments

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

h4-h avatar Jan 07 '24 10:01 h4-h