Decathlon / vitamin-web

Decathlon Design System UI components for web applications
https://decathlon.github.io/vitamin-web
Apache License 2.0
279 stars 77 forks source link

refactor(@vtmn/css): Tailwind CSS classes should not be prefixed with vtmn- #1375

Closed tkrotoff closed 1 year ago

tkrotoff commented 1 year ago

Example: flex vs vtmn-flex

Rationals:

(Btw when needed use a shorter prefix likevt- instead of vtmn-, for ex Bootstrap uses bs for data-* and CSS variables instead boot)

Source code where the prefix is added: https://github.com/Decathlon/vitamin-web/blob/a5505a9ff88b1310f5a18046d0d2e45c7c7d9363/packages/sources/css/presets/tailwind/index.js#L4

lauthieb commented 1 year ago

Hi @tkrotoff,

Thanks a lot for your proposal and I agree about cognitive overhead and the fact that some CSS classes are verbose...

Unfortunately for now it would be impossible for us to change this in this version of Vitamin because we cover 10,000-100,000 lines of code that would causes breaking changes and a lot of refactoring for consumers that uses this library since 2020.

That's why I tag you your issue "Next" in order to take in account your proposition for our next major release that we currently build.

Thank you very much.

tkrotoff commented 1 year ago

impossible for us to change this

=> smooth transition

Meantime is there a hack to avoid polluting my code with vtmn- all over the place?

lauthieb commented 1 year ago

Hi @tkrotoff, I'll answer you on Slack :)

thibault-mahe commented 1 year ago

Hi @tkrotoff, thanks for you suggestions here :) As we discussed, there will be some changes regarding Tailwind and the naming of css classes (we'll opt for the shorter vt- prefix) in the next version of Vitamin we are working on.

I'm closing this issue for now, thanks again!