Base
Text elements and classes are used strictly for sizing, not styling.
Usually these elements are wrapped with a title-wrapper or a text-wrapper to have access to frequently used modifiers as combo classes.
Headings
HTML tags have matching classes for their styles. Heading levels should follow the correct hierarchy in the HTML, but styles can be overriden with classes. We recommend always using the class to make separating the tag from the style a habit. Avoid combo classes when possible.
HTML H1
Heading 1
font-size: 5rem; (80px)
line-height: 1.2;
HTML H2
Heading 2
font-size: 4rem; (64px)
line-height: 1.2;
HTML Heading 3
Heading 3
font-size: 3rem; (48px)
line-height: 1.2;
HTML Heading 4
Heading 4
font-size: 2.5rem; (40px)
line-height: 1.2;
HTML Heading 5
Heading 5
font-size: 2rem; (32px)
line-height: 1.2;
HTML Heading 6
Heading 6
font-size: 1.75rem; (28px)
line-height: 1.2;
Text
Text classes are strictly used for font-size and line-height.
If you need bigger sizes, you should use heading classes.
Any other styling usually comes from a parent element.
Sometimes you need to override the parent element's color or font-weight, in which case you can use combo classes or spans
Lorem ipsum dolor sit amet, consectetur adipiscing elit. Suspendisse varius enim in eros elementum tristique. Duis cursus, mi quis viverra ornare, eros dolor interdum nulla, ut commodo diam libero vitae erat. Aenean faucibus nibh et justo cursus id rutrum lorem imperdiet. Nunc ut sem vitae risus tristique posuere.
font-size: 1.5rem; (24px)
line-height: 1.4;
Lorem ipsum dolor sit amet, consectetur adipiscing elit. Suspendisse varius enim in eros elementum tristique. Duis cursus, mi quis viverra ornare, eros dolor interdum nulla, ut commodo diam libero vitae erat. Aenean faucibus nibh et justo cursus id rutrum lorem imperdiet. Nunc ut sem vitae risus tristique posuere.
font-size: 1.25rem; (20px)
line-height: 1.4;
Lorem ipsum dolor sit amet, consectetur adipiscing elit. Suspendisse varius enim in eros elementum tristique. Duis cursus, mi quis viverra ornare, eros dolor interdum nulla, ut commodo diam libero vitae erat. Aenean faucibus nibh et justo cursus id rutrum lorem imperdiet. Nunc ut sem vitae risus tristique posuere.
font-size: 1.125rem; (18px)
line-height: 1.4;
Lorem ipsum dolor sit amet, consectetur adipiscing elit. Suspendisse varius enim in eros elementum tristique. Duis cursus, mi quis viverra ornare, eros dolor interdum nulla, ut commodo diam libero vitae erat. Aenean faucibus nibh et justo cursus id rutrum lorem imperdiet. Nunc ut sem vitae risus tristique posuere.
font-size: 1rem; (16px)
line-height: 1.4;
Lorem ipsum dolor sit amet, consectetur adipiscing elit. Suspendisse varius enim in eros elementum tristique. Duis cursus, mi quis viverra ornare, eros dolor interdum nulla, ut commodo diam libero vitae erat. Aenean faucibus nibh et justo cursus id rutrum lorem imperdiet. Nunc ut sem vitae risus tristique posuere.
font-size: 0.875rem; (14px)
line-height: 1.4;
Lorem ipsum dolor sit amet, consectetur adipiscing elit. Suspendisse varius enim in eros elementum tristique. Duis cursus, mi quis viverra ornare, eros dolor interdum nulla, ut commodo diam libero vitae erat. Aenean faucibus nibh et justo cursus id rutrum lorem imperdiet. Nunc ut sem vitae risus tristique posuere.
font-size: not set (resets to base)
line-height: not set
Rich text
Other HTML tag defaults
H1 - don't use
Heading 2
Heading 3
Heading 4
Do you really need h5 or h6 for the blog?
Heading 6
Paragraph: Lorem ipsum dolor sit amet, consectetur adipiscing elit. Suspendisse varius enim in eros elementum tristique. Duis cursus, mi quis viverra ornare, eros dolor interdum nulla, ut commodo diam libero vitae erat, bold text
dasdad
Lists:
- Lorem ipsum dolor sit amet, consectetur adipiscing elit.
- Lorem ipsum dolor sit amet, consectetur adipiscing elit.
- Lorem ipsum dolor sit amet, consectetur adipiscing elit.
- Lorem ipsum dolor sit amet, consectetur adipiscing elit.
- Lorem ipsum dolor sit amet, consectetur adipiscing elit.
- Lorem ipsum dolor sit amet, consectetur adipiscing elit.
Blockquote: Lorem ipsum dolor sit amet, consectetur adipiscing elit. Suspendisse varius enim in eros elementum tristique. Duis cursus, mi quis viverra ornare, eros dolor interdum nulla, ut commodo diam libero vitae erat
<script>
console.log("Code")
</script>
In the global CSS we are removing the top margin from the first element and the bottom margin from the last element
Other
Other HTML tag defaults
Lorem ipsum dolor sit amet, consectetur adipiscing elit. Suspendisse varius enim in eros elementum tristique. Duis cursus, mi quis viverra ornare, eros dolor interdum nulla, ut commodo diam libero vitae erat
font-size: 1.2rem;
line-height: 1.5;
padding-top: 0.75rem;
padding-right: 0.75rem;
padding-bottom: 0.75rem;
padding-left: 1.25rem;
color: inherit;
(from CSS embed)
Note: Avoid setting a font-size to links. Instead, add a link block and then add a text block to it.
- Lorem ipsum dolor sit amet
- Lorem ipsum dolor sit amet
- Lorem ipsum dolor sit amet
display: flex;
flex-direction: column;
row-gap: 0.5rem;
- Lorem ipsum dolor sit amet
- Lorem ipsum dolor sit amet
- Lorem ipsum dolor sit amet
display: flex;
flex-direction: column;
row-gap: 0.5rem;
Colors
This area is not to set specific classes, but rather a checkpoint to add your project's colors to the global swatches and describe how they're used.
Surface
Used as the main background color.
Surface 2
Used as the secondary background color, like the sidenav on this page.
Accent
Used for highlighting, CTAs, details.
Text
Base text color of the project.
Text Muted
Slightly softer text color.
Stroke
Base border color of UI elements of the project.
Card Stroke
Border color of cards, if needed.
Gradients
Having to apply gradients each time on new classes is annoying. So is having a class that takes up space just for a gradient.
That's why you can copy them from Figma into the global custom code block designated for gradients, allowing you to apply gradient backgrounds using an attribute.
For clipping text, make sure the property is background-image, not background
Background clipping
Shadows
Shadows are set in the global CSS embed block to make it easier to copy layered shadows from Figma and avoid adding an extra combo-class to your elements by assigning them to attributes.
Layout
Text elements and classes are used strictly for sizing, not styling.
Usually these elements are wrapped with a title-wrapper or a text-wrapper to have access to frequently used modifiers as combo classes.
Sections
Use the section class with its combo classes for all your sections to maintain consistency and avoid creating a new class for every new section. There are of course exceptions, but whenever possible, think of reusable ways to create elements.
These combo classes can be stacked.
If you find yourself stacking more than 3 classes, you should create a new combo class for that case.
You could also add more variations (i.e. cc-top-xl, cc-cta, ...)
Heading
Lorem ipsum dolor sit amet, consectetur adipiscing elit. Suspendisse varius enim in eros elementum tristique. Duis cursus, mi quis viverra ornare, eros dolor interdum nulla, ut commodo diam libero vitae erat. Aenean faucibus nibh et justo cursus id rutrum lorem imperdiet. Nunc ut sem vitae risus tristique posuere.
padding-top: 5rem (80px)
padding-bottom: 5rem (80px)
Heading
Lorem ipsum dolor sit amet, consectetur adipiscing elit. Suspendisse varius enim in eros elementum tristique. Duis cursus, mi quis viverra ornare, eros dolor interdum nulla, ut commodo diam libero vitae erat. Aenean faucibus nibh et justo cursus id rutrum lorem imperdiet. Nunc ut sem vitae risus tristique posuere.
padding-top: 0rem (0px)
Heading
Lorem ipsum dolor sit amet, consectetur adipiscing elit. Suspendisse varius enim in eros elementum tristique. Duis cursus, mi quis viverra ornare, eros dolor interdum nulla, ut commodo diam libero vitae erat. Aenean faucibus nibh et justo cursus id rutrum lorem imperdiet. Nunc ut sem vitae risus tristique posuere.
padding-top: 0rem (0px)
Heading
Lorem ipsum dolor sit amet, consectetur adipiscing elit. Suspendisse varius enim in eros elementum tristique. Duis cursus, mi quis viverra ornare, eros dolor interdum nulla, ut commodo diam libero vitae erat. Aenean faucibus nibh et justo cursus id rutrum lorem imperdiet. Nunc ut sem vitae risus tristique posuere.
padding-top: 2.5rem (40px)
Heading
Lorem ipsum dolor sit amet, consectetur adipiscing elit. Suspendisse varius enim in eros elementum tristique. Duis cursus, mi quis viverra ornare, eros dolor interdum nulla, ut commodo diam libero vitae erat. Aenean faucibus nibh et justo cursus id rutrum lorem imperdiet. Nunc ut sem vitae risus tristique posuere.
padding-bottom: 2.5rem (40px)
Heading
Lorem ipsum dolor sit amet, consectetur adipiscing elit. Suspendisse varius enim in eros elementum tristique. Duis cursus, mi quis viverra ornare, eros dolor interdum nulla, ut commodo diam libero vitae erat. Aenean faucibus nibh et justo cursus id rutrum lorem imperdiet. Nunc ut sem vitae risus tristique posuere.
padding-top: 7.5rem (120px)
Heading
Lorem ipsum dolor sit amet, consectetur adipiscing elit. Suspendisse varius enim in eros elementum tristique. Duis cursus, mi quis viverra ornare, eros dolor interdum nulla, ut commodo diam libero vitae erat. Aenean faucibus nibh et justo cursus id rutrum lorem imperdiet. Nunc ut sem vitae risus tristique posuere.
padding-bottom: 7.5rem (120px)
Heading
Lorem ipsum dolor sit amet, consectetur adipiscing elit. Suspendisse varius enim in eros elementum tristique. Duis cursus, mi quis viverra ornare, eros dolor interdum nulla, ut commodo diam libero vitae erat. Aenean faucibus nibh et justo cursus id rutrum lorem imperdiet. Nunc ut sem vitae risus tristique posuere.
Hero sections are often unique compared to other sections, whether because of a fixed nav or just being 100vh.
Use this class for your hero sections if needed.
Containers
Sections usually need a container to keep layouts from becoming too wide. Containers also control the horizontal padding in order to maintain the same spacing throughout your project.
A default container acts as "12 columns", as it takes up the full design width (usually 1440px). That's why combo class names mention columns.
max-width: 1440px
padding-right & left: 2.5rem (40px)
Heading
Lorem ipsum dolor sit amet, consectetur adipiscing elit. Suspendisse varius enim in eros elementum tristique. Duis cursus, mi quis viverra ornare, eros dolor interdum nulla, ut commodo diam libero vitae erat. Aenean faucibus nibh et justo cursus id rutrum lorem imperdiet. Nunc ut sem vitae risus tristique posuere.
max-width: 1210px (1130px+40+40)
Heading
Lorem ipsum dolor sit amet, consectetur adipiscing elit. Suspendisse varius enim in eros elementum tristique. Duis cursus, mi quis viverra ornare, eros dolor interdum nulla, ut commodo diam libero vitae erat. Aenean faucibus nibh et justo cursus id rutrum lorem imperdiet. Nunc ut sem vitae risus tristique posuere.
max-width: 982px (902px+40+40)
Heading
Lorem ipsum dolor sit amet, consectetur adipiscing elit. Suspendisse varius enim in eros elementum tristique. Duis cursus, mi quis viverra ornare, eros dolor interdum nulla, ut commodo diam libero vitae erat. Aenean faucibus nibh et justo cursus id rutrum lorem imperdiet. Nunc ut sem vitae risus tristique posuere.
max-width: 752px (672px+40+40)
Usually used for articles.
Heading
Lorem ipsum dolor sit amet, consectetur adipiscing elit. Suspendisse varius enim in eros elementum tristique. Duis cursus, mi quis viverra ornare, eros dolor interdum nulla, ut commodo diam libero vitae erat. Aenean faucibus nibh et justo cursus id rutrum lorem imperdiet. Nunc ut sem vitae risus tristique posuere.
Layout
Layouts will usually have more unique names depending on the design. In a lot of cases, there are some basic layout options that can act as building blocks.
Heading
Lorem ipsum dolor sit amet, consectetur adipiscing elit. Suspendisse varius enim in eros elementum tristique.
grid-cols defaults to 2 even columns. You can then add modifiers for different sizes or more columns.
Lorem ipsum dolor
Lorem ipsum dolor
Lorem ipsum dolor
Adds another column to the grid. Might be useful for a blog grid.
Heading
Lorem ipsum dolor sit amet, consectetur adipiscing elit. Suspendisse varius enim in eros elementum tristique.
column is just a div that is used inside a grid column. the reason it exists is to have some reusable combo classes for alignment, padding, etc
This modifier is useful for button groups, logos, or any time you want extra items to stack in one line. Columns are automatically generated
image-wrapper is a generic base class that has overflow hidden, position relative, and width 100%. This is useful to avoid creating a new class for standard-sized images in columns. It is also aligned top to avoid stretching for the whole column (you can change that by placing it in a flex parent). Use a combo class to give it full height.
If you have images with unique sizes and positioning, create a new class for it.
image is set to cover by default and has combo classes to control its aspect ratio. You can add more or modify them. Default:
cc-1x1 cc-4x3 cc-16x9
Custom Layout
Lorem ipsum dolor sit amet, consectetur adipiscing elit. Suspendisse varius enim in eros elementum tristique. Duis cursus, mi quis viverra ornare, eros dolor interdum nulla, ut commodo diam libero vitae erat.
What's going on here?
This is what you would mostly use. This name can either be page-specifc or of a reusable component. Try to find opportunities to make things reusable, but don't overthink it. Just try not to have page-specific names for components you are using in multiple pages.
Plan well.
Utilities
Utilities have a u- prefix to separate them from base styles. They can work on their own, but usually you use them to modify a base element, like a title-wrapper.
On sections, avoid them as much as possible since you usually apply paddings on them, but background changes are fine.
Things like text alignment should be on the layout layer.
Text Color
These can be added to any element, although it's recommended to place it as high as possible according to your needs.
For example, if you want a two text blocks to have this color and they are sibling elements, you could apply it to their parent element.
If you have a lot of colored headings, it is a good idea to apply it on the element instead of the parent or in a span, to make it easier to access next time.
Lorem ipsum dolor sit amet.
Lorem ipsum dolor sit amet.
Lorem ipsum dolor sit amet.
Lorem ipsum dolor sit amet.
Lorem ipsum dolor sit amet.
Lorem ipsum dolor sit amet.
Lorem ipsum dolor sit amet.
This color is not dynamic
Font
Font utilities change the font and weight of an element.
You could replace sans & serif with other variations
(i.e. main & display).
Lorem ipsum dolor sit amet.
Lorem ipsum dolor sit amet.
Lorem ipsum dolor sit amet.
Lorem ipsum dolor sit amet.
Lorem ipsum dolor sit amet.
Alignment
Use to align text in layouts, or individual text elements.
Lorem ipsum dolor sit amet.
Lorem ipsum dolor sit amet.
Lorem ipsum dolor sit amet.
Other
Other decorations and styles.
Lorem ipsum dolor sit amet.
Lorem ipsum dolor sit amet.
Lorem ipsum dolor sit amet.
Lorem ipsum dolor sit amet.
Lorem ipsum dolor sit amet.
Lorem ipsum dolor sit amet
Background.
Background modifiers also have a text property added to them, to avoid having to override all the text elements inside them.
You could use "u-bg-dark" to apply dark mode too, instead of the theme attribute.
This one is special.
Lorem ipsum dolor sit amet.
Lorem ipsum dolor sit amet.
Lorem ipsum dolor sit amet.
Lorem ipsum dolor sit amet.
Lorem ipsum dolor sit amet.
Lorem ipsum dolor sit amet.
Lorem ipsum dolor sit amet.
Other.
Other useful utilities.
hidden
it's hidden on tablet
it's hidden on mobile landscape
it's hidden on mobile portrait
margin-left: auto;
margin-right: auto;
opacity: 70%;