You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I use the BEM style naming despite svelte making class names unique with something like svelte-1wpmmks, I do this so things are clearly grouped.
Describe the solution you'd like
However I would find it more useful if the generated class included the component name such as buttton-svelte-1wpmmks for example.
How important is this feature to you?
I think about this on every project and although it isn't life changing it would allow for tidier css without losing the additional readability that class grouping gives you.
Thanks for reading!
The text was updated successfully, but these errors were encountered:
This would add a not-insignificant amount of bytes to the CSS and HTML.
There was a proposal once about having control over the generated class names (#570).
What I would suggest is that the default stays as is svelte-* and there is a hook to allow changing that generated name, which would have access to a context object which might contain the component name along with some other information.
That way you could generate whatever names were useful to you.
I use the BEM style naming despite svelte making class names unique with something like
svelte-1wpmmks
, I do this so things are clearly grouped.Describe the solution you'd like
However I would find it more useful if the generated class included the component name such as
buttton-svelte-1wpmmks
for example.How important is this feature to you?
I think about this on every project and although it isn't life changing it would allow for tidier css without losing the additional readability that class grouping gives you.
Thanks for reading!
The text was updated successfully, but these errors were encountered: