This is the project's documentation — our approach aims to reduce complexity, add flexibility, and keep things consistent and easily understood.
This template comes with a Page Starter Template, which contains the fundamental structure for a page: a Global Component that can be used to store custom code, a page wrapper that holds the Header Component, the sections, and the Footer Component.
The naming convention applied in this template is known as BEM. Classes are named in lowercase, and the elements are usually related to each other when you see a "__" after a name.
Imagine a section called events. Now, imagine this section has a grid with events items inside.
As you can see, the "__content" means that the content belongs to the "jobs". Note: it's okay to have classes that don't belong to a "parent class".
You might see elements with combo classes applied, and in this case, the "extra classes" start with "--". Let's say you need to change the color of a text in a particular element:
We use variables to set colors and paddings. The "color 01" is named "c1" and is given its RGBA value, and when you see a "c1-75", that means this is the "color 01 with 75% opacity."
Paddings are named from the smallest to the largest: "pd-01", "pd-02", "pd-03", and so on. It's important to note that all values are set to REMs, which is a best practice for accessibility.
The Style Guide sets both colors and fonts, including the Rich Text Element. Headings and texts get their names based on size:
It's important to note that the most important thing for headings is choosing the right Tag. Sometimes, you don't want an H1 to be the biggest, so you select the H1 tag and add the class "heading-medium", for example: The class name overrides the tag's initial size.