Purpose and structure

Explaining reasons and way of thinking.

The purpose and responsibility of this repository is to ensure that...

  • ... SOL design is consistent between projects
  • ... SOL's style definitions are DRY, semantic and human readable
  • ... style bloat is kept to a minimum

Modules

To achieve these goals, styles are defined in modules. You can find these modules as partials in the /modules catalogue. Projects only include the modules that are in use in that project.

General modules, like the base typography module, are reused across projects. Specialized modules should be kept small, to help maintain consistency.

A rendered page should ideally only load styles that are in use on that particular page. Therefore, each project will build their own stylesheet from a mix of general and

TODO: Insert venndiagram illustrating the relationship between general modules and specialized modules.

Unit tests

Since modules are used between projects, we have to be aware that changes made can affect several projects. Taking this into account, we have defines a set of visual unit tests in the form of static HTML files that use the generated styles for a project.

When introducing changes, the developer (or even someone without technical competence) can flick through these tests in a browser to make sure that the changes will not break something else.