Add prefix to the CSS selectors
yuezk opened this issue · 3 comments
Thanks for your awesome project.
Since the CSS selectors are too general, it's very easy to conflict with an existing project codebase. I think it's better to add a prefix to the CSS selectors, and after that, the integration may become easier.
Thanks, Kevin!
The idea behind not using classes or ids is that users wouldn't have to delete the name in favor of something else, they can just add one if needed. I'll entertain the idea of using class names though, I do agree that in some cases it may simplify CSS selectors.
People should not copy generated classes inside their project if they're following a naming convention. Any generated class might no be suitable with naming convetion used by devs. For example, if this site generate .fx-bubble
and the destination project is using BEM, the selector should be renamed to match the BEM syntax (and the isn't just one syntax). At the end, this tool shoud just provide a placeholder selector that users must replace.
Agreed, this was the intention from the start. In some cases, classes are needed to differentiate elements, but I've tried to keep class names and ids to a minimum.