[Split Topic – Original Post]
The original post has been by @aertmann – which you can find at JS refactoring of the backend. After our meeting, we decided we should split apart the topics instead, so I (@sebastian) split up the discussions.
Answer by Tyll
The first post was related to JS, now I’ll wrap up my proposals for the Sass/CSS part.
As stated in the last section, we should definitely move from Compass to Autoprefixer, this is more future proof and reliable to say the least.
I saw you’ve noted the grunt-combine-media-queries plugin @aertmann. Isn’t this dangerous? Since it will re-order your final CSS, thus opens doors for side-effects. We should also take into aspect that media-queries are perfectly gzipp’able, so we don’t have a big performance issue here.
BEM is super usefull, and reduces the complexity of CSS to a bare minimum. Other than that, I would vote for OOCSS and the Atomic-Design Categorization-Model, since it is abstract and works like a charm with OOCSS and BEM.
We can take a peak at the Sass-Framework we at sitegeist use and develop
This could be a prime example on how we could structure/and build up our styles. I also do have a separate feature-branch which solves the ugly namespace & BEM repetition.
This would solve your ‘Automated neos- prefixing?’ point in the GoogleDoc.
General full reset CSS?
This would lead to applying global CSS to all user created site packages. Thus creating side effects and unwanted stylings in the backend.
Instead I would only bind styles to classes. This should be the highest priority since only with this approach we can reduce mismatched/unwanted stylings/resets.
In short: Maybe use a CSS Reset/Normalize, but make sure to apply it only to your classes, and not on plain HTML elements like
form, input ...
I would suggest using the above linked Brics framework. Using Brics we don’t need to follow the methodologies of others, f.e. Boostrap doesn’t use BEM or OOCSS at all. Foundation neither.
Brics is encapsulated and extensible. You can remove one Molecule/Atom without affecting other styles,. They are abstracted and formed into BEM and OOCSS.
We at sitegeist have build multiple sites with this approach. For example hl-kreuzfahrten.de which only has a 20kb stylesheet, and still has encapsulated styles with BEM & OOCSS.
my opinion on this: Use a smaller “Framework” / Boilerplate, and extend it if needed.