alert-circle An exclamation point inside of a circle. alert-triangle An exclamation point inside of a triangle shape. arrow-down-left An arrow pointing down and to the left. arrow-down-right An arrow pointing down and to the right. arrow-down An arrow pointing down. arrow-left An arrow pointing left. arrow-right-thick A thick arrow pointing right arrow-right An arrow pointing right. arrow-up-left An arrow pointing up and to the left. arrow-up-right-thick A thick arrow pointing up and to the right arrow-up-right An arrow pointing up and to the right. arrow-up-thick A thick arrow pointing up arrow-up An arrow pointing up. award A award bell A bell. calendar A calendar icon. camera-off A camera that is deactivated. camera A camera. check-circle A checkmark in a circle. checkmark A checkmark. chevron-down A chevron arrow pointing down. chevron-up A chevron arrow pointing up. chevron A chevron arrow pointing down. chevron A chevron arrow pointing down. chrome Chrome browser logo. close-circle An x in a circle. close A x shape. door A car door. edge Edge browser logo. ellipses An ellipses shape. engine A car engine. envelope A closed envelope. explorer Internet explorer logo. eye-off An eye that is deactivated. eye An eye. facebook Facebook logo. file-text A piece of paper with lines on it. file A blank piece of paper. firefox Firefox browser logo icon-flame A flame. fwd A car drivetrain. gear A gear with multiple teeth. grid A 2x2 grid. heart An empty heart. height-width Arrows indicating height and width measurement. home A home icon. info THe letter i in a circle. instagram Instagram logo. link A chain link. linkedin Linkedin logo. map-marker A map marker pin. maximize Four corners containing a plus sign. menu Three lines signifying a menu. message-circle A speech bubble. minus A minus dash. mpg A car dashboard gauge. opera Opera browser logo. pause A pause symbol. pencil A pencil. phone A phone handset. pinteest-disc Pinterest logo in a disc. pinterest Pinterest logo. play A play button. plus A plus symbol. safari Safari browser logo. search A magnifying glass. seat A car seat. shield A shield sliders A group of control sliders. square A square with rounded corners star A star. tag A shopping tag. thumbs-down A hand with the thumb pointing down. thumbs-up A hand with the thumb pointing up. trash A trash can. trophy A trophy. truck A truck icon. twitter Twitter logo. user-circle An outline of a person in a circle. user An outline of a person. video A video camera. youtube Youtube logo. zoom-in A magnifying glass with a plus in the center alert-circle An exclamation point inside of a circle. alert-triangle An exclamation point inside of a triangle shape. arrow-down-left An arrow pointing down and to the left. arrow-down-right An arrow pointing down and to the right. arrow-down An arrow pointing down. arrow-left An arrow pointing left. arrow-right-thick A thick arrow pointing right arrow-right An arrow pointing right. arrow-up-left An arrow pointing up and to the left. arrow-up-right-thick A thick arrow pointing up and to the right arrow-up-right An arrow pointing up and to the right. arrow-up-thick A thick arrow pointing up arrow-up An arrow pointing up. award A award bell A bell. calendar A calendar icon. camera-off A camera that is deactivated. camera A camera. check-circle A checkmark in a circle. checkmark A checkmark. chevron-down A chevron arrow pointing down. chevron-up A chevron arrow pointing up. chevron A chevron arrow pointing down. chevron A chevron arrow pointing down. chrome Chrome browser logo. close-circle An x in a circle. close A x shape. door A car door. edge Edge browser logo. ellipses An ellipses shape. engine A car engine. envelope A closed envelope. explorer Internet explorer logo. eye-off An eye that is deactivated. eye An eye. facebook Facebook logo. file-text A piece of paper with lines on it. file A blank piece of paper. firefox Firefox browser logo icon-flame A flame. fwd A car drivetrain. gear A gear with multiple teeth. grid A 2x2 grid. heart An empty heart. height-width Arrows indicating height and width measurement. home A home icon. info THe letter i in a circle. instagram Instagram logo. link A chain link. linkedin Linkedin logo. map-marker A map marker pin. maximize Four corners containing a plus sign. menu Three lines signifying a menu. message-circle A speech bubble. minus A minus dash. mpg A car dashboard gauge. opera Opera browser logo. pause A pause symbol. pencil A pencil. phone A phone handset. pinteest-disc Pinterest logo in a disc. pinterest Pinterest logo. play A play button. plus A plus symbol. safari Safari browser logo. search A magnifying glass. seat A car seat. shield A shield sliders A group of control sliders. square A square with rounded corners star A star. tag A shopping tag. thumbs-down A hand with the thumb pointing down. thumbs-up A hand with the thumb pointing up. trash A trash can. trophy A trophy. truck A truck icon. twitter Twitter logo. user-circle An outline of a person in a circle. user An outline of a person. video A video camera. youtube Youtube logo. zoom-in A magnifying glass with a plus in the center facebook Facebook logo. instagram Instagram logo. linkedin Linkedin logo. pinteest-disc Pinterest logo in a disc. pinterest Pinterest logo. twitter Twitter logo. youtube Youtube logo.
Spark logo Spark Design System
STYLE-GUIDE

Spacing

Every measurement for consistent margin and padding

Form and section spacing

Section spacing and page layout using Spark CSS classes is documented on the Page sections page.

Examples

Use the toggle at the top of these page templates to visualize spacing on mobile and desktop.

Note: This is not a complete example, as with the limitations of CSS some of the margins or paddings can't be shown. However, this does represent most of them to get a good idea.

Layout of form elements and form design specs will be documented on the Forms page.

Value scale

Our spacing system is based on multiples of 4 and 8. Multiples of 4 are mostly used in Typography. These rules are agnostic of breakpoints or platform, and should apply globally to all types of content.

Functions for space include the following, mapped to their current values:

Function Description Value Token
Space between related pattern elements View example Represents related yet separate elements that inform each other 8px $sds-global-spacing-micro
Connection between groups of elements or patterns View example Represents the flow of items that are related yet serve different purposes 16px $sds-global-spacing-medium
Offsetting visually View example Represents a maintained flow or idea yet visually separated for emphasis 24px $sds-global-spacing-large

Examples

Example of 8px spacing
  • A photo and a caption
  • A heading and a sub-heading
  • Space between icon buttons

Connection between groups of elements or patterns

Example of 16px spacing
  • A photo and a heading
  • A description and a “read more” link
  • Photos in a gallery grid
  • Buttons in a form

16px should also be used as default horizontal padding on a container or viewport.

Offsetting visually

  • A section header area and section content area
  • Space between buttons or links (that perform markedly different actions) in a module

Exceptions

Exceptions to the above rules can be made as needed to push work forward, but should be avoided.

Optical adjustment

As noted in Optical Effects in User Interfaces, and especially for icon or illustration sizing and layout, some optical adjustment may be necessary.

Adjustment of spacing or padding within pages, sections or modules should be communicated to the Spark team so that we can note any deviations as possible iterations or amendments to the above system.