Skip to content

Commit

Permalink
Make font variables lowercase
Browse files Browse the repository at this point in the history
Our sass linting only allows hyphenated lowercase names.
As all of our font variable names have uppercase letters,
the `NameFormat` option needs to be disabled when they are used.
This makes all those variables lowercase while also providing
a fallback uppercase name to keep it backwards compatible
so that we can enable that linting option again in the future.
  • Loading branch information
selfthinker committed Nov 7, 2016
1 parent be0734c commit 3713169
Showing 1 changed file with 13 additions and 6 deletions.
19 changes: 13 additions & 6 deletions stylesheets/_font_stack.scss
Original file line number Diff line number Diff line change
Expand Up @@ -4,16 +4,23 @@
// scss-lint:disable NameFormat

// New Transport Light
$NTA-Light: "nta", Arial, sans-serif;
$NTA-Light-Tabular: "ntatabularnumbers", $NTA-Light;
$nta-light: "nta", Arial, sans-serif;
$nta-light-tabular: "ntatabularnumbers", $nta-light;

// Helvetica Regular
$Helvetica-Regular: "HelveticaNeue", "Helvetica Neue", "Arial", "Helvetica", sans-serif;
$helvetica-regular: "HelveticaNeue", "Helvetica Neue", "Arial", "Helvetica", sans-serif;

// Allow font stack to be overridden
// Not all apps using toolkit use New Transport
$toolkit-font-stack: $NTA-Light !default;
$toolkit-font-stack-tabular: $NTA-Light-Tabular !default;
$toolkit-font-stack: $nta-light !default;
$toolkit-font-stack-tabular: $nta-light-tabular !default;

// Font reset for print
$Print-reset: sans-serif;
$print-reset: sans-serif;

// fallback variable names after renaming them to be lowercase
// @deprecated, please only use the lowercase versions
$NTA-Light: $nta-light;
$NTA-Light-Tabular: $nta-light-tabular;
$Helvetica-Regular: $helvetica-regular;
$Print-reset: $print-reset;

0 comments on commit 3713169

Please sign in to comment.