-
Notifications
You must be signed in to change notification settings - Fork 2
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
Propose styles folder structure and file naming conventions #2
Comments
Here's what I'm trying to accomplish here: Current suggestions:Option 1:
Option 2:
Items marked with a * are optional/may not always be needed. /pages is only needed if you have one-off CSS, which we should try to avoid whenever possible. Option 1 would require a lot of diligence to identify what kind of pattern is what, and where it should go. While academically I think it's a good idea, it could just lead to things being hard to find. Option 2 is closest to what I use now. It assumes our CSS is one of four things:
Both options leverage the idea that patterns should be focused and go from a general-to-specific order inside the patterns folder, and that layout/positioning concerns be removed altogether from those elements' files. That is, a form should never care about where/how it's being positioned. We should have other CSS in the layout file(s) that takes care of that. |
Regarding naming conventions, I'm going to go to bat for BEM. I think it dovetails well with atomic design, it makes it very clear what CSS is responsible for what, and I think it takes the guesswork out of what a class name should be. All of these things are invaluable for team-based CSS creation. |
@beckkramer I see your point about Option 1 requiring a lot of diligence to identify where patterns should go, and then also causing some confusion when trying to find a pattern... I was originally on board for Option 1 but when considering that, Option 2 might be the way to go. |
No description provided.
The text was updated successfully, but these errors were encountered: