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

Use data attributes instead of js-* classes #125

Open
erolabzait opened this issue Sep 13, 2022 · 1 comment
Open

Use data attributes instead of js-* classes #125

erolabzait opened this issue Sep 13, 2022 · 1 comment
Labels
enhancement New feature or request

Comments

@erolabzait
Copy link

erolabzait commented Sep 13, 2022

Hello,

Thanks for your great work, i really appreciate the Tailwind integration.

Can you consider in the future using data attributes instead of js-* classes, with Tailwind it's kind of hard to spot them.

js-slideshow -> data-cd-slideshow / data-slideshow / data-*-slideshow
js-slideshow__item -> data-cd-slideshow-item / data-slideshow-item 

Or a custom cumponent approach without shadow dom.
https://github.com/Shopify/dawn/blob/main/snippets/cart-notification.liquid
https://github.com/Shopify/dawn/blob/main/assets/cart-notification.js

<cd-slideshow>
  <div data-slideshow-item></div>
  <div data-slideshow-item></div>
  <div data-slideshow-item></div>
</cd-slideshow>
@claudia-romano
Copy link
Contributor

Hi there, I see your point.
Yes, for the Tailwind version we can look into using data attributes rather than js classes. It will take some time to update all components though, but this is something we'll look into. Thanks for the suggestion!

@claudia-romano claudia-romano added the enhancement New feature or request label Sep 15, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants