Sanam, A minimal and flexible approach to developing maintainable & large scalable stylesheet.
Sanam is a Style Convection based on some of the best practices, methods, articles and existing style guides. Sanam goal is to provide a set of conventions that lets programmers achieve following goals.
- clean well structured and transparent code
- highly reusable code
- maintainability in long term and large scale
- highly readable code via simplicity and being explicit
- flexibility in term of development and conventions itself
Sanam borrows some of it’s main Ideas and features from following resources:
- Namespaces idea from Harry Roberts Article
- BEM css nameing convention as component/module pattern convention
- Variables and scale variables idea from Fat's Article on Medium
- General idea of directory structure & the (n-1)7-1 pattern from Sass Guidelines
- Limiting preprocessors features Based on numerous articles including (1)(2)(3)
- Some other articles from This Repo that I will mention.
Sanam documentary is based on SASS-Lang, but it can be adopted to be used with conjunction of any preprocessor language or may be pure css using postprocessors or task runners. Suggesting a collection of best practices is the goal of Sanam, Sanam Style Convention does not provide any code or framework for specific language or any opinionated structure, you should get the core principles and implement them in your projects as suits your situation.
- About Author
- Namespaces
- Utility Classes
- Scoping Classes
- Theme Classes
- State Classes
- Javascript Classes
- Testing Classes
- Hack Classes
- Objects
- Components/Modules
- Layouts
- Layout Level Objects
- Page Level Styles
- Modular Pattern
- Responsive
- Variables
- Colors
- Color Pallet
- Gray Shades
- Semantic Colors
- Brand Colors
- Z-index Scale
- Typography
- Limiting preprocessors features
- Selector Nesting
- Loops & Branching
- Mixins
- Extend
- Vendors
- Overriding Vendors
- Legacy styles
- Shame styles
- Reset styles
- Environment variables
- Big Picture of Directory structure
- Documentation
- Common Sense