Variables & Mixins

Interactive Style comes with a set of variables and mixins you can use to keep your projects consistent. Import vars into each SCSS file and use any of them. See Colors if you're looking for color variables.

Import

@import "~@politico/interactive-style/vars.scss";

Fonts

NameValue
$din'din-2014', 'Helvetica Neue', Helvetica, Arial, sans-serif
$georgiaGeorgia, Times, 'Times New Roman', serif
$jubilat'Jubilat', Georgia, Times, 'Times New Roman', serif
$fancy-serif"Old Standard TT", serif
$monospace"SFMono-Regular", "Menlo", "Monaco", "Consolas","Liberation Mono","Courier New", monospace

Breakpoints

NameValue
$min-width-xs350px
$min-width-sm576px
$min-width-md768px
$min-width-lg992px
$min-width-xl1200px
$min-width-extra-small350px
$min-min-width-sm576px
$min-min-width-md768px
$min-width-large992px
$min-width-extra-large1200px

Other Variables

NameValue
$paragraph-width575px
$box-shadow-lightest0 1px 2px rgba(218, 218, 218, 0.10), 0 1px 2px rgba(204, 201, 201, 0.20)
$box-shadow-light0 1px 2px rgba(218, 218, 218, 0.16), 0 1px 2px rgba(204, 201, 201, 0.23)
$box-shadow-medium0 7px 6px rgba(230, 230, 230, 0.25), 0 4px 7px rgba(0,0,0,0.22)
$box-shadow-heavy0 14px 28px rgba(0,0,0,0.25), 0 10px 10px rgba(0,0,0,0.22)

Layout Mixins

NameValue
paragraph-widthSets max width to $paragraph-width
content-smallSets max width to 400px
content-fitAlias for paragraph-width
content-largeSets max width to 800px
content-extra-largeSets max width to 800px
content-full-widthSets max width to 100%

Typography Mixins

NameValue
heading-marginsMargin and paragraph widths for headings
h1Base styles for h1
h1-xlXL breakpoint styles for h1
h1-lgLG breakpoint styles for h1
h1-mdMD breakpoint styles for h1
h1-smSM breakpoint styles for h1
h1-xsXS breakpoint styles for h1
h1-marginsMargins for h1
h1-allCombines all h1 mixins at set breakpoints
h2Base styles for h2
h2-bolderBolder additions for h2 variant
h2-xsXS breakpoint styles for h2
h2-allCombines all h2 mixins at set breakpoints
h3Base styles for h3
h3-lighterLighter additions for h3 variant
h3-xsXS breakpoint styles for h3
h3-allCombines all h3 mixins at set breakpoints
h4Base styles for h4
h4-lighterLighter additions for h4 variant
h5Base styles for h5
h5-bolderBolder additions for h5 variant
h5-xsXS breakpoint styles for h5
h5-allCombines all h5 mixins at set breakpoints
h6Base styles for h6
h6-bolderBolder additions for h6 variant
body-textBase styles for body text
body-text-sansStyle additions for sans-serif body variant
body-marginsMargin and paragraph widths for body text
anchor-tagBase styles for links
code-textBase styles for in-line code text

Other Mixins

NameValue
clearfixClear any floats at the end of this element
center-clearClear center
margin-autoExplicity set margin-left and margin-right to auto
header-paddingPadding for header elements