xs
sm
md
lg
xl
CSS Version:

Typography

There are two ways to deal with standard typographic elements.

Rich Text

If you add the class of rich-text to any element, then all of it's children will get standard styling (font size, margin, etc.) for headings, paragraphs, etc. This is much easier, but the spacing will be less precise. This is useful for displaying user-generated basic html form a rich text editor.

Heading One

Paragraph text: Lorem ipsum dolor sit amet, consectetur adipiscing elit. Etiam odio lectus, condimentum sit amet luctus sed, consequat et tortor. Etiam non tortor eu nunc euismod aliquet vitae a odio. This one is longer.

Another paragraph: Lorem ipsum dolor sit amet, consectetur adipiscing elit. Etiam odio lectus, condimentum sit amet luctus sed, consequat et tortor. Etiam non tortor eu nunc euismod aliquet vitae a odio.

Heading Two

Lorem ipsum dolor sit amet, consectetur adipiscing elit. Etiam odio lectus, condimentum sit amet luctus sed, consequat et tortor. Etiam non tortor eu nunc euismod aliquet vitae a odio.

Heading Three

Lorem ipsum dolor sit amet, consectetur adipiscing elit. Etiam odio lectus, condimentum sit amet luctus sed, consequat et tortor. Etiam non tortor eu nunc euismod aliquet vitae a odio.

Heading Four

Lorem ipsum dolor sit amet, consectetur adipiscing elit. Etiam odio lectus, condimentum sit amet luctus sed, consequat et tortor. Etiam non tortor eu nunc euismod aliquet vitae a odio.

Heading Five

Lorem ipsum dolor sit amet, consectetur adipiscing elit. Etiam odio lectus, condimentum sit amet luctus sed, consequat et tortor. Etiam non tortor eu nunc euismod aliquet vitae a odio.

Heading Six

Lorem ipsum dolor sit amet, consectetur adipiscing elit. Etiam odio lectus, condimentum sit amet luctus sed, consequat et tortor. Etiam non tortor eu nunc euismod aliquet vitae a odio.


Lorem ipsum dolor sit amet, consectetur adipiscing elit. Etiam odio lectus, condimentum sit amet luctus sed, consequat et tortor. Etiam non tortor eu nunc euismod aliquet vitae a odio.

Inline Text Elements

For bold text, use the: strong or b tag.
For italicized text, us the em or i tag.
For small inline text, use the small tag.
For inline code, use the code tag.

Unordered List:

  • List item 1
  • List item 2
  • List item 3

Unordered List:

  1. List item 1
  2. List item 2
  3. List item 3

Lorem ipsum dolor sit amet, consectetur adipiscing elit. Etiam odio lectus, condimentum sit amet luctus sed, consequat et tortor. Etiam non tortor eu nunc euismod aliquet vitae a odio.

Outside of Rich Text

Outside of rich-text, you can must add classes like h1, h2, h3, h4, p, small, strong, em. to any element to get the standard element styling. You can then add margin classes, put the elements into grids for arangement, and use the trim-text classes (see below) to really lock in spacing precisely. Here the class of demo-box adds a line around the text element to show the text trimming. Remove this.

Heading Number 1

Heading Number 2

Heading Number 3

Heading Number 4

Small Heading

Paragraph

Small block

Inline elements: small.small, span.small, strong.strong, span.strong, em.em, span.em

  • Unordered list
  • item
  • Ordered list
  • item

Blockquote: Lorem ipsum dolor sit amet, consectetur adipiscing elit. Etiam odio lectus, condimentum sit amet luctus sed, consequat et tortor.

Another paragraph: Etiam non tortor eu nunc euismod aliquet vitae a odio.

Small Heading

If you want to add a small heading above a standard heading, add the class of small-heading to a div or any heading tag.

Small Heading

Heading One

This example has a div.small-heading above a h1.h1. A margin class is added to adjust the spacing between them slightly. Trim-text is not used here.

Small Heading

Heading Two

This example has a h2.small-heading above a div.h2 showing how you can adjust the semantics without affecting the styling. A margin class is added to adjust the spacing between them slightly. Trim-text is not used here.

Small Heading

Heading Two

This example uses trim-text-elements and a grid to apply spacing between them. It includes a h1.small-heading followed by a h2.h2.

Blockquotes

A blockquote should contain one or more p tags of text. It may be followed by a p.blockquote-attribution with info about who said the quote. Inside of rich-text the element is styled and indented. Outside of rich-text add the blockquote class to style it, but no indentation is added. Apply margin manually if you want to.

Blockquote: Lorem ipsum dolor sit amet, consectetur adipiscing elit. Etiam odio lectus, condimentum sit amet luctus sed, consequat et tortor.

Another paragraph: Etiam non tortor eu nunc euismod aliquet vitae a odio.

Guy Whosaidit
Distinguished Professor of Stuff
Name of His Book


Here is a blockquote with one paragraph and no attribution after it.

Lists

Either put lists inside of rich-text or add the ul or ol classes to get the standard list styling. You can use the --list-item-gap variable in a style attribute to adjust the space between items.

Unordered Lists

Basic unordered list with short items.

  • Unordered list item 1
  • Unordered list item 2
  • Unordered list item 3

Basic unordered list with long items:

  • Unordered list item 1: Lorem ipsum dolor sit amet, consectetur adipiscing elit. Etiam odio lectus, condimentum sit amet luctus sed, consequat et tortor.
  • Unordered list item 2: Lorem ipsum dolor sit amet, consectetur adipiscing elit. Etiam odio lectus, condimentum sit amet luctus sed, consequat et tortor.
  • Unordered list item 3: Lorem ipsum dolor sit amet, consectetur adipiscing elit. Etiam odio lectus, condimentum sit amet luctus sed, consequat et tortor.

Fancy unordered list: if a list item contains a br tag, it will have block end margin.

  • List Item 1:
    Lorem ipsum dolor sit amet, consectetur adipiscing elit. Etiam odio lectus, condimentum sit amet luctus sed, consequat et tortor. Etiam non tortor eu nunc euismod aliquet vitae a odio.
  • List Item 2:
    Lorem ipsum dolor sit amet, consectetur adipiscing elit. Etiam odio lectus, condimentum sit amet luctus sed, consequat et tortor. Etiam non tortor eu nunc euismod aliquet vitae a odio.
  • List Item 3:
    Lorem ipsum dolor sit amet, consectetur adipiscing elit. Etiam odio lectus, condimentum sit amet luctus sed, consequat et tortor. Etiam non tortor eu nunc euismod aliquet vitae a odio.

Ordered Lists

Basic ordered list with short items.

  1. Ordered list item 1
  2. Ordered list item 2
  3. Ordered list item 3

Basic ordered list with long items:

  1. Ordered list item 1: Lorem ipsum dolor sit amet, consectetur adipiscing elit. Etiam odio lectus, condimentum sit amet luctus sed, consequat et tortor.
  2. Ordered list item 2: Lorem ipsum dolor sit amet, consectetur adipiscing elit. Etiam odio lectus, condimentum sit amet luctus sed, consequat et tortor.
  3. Ordered list item 3: Lorem ipsum dolor sit amet, consectetur adipiscing elit. Etiam odio lectus, condimentum sit amet luctus sed, consequat et tortor.

Fancy ordered list: if a list item contains a br tag, it will have block end margin.

  1. List Item 1:
    Lorem ipsum dolor sit amet, consectetur adipiscing elit. Etiam odio lectus, condimentum sit amet luctus sed, consequat et tortor. Etiam non tortor eu nunc euismod aliquet vitae a odio.
  2. List Item 2:
    Lorem ipsum dolor sit amet, consectetur adipiscing elit. Etiam odio lectus, condimentum sit amet luctus sed, consequat et tortor. Etiam non tortor eu nunc euismod aliquet vitae a odio.
  3. List Item 3:
    Lorem ipsum dolor sit amet, consectetur adipiscing elit. Etiam odio lectus, condimentum sit amet luctus sed, consequat et tortor. Etiam non tortor eu nunc euismod aliquet vitae a odio.

Buttons

Like links, buttons are styled like normal text by default.

Text Link Buttons

You can also add the text-link class to buttons to style them like text links.

Standard Buttons

These are buttons with a standardized containing shape.

Link
Button

Small Buttons

Add the class of btn-small.

Large Buttons

Add the class of btn-large.

Tooltips

These tooltips are CSS-only (no JS required). They can be positioned on any of the 4 sides. You must use a button or a tag to trigger the tooltip. The span[role="tooltip"] must have an id attribute that matches the aria-labelledby attribute of the button or link.

This is a longer tooltip text that should wrap.
Tooltip on right
align-ie
This is a longer tooltip text that should wrap.
Tooltip on top
align-bs
This is a longer tooltip text that should wrap.
Tooltip on bottom
align-be
This is a longer tooltip text that should wrap.
Tooltip on left
align-is
You can use a link tag or button to trigger the tooltip.
Tooltip on a link
Link Tooltip on a text link
Text link
Tooltip on a text link button
Text link button

Forms

Description...

Field description
Radio Buttons
Align with medium input
Field description
Field description
Field description
Field description
Field error description
Field description
Field error description
Radio Buttons Error
Field error description
Checkboxes Error
Field error description
Field description
Field description
Checkboxes
Align with small inputs
Radio Buttons
Checkradio items inline
Radio Buttons
Checkradio items block
Checkboxes
Checkradio items inline
Checkboxes
Checkradio items block

Tables

Add the class of table-1 to a table element to get the standard table styling. There are a number of classes and custom properties that are used to control lines, alignment, padding, etc. If the table's content can't fit in the available space, you can add a div with the class of table-wrap around the table element to allow it to scroll horizontally. Set the width (auto, %, rem) of columns with style attributes on the colgroup > col elements.

Table Example 1

  • Lines: Add the class of lines-b to add horizontal (block axis) lines between each row.
  • Alignment: Add the class of last-column-align-end to align the last column's text to the end (right).
  • Font Size: You can use a style attribute to set the font size to a font size variable on the table tag.
Column A Column B Column C Column D
Body 1A Body 1B Body 1C Body 1D
Body 2A Body 2B Body 2C Body 2D
Body 3A Body 3B Body 3C Body 3D
Foot 1A Foot 1B Foot 1C Foot 1D

Table Example 2

  • Lines: This table does not use the lines-b class so no lines are added by default. The class of border-be or border-bs is added to certain rows to add a line below or above as needed.
  • Line Color: Here we override the default line color with the --row-border-color custom property. This can be set on the table, thead, tbody, or tfoot.
  • Alignment: Add the class of last-column-align-end to align the last column's text to the end (right).
  • Font Size: You can use a style attribute to set the font size to a font size variable on the table tag.
  • Padding: You can use these custom properties on the table, thead, tbody, tfoot or any tr to set the padding for cells: --cell-pad-b, --cell-pad-bs, --cell-pad-be, --cell-pad-i, --cell-pad-is, --cell-pad-ie. Here we just set it on the table tag.
Column A Column B Column C Column D
Body 1A Body 1B Body 1C Body 1D
Body 2A Body 2B Body 2C Body 2D
Body 3A Body 3B Body 3C Body 3D
Foot 1B Foot 1C Foot 1D

Boxes and Borders

Use a combination of color context classes, border classes border-width properties and border-radius properties to create boxes.

.color-context-accent1-dark
.border-all
--border-width: var(--ln-3)
.border-color-subdued
border-radius: var(--br-2)
.pad-5
.color-context-accent1-shaded
.pad-5
border-radius: var(--br-2)
border-width: var(--ln-5);
border-radius: var(--br-2);
.pad-3
.border.border-color-subdued

Border Side Classes

Here we set --border-width: var(--ln-4); on the parent div and these classes control which side the border is applied to.

.border-all
.border-b
.border-bs
.border-be
.border-i
.border-is
.border-ie

Changing Borders at Breakpoints

Here we want item 2 of the grid to have a left border on larger screens and a top border on smaller screens because of the way the grid columns change. We add the border class to set the color and style (but no width), then use breakpoint properties to set the border-block-start-width and border-inline-start-width at different breakpoints. Resize the browser to see the change.

Item 1 has no border.
The parent has:
.border-all
--border-width: var(--ln-3)
border-radius: var(--br-3)
.border
--border-block-start-width-xs: var(--border-width);
--border-block-start-width-md: 0;
--border-inline-start-width-md: var(--border-width);
.border-bs

Dots

Use the dot class to create a simple circle. They default to inline-block, but add the block class when used in a grid or flex container so you will have tight control over the spacing. You can put them inside a link or button element to make them clickable. Use the --this-size to set the size to a space unit or any other CSS unit. Use the --this-color and --this-active-color properties to set the color of the dot and the active dot. Generally you should use color-context-aware properties for these: --color-bg, --color-fg-normal, --color-fg-subdued, --color-fg-xsubdued, --color-fg-vibrant.

dot.block

dot.active

dot (custom colors)

.dot.active (custom colors)

--this-size: var(--sp-4)

--this-size: 1rem

Icons

Description...

icon-size-1
icon-size-2
icon-size-3
icon-size-4
icon-circle-1
icon-circle-2
icon-circle-3
icon-circle-4

Available Icons

Images

yawning dog!
div.img-wrap.border.border-color-subdued
border-width: var(--ln-5);
border-radius: var(--br-2);
--aspect-ratio-xs: 1/1;
--aspect-ratio-md: 4/3;
--object-position-xs: center;
--object-position-md: bottom right;
rolls
figure.img-wrap, figcaption

Overlays

When you want to overlay content on an image, wrap the image in div. Then put a div.overaly as a sibling of the image. Then put a child div in the overlay. Then use flex justify and align properties to position the overlay in the center or one of the corners.

Overlay Example 1

This example is a hero image with a title overlay and a video play button overlay.

Overlay

sliced apple

Overlay Example 2

Here we use overlay to cover a block with a link (or button). This way the whole block is clickable, without the link or button having to contain all of the text and image content. We use a sr-only span to put some text in the link for screen readers. We add the class of no-outline-offset to the link so the focus-visible outline is not cut off by the overlay parent.

The block also contains two text links. We use z-index to put these above the block link so you can click them as well. So if you click a text link you follow that link. If you click anywere in the block outside of those text links, you follow the block link.

rolls

Item Heading

Lorem ipsum dolor sit amet consectetur adipisicing elit. Quisquam, quos.

Modals

Modals use the native HTML dialog element. Buttons with attributes open and close them. There are various sizes. Some sizes also position them to a side. There are also transitions: modal-fade and modal-slide-from- classes. You can also apply a color context to a modal. Using a combination of these classes you can create standard modals, a slide in menu on the side, or a full-screen takeover.

Modal JS Events

The modal JS fires these events. These events bubble, so you can listen for them on the modal element, any parent, or the document. event.detail.modal is the modal element that opened or closed.

	document.addEventListener('ntgt.modal.opened', function(event){
		console.log('Model Opened: ', event.detail.modal);
	}, false);

Modal JS Functions

You can use these functions to initialize, open, and close modals. If you call ntgt.init() after all the modals and modal open buttons are in the DOM everything should just work. But if you add modals or modal open buttons to the DOM after that init function has run, you will need to run some of the modal init functions below. Also, if you want to open or close a modal from code without relying on the data-open-modal attribute, you can use the openModal and closeModal functions below.

	// Initialize modals and modal open buttons in a parent element
	let parent = document.querySelector('#my-parent');
	ntgt.modals.initModalOpenButtons(parent);
	ntgt.modals.initModals(parent);
	
	// Open a modal
	let modal = document.querySelector('#my-modal');
	ntgt.modals.openModal(modal);
	
	// Close a modal
	ntgt.modals.closeModal(modal);

Details Element

The native HTML details and summary provide disclosure functionality with accessiblility baked in and minimal JS needed. It is good for simple situations like a list of FAQ's. If you include an icon, the native marker (triangle) will be hidden. Otherwise it does not add much style. You can use other elements and classes to add style and structure. Add the class of details-1 to get some helpful styles for a typical use case. Add the open attribute to any details element that should be initially open on page load. Nested detail elements are not supported.

Default Behavior

Each details element is independant. You can open multiple at once.

Item Number 1

Lorem ipsum dolor sit amet, consectetur adipiscing elit. Etiam odio lectus, condimentum sit amet luctus sed, consequat et tortor. Etiam non tortor eu nunc euismod aliquet vitae a odio.

Lorem ipsum dolor sit amet, consectetur adipiscing elit. Etiam odio lectus, condimentum sit amet luctus sed, consequat et tortor. Etiam non tortor eu nunc euismod aliquet vitae a odio.


Item Number 2

Lorem ipsum dolor sit amet, consectetur adipiscing elit. Etiam odio lectus, condimentum sit amet luctus sed, consequat et tortor. Etiam non tortor eu nunc euismod aliquet vitae a odio.

Lorem ipsum dolor sit amet, consectetur adipiscing elit. Etiam odio lectus, condimentum sit amet luctus sed, consequat et tortor. Etiam non tortor eu nunc euismod aliquet vitae a odio.


Item Number 3

Lorem ipsum dolor sit amet, consectetur adipiscing elit. Etiam odio lectus, condimentum sit amet luctus sed, consequat et tortor. Etiam non tortor eu nunc euismod aliquet vitae a odio.

Lorem ipsum dolor sit amet, consectetur adipiscing elit. Etiam odio lectus, condimentum sit amet luctus sed, consequat et tortor. Etiam non tortor eu nunc euismod aliquet vitae a odio.


Accordion Behavior

Wrap multiple details elements in a div.details-accordion and when you open one, any others in that group will close.

Item Number 1 Lorem ipsum dolor sit amet, consectetur adipiscing elit?

Lorem ipsum dolor sit amet, consectetur adipiscing elit. Etiam odio lectus, condimentum sit amet luctus sed, consequat et tortor. Etiam non tortor eu nunc euismod aliquet vitae a odio.


Item Number 2 Lorem ipsum dolor sit amet, consectetur adipiscing elit?

Lorem ipsum dolor sit amet, consectetur adipiscing elit. Etiam odio lectus, condimentum sit amet luctus sed, consequat et tortor. Etiam non tortor eu nunc euismod aliquet vitae a odio.


Item Number 3 Lorem ipsum dolor sit amet, consectetur adipiscing elit?

Lorem ipsum dolor sit amet, consectetur adipiscing elit. Etiam odio lectus, condimentum sit amet luctus sed, consequat et tortor. Etiam non tortor eu nunc euismod aliquet vitae a odio.


Toggle Two Icons

Rather than rotating one icon, you can swap which of two icons is showing when the details element is open. The first one shows when it's closed, the second shows when it's open. This example also demonstrates how the styling is not dicatated by using this details element.

Item Number 1

Lorem ipsum dolor sit amet, consectetur adipiscing elit. Etiam odio lectus, condimentum sit amet luctus sed, consequat et tortor. Etiam non tortor eu nunc euismod aliquet vitae a odio.

Lorem ipsum dolor sit amet, consectetur adipiscing elit. Etiam odio lectus, condimentum sit amet luctus sed, consequat et tortor. Etiam non tortor eu nunc euismod aliquet vitae a odio.


Item Number 2

Lorem ipsum dolor sit amet, consectetur adipiscing elit. Etiam odio lectus, condimentum sit amet luctus sed, consequat et tortor. Etiam non tortor eu nunc euismod aliquet vitae a odio.

Lorem ipsum dolor sit amet, consectetur adipiscing elit. Etiam odio lectus, condimentum sit amet luctus sed, consequat et tortor. Etiam non tortor eu nunc euismod aliquet vitae a odio.


Item Number 3

Lorem ipsum dolor sit amet, consectetur adipiscing elit. Etiam odio lectus, condimentum sit amet luctus sed, consequat et tortor. Etiam non tortor eu nunc euismod aliquet vitae a odio.

Lorem ipsum dolor sit amet, consectetur adipiscing elit. Etiam odio lectus, condimentum sit amet luctus sed, consequat et tortor. Etiam non tortor eu nunc euismod aliquet vitae a odio.

Collapse

Collapse is a more general purpose disclosure tool. It requires JS to function, but more flexible in the html you can use. It allows more animation. Nested collapses are not supported. Collapse works with these classes for CSS effects: toggle-rotate-90, toggle-rotate-180, toggle-swap-icons and toggle-transition-height. See the advanced examples below.

Note about JS: The collapse JS is fairly simple. The main thing it does is toggle the aria-expanded attribute from false to true and vice versa. The CSS handles showing/hiding and transitions. So if you're implementing collapse with a JS framework, you don't need to use any of the ntgt.collapse JS functions if you don't want to. You can just use your own JS to toggle the aria-expanded attribute for stand-alone collapses and collapse accordions.

Basic Example

This is the simplest example: a text link, that shows some text.

Lorem ipsum dolor sit amet, consectetur adipiscing elit. Etiam odio lectus, condimentum sit amet luctus sed, consequat et tortor. Etiam non tortor eu nunc euismod aliquet vitae a odio.

Accordion Example

Put multiple collapse elements into a collapse-accordion element and opening one will close the others in that group. This also animates the height of the content with toggle-transition-height.

Lorem ipsum dolor sit amet, consectetur adipiscing elit. Etiam odio lectus, condimentum sit amet luctus sed, consequat et tortor. Etiam non tortor eu nunc euismod aliquet vitae a odio.

Lorem ipsum dolor sit amet, consectetur adipiscing elit. Etiam odio lectus, condimentum sit amet luctus sed, consequat et tortor. Etiam non tortor eu nunc euismod aliquet vitae a odio.

Lorem ipsum dolor sit amet, consectetur adipiscing elit. Etiam odio lectus, condimentum sit amet luctus sed, consequat et tortor. Etiam non tortor eu nunc euismod aliquet vitae a odio.

Advanced Example

Complex custom HTML to style buttons and content.


Add the class of toggle-rotate-90 or toggle-rotate-180 to the icon to rotate it when the collapse is open. Add the class of toggle-transition-height to the collapse content to animate the height of the content when it opens and closes.


Add a span.toggle-swap-icons around two icons to swap between two icons when the collapse is open.

Collapse JS Events

The collapse JS fires these events. These events bubble, so you can listen for them on the collapse element, any parent, or the document. event.detail contains references to the collapse and collapseToggle elements.

	document.addEventListener('ntgt.collapse.opened', function(event){
		console.log('Collapse Opened: ', event.detail);
	}, false);

Collapse JS Functions

You can use these functions to initialize, open, and close collapses. If you call ntgt.init() after all the collapses are in the DOM everything should just work. But if you add collapses to the DOM after that init function has run, you will need to run the collapse init function below. Also, if you want to open or close a collapse from code without the user clicking the collapse toggle, you can use the toggle, open, and close functions below.

	// Initialize collapses and collapse accordions in a parent element
	let parent = document.querySelector('#my-parent');
	ntgt.collapse.initCollapses(parent);
	ntgt.collapse.initCollapseAccordions(parent);
	
	// Open a collapse
	let collapse = document.querySelector('#my-collapse');
	ntgt.collapse.open(collapse);
	
	// Close a collapse
	ntgt.collapse.close(collapse);

Popover1

Popover1 is a custom popover component. It does not use the HTML popover API. Popover 1 uses absolute positioning and the attach and align classes to position the popover relative to a popover-anchor element.

Popover1 Example 1

This example features two nested popovers. They use the content-slide classes to animate in and out.

popover1-anchor

Popover1 Example 2

This example features two nested popovers. They use the content-slide classes to animate in and out. It also uses the click-outside-close class on popover A. In case of nested click-outside-close popovers, only put the class on the top level popover.

popover1-anchor

Popover1 JS Events

The popover1 JS fires these events. These events bubble, so you can listen for them on the popover element, any parent, or the document. event.detail contains references to the popover element.

	document.addEventListener('ntgt.popover1.opened', function(event){
		console.log('Popover1 Opened: ', event.detail);
	}, false);

Popover1 JS Functions

You can use these functions to initialize, open, and close popover1s. If you call ntgt.init() after all the popover1s are in the DOM everything should just work. But if you add popover1s to the DOM after that init function has run, you will need to run the popover1 setupTriggers function below. Also, if you want to open or close a popover1 from code without the user clicking the trigger, you can use the toggle, open, and close functions below.

// Initialize popover1 triggers in a parent element
let parent = document.querySelector('#my-parent');
ntgt.popover1.setupTriggers(parent);

// Open a popover1
let popover = document.querySelector('#my-popover');
ntgt.popover1.open(popover);

// Close a popover1
ntgt.popover1.close(popover);

// Toggle a popover1
ntgt.popover1.toggle(popover);

Attach and Align

These classes are used to absolutely position an element relative to a parent element. For example, it can be used with popover1. First you pick a side to attach to and whether the element should be inside (covering) the parent or outside of it. Then you align it relative to the oposite axis you attached it to, aligning it to the start, end, or center of that axis. You should put these attach and align classes on an element, then have a child element that has any visible border or background. Then you can put margin on the child element to move it away from the edges.

Relative parent
attach-outside-bs
align-is
Relative parent
attach-outside-bs
align-ic
Relative parent
attach-outside-bs
align-ie
Relative parent
attach-outside-be
align-is
Relative parent
attach-outside-be
align-ic
Relative parent
attach-outside-be
align-ie
Relative parent
attach-outside-is
align-bs
Relative parent
attach-outside-is
align-bc
Relative parent
attach-outside-is
align-be
Relative parent
attach-outside-ie
align-bs
Relative parent
attach-outside-ie
align-bc
Relative parent
attach-outside-ie
align-be
Relative parent
attach-inside-bs
align-is
Relative parent
attach-inside-bs
align-ic
Relative parent
attach-inside-bs
align-ie
Relative parent
attach-inside-be
align-is
Relative parent
attach-inside-be
align-ic
Relative parent
attach-inside-be
align-ie
Relative parent
attach-inside-is
align-bs
Relative parent
attach-inside-is
align-bc
Relative parent
attach-inside-is
align-be
Relative parent
attach-inside-ie
align-bs
Relative parent
attach-inside-ie
align-bc
Relative parent
attach-inside-ie
align-be

Container

Container simply adds a standard amount of inline padding. Wrap it in container-grid and it will apply a 12-column grid (6-column on xs and sm) that is used to limit the width of the container to 10 columns on xxl screens and 8 columns on xxxl screens. Then use a container-grid-inner to set up a matching grid inside it that can be used to align children to the container-grid's 6 or 12-column grid.

container
1
2
3
4
5
6
7
8
9
10
11
12
container-grid > container
container-grid-inner:
1
2
3
4
5
6
7
8
9
10
11
12
container-grid > container-small
starts limiting columns at the lg breakpoint and limits more on xxl and xxxl screens.
container-grid > container-small > --max-inline-size-lg: 42rem
Here we set a max-inline-size to further restrict the content width. The idea here is that we use container-small to initially limit the width so it is never almost aligned with normal container-grid > container but not quite. This would look like a mistake. So container-small forces a full column of limitation at first, then the inner div with max-inline-size kicks in to further limit the width. You can set the max-inline-size to any value you need.

Spacing Scale

--sp-1
--sp-2
--sp-3
--sp-4
--sp-5
--sp-6
--sp-7
--sp-8
--sp-9
--sp-10

Font Size Scale

--fs-1
--fs-2
--fs-3
--fs-4
--fs-5
--fs-6
--fs-7
--fs-8
--fs-9
--fs-10
--fs-11
--fs-12
--fs-13
--fs-14

Border Radius Sizes

--br-0
--br-1
--br-2
--br-3
--br-4
--br-5
--br-6
--br-7
--br-8
--br-9
--br-10
--br-full

Line Weights


--ln-1

--ln-2

--ln-3

--ln-4

--ln-5

Color System

Neutral

--clr-neutral-10
--clr-neutral-20
--clr-neutral-30
--clr-neutral-40
--clr-neutral-50
--clr-neutral-60
--clr-neutral-70
--clr-neutral-80
--clr-neutral-90
--clr-neutral-95

Accent 1

--clr-accent1-10
--clr-accent1-20
--clr-accent1-30
--clr-accent1-40
--clr-accent1-50
--clr-accent1-60
--clr-accent1-70
--clr-accent1-80
--clr-accent1-90
--clr-accent1-95

Accent 2

--clr-accent2-10
--clr-accent2-20
--clr-accent2-30
--clr-accent2-40
--clr-accent2-50
--clr-accent2-60
--clr-accent2-70
--clr-accent2-80
--clr-accent2-90
--clr-accent2-95

Danger

--clr-danger-10
--clr-danger-20
--clr-danger-30
--clr-danger-40
--clr-danger-50
--clr-danger-60
--clr-danger-70
--clr-danger-80
--clr-danger-90
--clr-danger-95

Warning

--clr-warning-10
--clr-warning-20
--clr-warning-30
--clr-warning-40
--clr-warning-50
--clr-warning-60
--clr-warning-70
--clr-warning-80
--clr-warning-90
--clr-warning-95

Success

--clr-success-10
--clr-success-20
--clr-success-30
--clr-success-40
--clr-success-50
--clr-success-60
--clr-success-70
--clr-success-80
--clr-success-90
--clr-success-95

Color Contexts