Cheatsheet

## CSS Classes Layout {.section-title .pfe-jump-links-panel__section}
.container

If something is outside of a nunucks component, the container class will apply basic layout and max-width.

### Multi-Column {.section-title .pfe-jump-links-panel__section}

Multi column elements will make every 'child html tag' into a column, and fit what it can. These elements will also use as much real-estate as possible, breaking outside of the text containers.

#### Multi-Column with specific widths {.section-title .pfe-jump-links-panel__section}

These classes make the columns conform to a width between the number in the name, and -100px. So .multi-column--min-400 maintains a width between 400-300px.

.multi-column--200-wide
.multi-column--300-wide
.multi-column--400-wide
.multi-column--500-wide
.multi-column--600-wide
#### Multi-Column with minimum widths {.section-title .pfe-jump-links-panel__section}

These classes will try to make as many columns as there are 'children html tags' until it hits the minimum width hinted in the class.

.multi-column--min-200-wide

With 2 Columns

With 7 Columns

.multi-column--min-300-wide

With 2 Columns

With 7 Columns

.multi-column--min-400-wide

With 2 Columns

With 7 Columns

.multi-column--min-500-wide

With 2 Columns

With 7 Columns

.multi-column--min-600-wide

With 2 Columns

With 7 Columns

### Add Vertical white-space {.section-title .pfe-jump-links-panel__section}

These classes allow margin-top or margin-bottom, and come in units of 8px. So adding the class margin-bottom--1 is margin-bottom: 8px, 2 is 16px, etc.

.margin-bottom--1
.margin-bottom--2
.margin-bottom--3
.margin-bottom--4
.margin-bottom--5
.margin-bottom--6
## Nunjucks Components {.section-title .pfe-jump-links-panel__section}
### Sections - Nunjucks Component {.section-title .pfe-jump-links-panel__section}

Sections should wrap parts of content that have a headline. It enforces rules for basic page layout and line-lengths.

{% section headline='Headline goes here' %}
  HTML for whatever goes in this section
{%- endsection %}

By default headlines have an h2 tag, to change it with the headingLevel flag

{% section headline="Headline goes here",
    headingLevel="3"
 %}
  HTML for whatever goes in this section
{%- endsection %}
### Example {.section-title .pfe-jump-links-panel__section}

This is a nunjucks component we can use to wrap example images or live component examples

{% example palette='lightest' %}
  Component or Image
{%- endsection %}

Lightest

Examples of light call to action appearance

Darkest

Examples of dark call to action appearance

Wrong

Examples of 'wrong' call to action appearance
© 2021-2024 Red Hat, Inc. Deploys by Netlify