Skip to content


Switch branches/tags

Name already in use

A tag already exists with the provided branch name. Many Git commands accept both tag and branch names, so creating this branch may cause unexpected behavior. Are you sure you want to create this branch?

Latest commit


Git stats


Failed to load latest commit information.
Latest commit message
Commit time

CSS-o-Gram (CSSG)

rapid, intuitive, neat - like SSG, but peaceful


CSSG stands for "CSS Diagram", in fact - a comment block in CSS file, which describes substance structure with CSS classes. Substance can be element, block or project, depending on methodology that you do (or do not) use.

This is your trusted companion in large project and assistant for your colleages, if you work in team.

Low entry barriers - use regular syntax and some logical rules.
However, it's implied that you familiar with BEM, SMACSS, MCSS etc. and perhaps already use any of theese methodologies.
If not, you could possibly hear about Bootstrap and other frameworks.
Either way it is recommended to get yourself acquainted with OOCSS terminology before further reading.

For whom and for what

  • Better code structure and getting into new code
  • Conversation tool for colleages and developers, distant from front-end
  • Detecting potential "bottlenecks" in layout (excessive DOM nesting, classes amount etc.)
  • Easier debugging and refactoring
  • It's just pretty!

Quick start

Get to know first part of CSSG documentation - basic
Easy enough - try it and continue reading - advanced
Syntax legend - legend

CSSG generator

Of course it's far more handy to get into into CSSG using automatic generator. Check out CSSG converter

Fun facts

CSSG could be developed back in 2008-th, thanks to Vitaly Friedman' example!


Feel free to ask questions via email.
All content is available for free distribution.
Link to source is mandatory when copying materials.