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
- First Item
- Second Item
- Third Item
- Forth Item
- Fifth Item
- First Item
- Second Item
- Third Item
- Forth Item
- Fifth Item
Paragraphs and links
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
Color | Variable | Reference Variable | Use |
---|---|---|---|
--InverseColor | var(--DarkBlue950Color) | Main text color on light backgrounds | |
--PlaceholderColor | var(--Grey500Color) | Placeholder color for inputs | |
--PrimaryColor | var(--Neutral000Color) | Background of all docs pages and White text used on dark backgrounds | |
--SecondaryColor | var(--Grey300Color) | Subtitle color for dark backgrounds | |
--FocusLight | var(--Pink200Color) | Light focus color intended for dark backgrounds | |
--FocusDark | var(--Pink400Color) | Dark focus color intended for light backgrounds |
Base Colors
Color | Variable | Reference Variable | Use |
---|---|---|---|
--BaseColor | var(--BrightBlue900Color) | The dark background of home page containers, also background of algolia site search | |
--BaseColorDefault | var(--DarkBlue800Color) | Dark table background color | |
--BaseHeaderColor | var(--DarkBlue900Color) | Dark table header background |
Interactive Colors
Color | Variable | Reference Variable | Use |
---|---|---|---|
--InteractiveColor | var(--BrightBlue500Color) | Color of borders/text that are interactive in dark areas(homepage/navigation) also Icon side panel links and buttons | |
--InteractiveHoverColor | var(--BrightBlue400Color) | Hover color of text/borders using InteractiveColor (homepage/navigation) Icon side panel hover color | |
--InteractiveMutedColor | var(--BrightBlue700Color) | Hover/selected background color of interactive blocks (homepage/algolia search) |
Surface Colors
Color | Variable | Reference Variable | Use |
---|---|---|---|
--SurfaceColor | var(--DarkBlue850Color) | Dark background color usually on homepage, also mobile menu bg |
Misc colors
Color | Variable | hsl/variable | Use |
---|---|---|---|
--ExampleDoColor | hsl(109 82% 39%) | Color of border separating Example Do image and text | |
--ExampleDontColor | hsl(13 99% 50%) | Color of border separating Example Don’t image and text | |
--CautionBorderColor | var(--HotOrange600Color) | Caution note border color | |
--NoteBorderColor | var(--DarkBlue500Color) | Note border color | |
--NoteColor | var(--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.
Color | Variable | HSL | Use |
---|---|---|---|
--BrightBlue200Color | hsl(205 88% 90%) | icon background color(icon library), component playground behind select indicator | |
--BrightBlue400Color | hsl(209 100% 79%) | —InteractiveHoverColor (homepage/icon library side) | |
--BrightBlue500Color | hsl(208 100% 65%) | —InteractiveColor (homepage) , also active arrow color on feedback | |
--BrightBlue600Color | hsl(209 61% 52%) | Compliance t2 tag color | |
--BrightBlue700Color | hsl(209 57% 39%) | —InteractiveMutedColor (homepage/ algolia sitesearch) | |
--BrightBlue850Color | hsl(211 45% 14%) | Code Block Background Color | |
--BrightBlue900Color | hsl(212 37% 10%) | —BaseColor (homepage/algolia sitesearch) | |
--DarkBlue400Color | hsl(203 56% 42%) | Component Playground border color of select menus and text fields (maybe retire this and use 500 instead) | |
--DarkBlue500Color | hsl(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 | |
--DarkBlue600Color | hsl(202 100% 22%) | Playground: Border hover color for switch, select, and text. Also navigation icons. | |
--DarkBlue700Color | hsl(208 54% 24%) | Compliance hover color, support page submit button | |
--DarkBlue800Color | hsl(209 39% 17%) | —BaseColorDefault, page header text color, playground: background color, icon library: sidepanel background, spec pages: images background color | |
--DarkBlue850Color | hsl(209 39% 17%) | —SurfaceColor | |
--DarkBlue900Color | hsl(210 39% 15%) | —SurfaceHeaderColor, —BaseHeaderColor can combine these two variables and name them something else | |
--DarkBlue950Color | hsl(213 36% 5%) | —InverseColor | |
--Grey100Color | hsl(225, 25%, 97%) | Playground: panel header background, text, radio, switch, select(off) background & Header background. Icon search background, table header background | |
--Grey200Color | hsl(216 31% 94%) | Playground: panel header background, text, radio, switch, select(off) background & Header background. Icon search background, table header background | |
--Grey300Color | hsl(213 12% 85%) | —SecondaryColor, also default table borders, and the icon library sidepanel text color | |
--Grey400Color | hsl(214 11% 76%) | Icon Library search border color (recommendation: replace with something close) | |
--Grey500Color | hsl(217 11% 68%) | —PlaceholderColor, also complicance deprecated tag color and close button on icon library sidebar | |
--Grey600Color | hsl(219 6% 51%) | Icon Library: border between category and tags, Playground: borders between playground sections | |
--Grey700Color | hsl(216 6% 34%) | Homepage around cards, Tables header text color & divider lines, icon library search icon color | |
--Grey800Color | hsl(220 5% 24.7%) | Compliannce widget border color, Playground panel header text color, right side text color | |
--Grey900Color | hsl(225 5% 16.86%) | Contribution footer dividing line, Playground: panel body text color, Feedback: text color | |
--HotOrange600Color | hsl(20, 89%, 36%) | —CautionBorderColor, —CautionColor (for now) | |
--Neutral000Color | hsl(0 0% 100%) | —PrimaryColor -> it’s white, so wherever text and backgrounds are white | |
--Orange400Color | hsl(42 100% 67%) | Focus text color | |
--Orange600Color | hsl(35 100% 62%) | Homepage link color, note and caution link color | |
--Orange700Color | hsl(33 100% 50%) | Design tokens page, site navigation ‘current’ color, and the dot in the Astro logo in the navigation bar. | |
--Pink200Color | hsl(290, 61%, 76%) | —FocusLight | |
--Pink400Color | hsl(290, 61%, 51%) | —FocusDark | |
--Pink600Color | hsl(290 100% 30%) | Tier3 compliance tag | |
--Purple500Color | hsl(246, 54%, 63%) | Compliance ‘updated’ text color | |
--Red700Color | hsl(350, 85%, 42%) | Compliance ‘under review’ text color | |
--Green900Color | hsl(120, 100%, 18%) | Compliance ‘new’ text color | |
--Teal600Color | hsl(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.)
Color | Variable | HSL/variable | Use |
---|---|---|---|
--SurfaceHeaderColor | var(--DarkBlue900Color) | Dark background header color (homepage) | |
--SurfaceSelectedColor | var(--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 1 | Column 2 | Column 3 |
---|---|---|
Row 1 | Content | Content |
Row 2 | Content | Content |
Dark Table
Column 1 | Column 2 | Column 3 |
---|---|---|
Row 1 | Content | Content |
Row 2 | Content | Content |
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.
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
}
})