<aside> 💡 Make sure to read the Standard Documentation Format!

</aside>

Overview

In order to keep our components manageable, and to ensure that any changes we make are thought through, we enforce a style guide for any CSS/LessCSS code, and particularly for CSS Components.

Keeping CSS documented will help us make intelligent modifications in the future, and give people an idea as to what needs to be modified as they're writing contributions.

Documenting CSS Components

For CSS Components, the documentation serves as the specification for that component. While there may be a JavaScript layer on top of it, that should be considered an implementation of the underlying component, and not the component itself.

New styles should be documented using a comment block that covers:

  1. The purpose of the rule
  2. The structure of the elements (showing element types and CSS classes)
  3. Any modifiers and what they do
  4. ARIA attributes that are required or should otherwise be used
  5. Expected rules for keyboard navigation
  6. A reference to the official JavaScript implementation of the component, if any