Skip to main content

Text Styles

A note on H1s:
H1s appear ONLY once in the header of the page and should not be used in the body. They are 4rem.

h2 - 2.25rem

H2s are the primary heading in the body. They denote a new section on the page. They are the only element with 60px of margin above them and automatically propagate to the right side page navigation if there is more than one h2 on the page. *I have intentionally removed the link from this h2.

h3 - 1.75rem

H3s are the secondary header in the body of the page. They do not propagate to the sidebar and have 20px of margin below them like all other elements.

h4 - 1.5rem

h5 - 1.5rem

H4s and H5s are the same at this time. H5s are not typically used. H4s are preferred.

Lists

  1. First Item
  2. Second Item
  3. Third Item
  4. Forth Item
  5. Fifth Item
  • First Item
  • Second Item
  • Third Item
  • Forth Item
  • Fifth Item

Paragraph - 1rem - This is just a normal paragraph of text. This is a link inside a paragraph of text.` It is the default link style for the body of the site.

Spacing

--step and --rpx

We use a 4px grid system. There are two special variables that you can use in our css: --step and --rpx you don’t use these as you would normal variables. Instead you can simply write something like margin: 2--step or border-width: 1--rpx and the site will compile it for you.

Steps

1 --step is equivalent to .25rem or 4px. You can add any number in front to make a multiple of 1 —step. For example:

  • 1--step = 4px (0.25rem)
  • 2--step = 8px (0.5rem)
  • 3--step = 12px (0.75rem)
  • etc..

Rpx

--rpx is similar to --step except that it represents 0.0625rem or 1px. For example:

  • 1--rpx = 1px (.0625rem)
  • 2--rpx = 2px (.125rem)
  • 3--rpx = 3px (.1875rem)
  • etc…

General spacing rules

  • New sections are defined by H2s they have 60px of space above them.
  • Within a section, each element should have 20px of space between it and the next element.
  • Check out this Figma for specifics. (Must be logged in to figma)

Colors Variable

System Colors

ColorVariableReference VariableUse
--InverseColorvar(--DarkBlue950Color)Main text color on light backgrounds
--PlaceholderColorvar(--Grey500Color)Placeholder color for inputs
--PrimaryColorvar(--Neutral000Color)Background of all docs pages and White text used on dark backgrounds
--SecondaryColorvar(--Grey300Color)Subtitle color for dark backgrounds
--FocusLightvar(--Pink200Color)Light focus color intended for dark backgrounds
--FocusDarkvar(--Pink400Color)Dark focus color intended for light backgrounds

Base Colors

ColorVariableReference VariableUse
--BaseColorvar(--BrightBlue900Color)The dark background of home page containers, also background of algolia site search
--BaseColorDefaultvar(--DarkBlue800Color)Dark table background color
--BaseHeaderColorvar(--DarkBlue900Color)Dark table header background

Interactive Colors

ColorVariableReference VariableUse
--InteractiveColorvar(--BrightBlue500Color)Color of borders/text that are interactive in dark areas(homepage/navigation) also Icon side panel links and buttons
--InteractiveHoverColorvar(--BrightBlue400Color)Hover color of text/borders using InteractiveColor (homepage/navigation) Icon side panel hover color
--InteractiveMutedColorvar(--BrightBlue700Color)Hover/selected background color of interactive blocks (homepage/algolia search)

Surface Colors

ColorVariableReference VariableUse
--SurfaceColorvar(--DarkBlue850Color)Dark background color usually on homepage, also mobile menu bg

Misc colors

ColorVariablehsl/variableUse
--ExampleDoColorhsl(109 82% 39%)Color of border separating Example Do image and text
--ExampleDontColorhsl(13 99% 50%)Color of border separating Example Don’t image and text
--CautionBorderColorvar(--HotOrange600Color)Caution note border color
--NoteBorderColorvar(--DarkBlue500Color)Note border color
--NoteColorvar(--Grey100Color)Note/caution background color

Reference colors

TODO: we are currently using these colors directly. If we want a design system thinking these should be used in terms of other variables.

ColorVariableHSLUse
--BrightBlue200Colorhsl(205 88% 90%)icon background color(icon library), component playground behind select indicator
--BrightBlue400Colorhsl(209 100% 79%)—InteractiveHoverColor (homepage/icon library side)
--BrightBlue500Colorhsl(208 100% 65%)—InteractiveColor (homepage) , also active arrow color on feedback
--BrightBlue600Colorhsl(209 61% 52%)Compliance t2 tag color
--BrightBlue700Colorhsl(209 57% 39%)—InteractiveMutedColor (homepage/ algolia sitesearch)
--BrightBlue850Colorhsl(211 45% 14%)Code Block Background Color
--BrightBlue900Colorhsl(212 37% 10%)—BaseColor (homepage/algolia sitesearch)
--DarkBlue400Colorhsl(203 56% 42%)Component Playground border color of select menus and text fields (maybe retire this and use 500 instead)
--DarkBlue500Colorhsl(202 100% 28%)Playground: Border colors all other components, base color of navigation items, feedback widget borders & Header: tabs hover/current & Note color & Aside Highlight color
--DarkBlue600Colorhsl(202 100% 22%)Playground: Border hover color for switch, select, and text. Also navigation icons.
--DarkBlue700Colorhsl(208 54% 24%)Compliance hover color, support page submit button
--DarkBlue800Colorhsl(209 39% 17%)—BaseColorDefault, page header text color, playground: background color, icon library: sidepanel background, spec pages: images background color
--DarkBlue850Colorhsl(209 39% 17%)—SurfaceColor
--DarkBlue900Colorhsl(210 39% 15%)—SurfaceHeaderColor, —BaseHeaderColor can combine these two variables and name them something else
--DarkBlue950Colorhsl(213 36% 5%)—InverseColor
--Grey100Colorhsl(225, 25%, 97%)Playground: panel header background, text, radio, switch, select(off) background & Header background. Icon search background, table header background
--Grey200Colorhsl(216 31% 94%)Playground: panel header background, text, radio, switch, select(off) background & Header background. Icon search background, table header background
--Grey300Colorhsl(213 12% 85%)—SecondaryColor, also default table borders, and the icon library sidepanel text color
--Grey400Colorhsl(214 11% 76%)Icon Library search border color (recommendation: replace with something close)
--Grey500Colorhsl(217 11% 68%)—PlaceholderColor, also complicance deprecated tag color and close button on icon library sidebar
--Grey600Colorhsl(219 6% 51%)Icon Library: border between category and tags, Playground: borders between playground sections
--Grey700Colorhsl(216 6% 34%)Homepage
around cards, Tables header text color & divider lines, icon library search icon color
--Grey800Colorhsl(220 5% 24.7%)Compliannce widget border color, Playground panel header text color, right side text color
--Grey900Colorhsl(225 5% 16.86%)Contribution footer dividing line, Playground: panel body text color, Feedback: text color
--HotOrange600Colorhsl(20, 89%, 36%)—CautionBorderColor, —CautionColor (for now)
--Neutral000Colorhsl(0 0% 100%)—PrimaryColor -> it’s white, so wherever text and backgrounds are white
--Orange400Colorhsl(42 100% 67%)Focus text color
--Orange600Colorhsl(35 100% 62%)Homepage link color, note and caution link color
--Orange700Colorhsl(33 100% 50%)Design tokens page, site navigation ‘current’ color, and the dot in the Astro logo in the navigation bar.
--Pink200Colorhsl(290, 61%, 76%)—FocusLight
--Pink400Colorhsl(290, 61%, 51%)—FocusDark
--Pink600Colorhsl(290 100% 30%)Tier3 compliance tag
--Purple500Colorhsl(246, 54%, 63%)Compliance ‘updated’ text color
--Red700Colorhsl(350, 85%, 42%)Compliance ‘under review’ text color
--Green900Colorhsl(120, 100%, 18%)Compliance ‘new’ text color
--Teal600Colorhsl(181 100% 32%)Tier1 compliance

Homepage Only Colors

At Emily’s request, I’ve pulled ALL colors that are solely in use on the home page and placed them down here. This includes Reference colors (we can put them back under reference later.)

ColorVariableHSL/variableUse
--SurfaceHeaderColorvar(--DarkBlue900Color)Dark background header color (homepage)
--SurfaceSelectedColorvar(--DarkBlue700Color)Interactive element background (homepage)

Images

There are several sizes of images on the site but they all follow the same general pattern. The aspect ratio for images is around 16 x 9 but the height of the image can vary based on need.

Small Image

Typically used for do/don’t images.

Medium Image

These images match the width of the text content.

Large Image

These images match the width of tables

Extra Large Image

These images are the full width of tthe content area.

Columns & Tables

We have two different types of columns for use on the site. 2-column width and 3-column width. These both automatically shift at various breakpoints for responsiveness.

Two Column

First Column

Lorem ipsum dolor sit amet, consectetur adipiscing elit. Curabitur fermentum, lectus nec blandit tincidunt, felis orci viverra nisi, nec vehicula enim arcu eget mi. Duis posuere nisl vel enim pharetra, et dapibus lacus viverra. Nulla nec turpis vel tortor fermentum consectetur. Vestibulum in diam vel lorem finibus egestas. Aliquam sed molestie libero. Integer sit amet egestas odio. Phasellus purus augue, maximus sed turpis eu, pretium finibus augue. Quisque sit amet pulvinar tortor. In arcu ligula, laoreet eget consectetur id, feugiat posuere neque.

Second Column

Lorem ipsum dolor sit amet, consectetur adipiscing elit. Curabitur fermentum, lectus nec blandit tincidunt, felis orci viverra nisi, nec vehicula enim arcu eget mi. Duis posuere nisl vel enim pharetra, et dapibus lacus viverra. Nulla nec turpis vel tortor fermentum consectetur. Vestibulum in diam vel lorem finibus egestas. Aliquam sed molestie libero. Integer sit amet egestas odio. Phasellus purus augue, maximus sed turpis eu, pretium finibus augue. Quisque sit amet pulvinar tortor. In arcu ligula, laoreet eget consectetur id, feugiat posuere neque.

Three Column

First Column

Lorem ipsum dolor sit amet, consectetur adipiscing elit. Curabitur fermentum, lectus nec blandit tincidunt, felis orci viverra nisi, nec vehicula enim arcu eget mi. Duis posuere nisl vel enim pharetra, et dapibus lacus viverra. Nulla nec turpis vel tortor fermentum consectetur. Vestibulum in diam vel lorem finibus egestas.

Second Column

Lorem ipsum dolor sit amet, consectetur adipiscing elit. Curabitur fermentum, lectus nec blandit tincidunt, felis orci viverra nisi, nec vehicula enim arcu eget mi. Duis posuere nisl vel enim pharetra, et dapibus lacus viverra. Nulla nec turpis vel tortor fermentum consectetur. Vestibulum in diam vel lorem finibus egestas.

Third Column

Lorem ipsum dolor sit amet, consectetur adipiscing elit. Curabitur fermentum, lectus nec blandit tincidunt, felis orci viverra nisi, nec vehicula enim arcu eget mi. Duis posuere nisl vel enim pharetra, et dapibus lacus viverra. Nulla nec turpis vel tortor fermentum consectetur. Vestibulum in diam vel lorem finibus egestas.

Standard Table

This is the standard table design. There are a couple of variations on pages but those typically just adjust the max width of one of the rows so that the table doesn’t distort on mobile.

Column 1Column 2Column 3
Row 1ContentContent
Row 2ContentContent

Dark Table

Column 1Column 2Column 3
Row 1ContentContent
Row 2ContentContent

Special Components

Notes

This is a note, it is a div with the .note class. Link

This is a caution note, it is a div with the .caution class. Link

Do/Don’t

Many component pages have specific do/don’t images. These are usually side by side in a two column layout.

Do: Add 'Do:' in the front of this image
Do: Add 'Do:' in the front of this image
Don’t: Add it in front of this one. Add 'Don't:' instead
Don’t: Add it in front of this one. Add 'Don't:' instead

Code Blocks

This is a <code> block for html

<div>
	<ul>
		<li>List Item</li>
		<li>List Item</li>
		<li>List Item</li>
	</ul>
</div>

This is a <code> block for javascript

window.addEventListener('click', (event) => {
	// if the click is not on the key make sure it closes
	if (event.target.closest('.-toggle') === null) {
		eventElement.classList.remove('--open')
		eventElement.classList.add('--closed')
		return
	}
})
Feedback

Help us improve Astro

Please rate your present experience with Astro:

Cancel