// _______ _ // |__ __| | | // | | _ _ _ __ ___ __ _ _ __ __ _ _ __ | |__ _ _ // | || | | || '_ \ / _ \ / _` || '__|/ _` || '_ \ | '_ \ | | | | // | || |_| || |_) || (_) || (_| || | | (_| || |_) || | | || |_| | // |_| \__, || .__/ \___/ \__, ||_| \__,_|| .__/ |_| |_| \__, | // __/ || | __/ | | | __/ | // |___/ |_| |___/ |_| |___/ // Fluid Scaling type mixin @function strip-unit($value) { @return $value / ($value * 0 + 1); } @mixin fluid-type($min-vw, $max-vw, $min-font-size, $max-font-size) { $u1: unit($min-vw); $u2: unit($max-vw); $u3: unit($min-font-size); $u4: unit($max-font-size); @if $u1==$u2 and $u1==$u3 and $u1==$u4 { & { font-size: $min-font-size; @media screen and (min-width: $min-vw) { font-size: calc( #{$min-font-size} + #{strip-unit($max-font-size - $min-font-size)} * ((100vw - #{$min-vw}) / #{strip-unit($max-vw - $min-vw)}) ); } @media screen and (min-width: $max-vw) { font-size: $max-font-size; } } } } // Configure type sizes $min_width: 320px; $max_width: 1200px; $min_font: 14px; $max_font: 18px; $mob: 1.2; // Mobile scaling factor $desk: 1.25; // Desktop scaling factor html { @include fluid-type($min_width, $max_width, $min_font, $max_font); color: var(--primary); &:not(h1, h2, h3, h4, h5) { font-family: var(--body-copy); } } h1, h2, h3, h4, h5 { font-family: var(--headlines); } h1 { font-size: $mob * $mob * $mob * $mob * 1rem; line-height: 2rem; text-decoration: none; letter-spacing: -0.5px; font-weight: 900; font-family: var(--headlines); @include fluid-type( $min_width, $max_width, $mob * $mob * $mob * $mob * $min_font, $desk * $desk * $desk * $desk * $min_font ); } h2 { font-size: $mob * $mob * $mob * 1rem; line-height: 1.5rem; text-decoration: none; letter-spacing: -0.5px; font-weight: 700; font-family: var(--headlines); @include fluid-type( $min_width, $max_width, $mob * $mob * $mob * 0.9 * $min_font, $desk * $desk * $desk * 0.9 * $min_font ); } h3 { font-size: $mob * $mob * 1rem; line-height: 1.4rem; text-decoration: none; letter-spacing: -0.2px; font-weight: 600; font-family: var(--body-copy); @include fluid-type( $min_width, $max_width, $mob * $mob * 0.8 * $min_font, $desk * $desk * 0.8 * $min_font ); } p { font-size: 1rem; line-height: 1.5; &:last-child { } } body { font-size: 14px; line-height: 20px; } h1, h2, h3, h4, h5 { font-family: var(--headlines); } h1, h2:not(.text-subhead), h3 { letter-spacing: -0.5px; text-transform: uppercase; } h1, h2, h3, h4, h5, h6 { margin: 0; } h1 a, h2 a, h3 a, h4 a, h5 a { text-decoration: none; } h1 { font-size: 54px; line-height: 50px; } h2 { &:not(.text-subhead) { font-size: 40px; line-height: 40px; } &.text-subhead { font-size: 15px; line-height: 20px; font-weight: 700; font-family: var(--body-copy); } } h3 { font-size: 28px; line-height: 30px; } h4 { font-size: 16px; line-height: 20px; } h5 { font-size: 16px; line-height: 20px; font-family: var(--body-copy); } h6 { font-size: 1em; line-height: 1em; font-weight: 900; } .subtitle { font-size: 15px; line-height: 20px; font-weight: 700; font-family: var(--body-copy); } p { margin: 0; padding: 0; } .text-small-caps { text-transform: uppercase; } .text-large { font-size: 19px; line-height: 30px; } .text-caption { font-size: 12px; line-height: 20px; } .text-block-quote, blockquote { @extend .text-large; } a[href], a[href]:visited { color: var(--primary); } ul, ol, li { padding: 0; margin: 0; } .text-link { text-decoration: underline; text-underline-offset: 2px; &:hover { background-color: var(--highlight-soft); } } code { display: block; padding: 8px 16px; background: rgba(0, 0, 0, 0.05); font-family: Fira Code, monospace; font-style: normal; font-weight: 300; font-size: 13; line-height: 20px; } /* Typography Helpers */ .text-uppercase { text-transform: uppercase; } .text-capitalize { text-transform: capitalize; } .text-lowercase { text-transform: lowercase; } .text-overflow-ellipsis { text-overflow: ellipsis; overflow: hidden; white-space: nowrap; }