@@ -29,6 +29,25 @@ New utility classes should be added to [`utilities.scss`](https://gitlab.com/git
-`{shade}` is on of the shades listed on [colors](https://design.gitlab.com/foundations/colors/)
-`{size}` is a number from 1-6 from our [Type scale](https://design.gitlab.com/foundations/typography)
#### When should I create component classes?
We recommend a "utility-first" approach.
1. Start with utility classes.
2. If composing utility classes into a component class removes code duplication and encapsulates a clear responsibility, do it.
This encourages an organic growth of component classes and prevents the creation of one-off unreusable classes. Also, the kind of classes that emerge from "utility-first" tend to be design-centered (e.g. `.button`, `.alert`, `.card`) rather than domain-centered (e.g. `.security-report-widget`, `.commit-header-icon`).
Examples of component classes that were created using "utility-first" include: