Skip to content

Commit

Permalink
Install autoprefixer (#81)
Browse files Browse the repository at this point in the history
* Add autoprefixer and update build command to add prefixes after compiling sass

* Move missing fonts into folder and copy font faces file from design system
  • Loading branch information
annekainicUSDS authored Jun 15, 2018
1 parent 8cb4fa8 commit c889c5c
Show file tree
Hide file tree
Showing 9 changed files with 1,294 additions and 98 deletions.
90 changes: 52 additions & 38 deletions lib/css/styles.css

Large diffs are not rendered by default.

Binary file added lib/fonts/bitter-bold.ttf
Binary file not shown.
Binary file added lib/fonts/bitter-bold.woff2
Binary file not shown.
Binary file added lib/fonts/bitter-regular.ttf
Binary file not shown.
Binary file added lib/fonts/bitter-regular.woff2
Binary file not shown.
1,270 changes: 1,212 additions & 58 deletions package-lock.json

Large diffs are not rendered by default.

5 changes: 4 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,9 @@
"test": "test"
},
"scripts": {
"build": "node script/build.js && npm run compile-sass",
"build": "node script/build.js && npm run compile-sass && npm run autoprefix",
"compile-sass": "node-sass --include-path src/scss/styles.scss src/scss/styles.scss -o lib/css/",
"autoprefix": "npx postcss lib/css/styles.css --use autoprefixer -d lib/css/",
"lint": "npm run lint:js && npm run lint:sass",
"lint:js": "eslint --quiet --ext .js --ext .jsx .",
"lint:sass": "sass-lint -c test/config/sass-lint.yaml --verbose",
Expand All @@ -28,6 +29,7 @@
"homepage": "https://github.com/usds/us-forms-system#readme",
"devDependencies": {
"@department-of-veterans-affairs/formation": "^0.8.0",
"autoprefixer": "^8.6.2",
"babel-core": "^6.24.1",
"babel-eslint": "^7.2.3",
"babel-plugin-dynamic-import-node": "^1.2.0",
Expand Down Expand Up @@ -66,6 +68,7 @@
"moment": "^2.15.1",
"node-sass": "^4.5.3",
"null-loader": "^0.1.1",
"postcss-cli": "^5.0.0",
"react": "^15.6.2",
"react-dom": "^15.6.2",
"react-test-renderer": "^15.5.4",
Expand Down
25 changes: 25 additions & 0 deletions src/scss/base/_b-font-faces.scss
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
/* latin */
@font-face {
font-family: "Bitter";
font-style: normal;
font-weight: 400;
src:
local("Bitter Regular"),
local("Bitter-Regular"),
url(../fonts/bitter-regular.woff2) format("woff2"),
url(../fonts/bitter-regular.ttf) format("truetype");
unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02C6, U+02DA, U+02DC, U+2000-206F, U+2074, U+20AC, U+2212, U+2215;
}

/* latin */
@font-face {
font-family: "Bitter";
font-style: normal;
font-weight: 700;
src:
local("Bitter Bold"),
local("Bitter-Bold"),
url(../fonts/bitter-bold.woff2) format("woff2"),
url(../fonts/bitter-bold.ttf) format("truetype");
unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02C6, U+02DA, U+02DC, U+2000-206F, U+2074, U+20AC, U+2212, U+2215;
}
2 changes: 1 addition & 1 deletion src/scss/styles.scss
Original file line number Diff line number Diff line change
Expand Up @@ -35,13 +35,13 @@
@import "node_modules/uswds/src/stylesheets/components/sidenav";

@import "node_modules/@department-of-veterans-affairs/formation/sass/base/b-mixins";
@import "node_modules/@department-of-veterans-affairs/formation/sass/base/b-font-faces";
@import "node_modules/@department-of-veterans-affairs/formation/sass/modules/m-dropdown";
@import "node_modules/@department-of-veterans-affairs/formation/sass/modules/m-form-elements";
@import "node_modules/@department-of-veterans-affairs/formation/sass/modules/m-form-process";
@import "node_modules/@department-of-veterans-affairs/formation/sass/modules/m-progress-bar";
@import "node_modules/@department-of-veterans-affairs/formation/sass/base/va";
@import "node_modules/@department-of-veterans-affairs/formation/sass/shame";

@import "base/b-font-faces";
@import "modules/m-form-confirmation";
@import "modules/m-schemaform";

0 comments on commit c889c5c

Please sign in to comment.