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
As a web designer who writes a ton of scss, I'm excited to see element move toward SCSS in your newest 'carbon' branch! In that branch, I would like to discuss a change introduced in #6643.
For several reasons, I think it might be desirable for element-ui to use a more traditional BEM naming setup, where class names are written out in the source code directly. I noticed this problem with the current setup in master as well. SCSS mixins are certainly an improvement over the post-css bem plugin (because it is easier to figure out what is going on), but it still has some drawbacks, including:
Source code discoverability. If you inspect an element, see a class, and then try to find the resulting class in the source code, it is difficult because the name is being dynamically generated.
Disconnect between authored scss and finally output css.
The tradeoff here is loss of development speed, in that you could write selectors faster with this setup. I think clarity with class names and what not would be a good tradeoff and encourage adoption of the framework.
I'm sure there are good reasons for your current approach, and perhaps there is some tooling that would solve these issues, but I wanted to bring it up.
Thanks for making a great library!
The text was updated successfully, but these errors were encountered:
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.
Existing Component
Yes
Component Name
global
Description
Hi,
As a web designer who writes a ton of scss, I'm excited to see element move toward SCSS in your newest 'carbon' branch! In that branch, I would like to discuss a change introduced in #6643.
For several reasons, I think it might be desirable for element-ui to use a more traditional BEM naming setup, where class names are written out in the source code directly. I noticed this problem with the current setup in master as well. SCSS mixins are certainly an improvement over the post-css bem plugin (because it is easier to figure out what is going on), but it still has some drawbacks, including:
I'm sure there are good reasons for your current approach, and perhaps there is some tooling that would solve these issues, but I wanted to bring it up.
Thanks for making a great library!
The text was updated successfully, but these errors were encountered: