guides_style_18f 0.4.9 → 1.0.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (131) hide show
  1. checksums.yaml +4 -4
  2. data/assets/css/main.css +2 -0
  3. data/assets/css/page.css +36 -0
  4. data/assets/css/search.css +24 -0
  5. data/assets/img/18f-logo.png +0 -0
  6. data/assets/uswds/CONTRIBUTING.md +108 -0
  7. data/assets/uswds/LICENSE.md +63 -0
  8. data/assets/uswds/README.md +225 -0
  9. data/assets/uswds/css/uswds.css +4398 -0
  10. data/assets/uswds/css/uswds.min.css +4 -0
  11. data/assets/uswds/css/uswds.min.css.map +1 -0
  12. data/assets/uswds/fonts/merriweather-bold-webfont.eot +0 -0
  13. data/assets/uswds/fonts/merriweather-bold-webfont.ttf +0 -0
  14. data/assets/uswds/fonts/merriweather-bold-webfont.woff +0 -0
  15. data/assets/uswds/fonts/merriweather-bold-webfont.woff2 +0 -0
  16. data/assets/uswds/fonts/merriweather-italic-webfont.eot +0 -0
  17. data/assets/uswds/fonts/merriweather-italic-webfont.ttf +0 -0
  18. data/assets/uswds/fonts/merriweather-italic-webfont.woff +0 -0
  19. data/assets/uswds/fonts/merriweather-italic-webfont.woff2 +0 -0
  20. data/assets/uswds/fonts/merriweather-light-webfont.eot +0 -0
  21. data/assets/uswds/fonts/merriweather-light-webfont.ttf +0 -0
  22. data/assets/uswds/fonts/merriweather-light-webfont.woff +0 -0
  23. data/assets/uswds/fonts/merriweather-light-webfont.woff2 +0 -0
  24. data/assets/uswds/fonts/merriweather-regular-webfont.eot +0 -0
  25. data/assets/uswds/fonts/merriweather-regular-webfont.ttf +0 -0
  26. data/assets/uswds/fonts/merriweather-regular-webfont.woff +0 -0
  27. data/assets/uswds/fonts/merriweather-regular-webfont.woff2 +0 -0
  28. data/assets/uswds/fonts/sourcesanspro-bold-webfont.eot +0 -0
  29. data/assets/uswds/fonts/sourcesanspro-bold-webfont.ttf +0 -0
  30. data/assets/uswds/fonts/sourcesanspro-bold-webfont.woff +0 -0
  31. data/assets/uswds/fonts/sourcesanspro-bold-webfont.woff2 +0 -0
  32. data/assets/uswds/fonts/sourcesanspro-italic-webfont.eot +0 -0
  33. data/assets/uswds/fonts/sourcesanspro-italic-webfont.ttf +0 -0
  34. data/assets/uswds/fonts/sourcesanspro-italic-webfont.woff +0 -0
  35. data/assets/uswds/fonts/sourcesanspro-italic-webfont.woff2 +0 -0
  36. data/assets/uswds/fonts/sourcesanspro-light-webfont.eot +0 -0
  37. data/assets/uswds/fonts/sourcesanspro-light-webfont.ttf +0 -0
  38. data/assets/uswds/fonts/sourcesanspro-light-webfont.woff +0 -0
  39. data/assets/uswds/fonts/sourcesanspro-light-webfont.woff2 +0 -0
  40. data/assets/uswds/fonts/sourcesanspro-regular-webfont.eot +0 -0
  41. data/assets/uswds/fonts/sourcesanspro-regular-webfont.ttf +0 -0
  42. data/assets/uswds/fonts/sourcesanspro-regular-webfont.woff +0 -0
  43. data/assets/uswds/fonts/sourcesanspro-regular-webfont.woff2 +0 -0
  44. data/assets/uswds/img/alerts/error.png +0 -0
  45. data/assets/uswds/img/alerts/error.svg +17 -0
  46. data/assets/uswds/img/alerts/info.png +0 -0
  47. data/assets/uswds/img/alerts/info.svg +18 -0
  48. data/assets/uswds/img/alerts/success.png +0 -0
  49. data/assets/uswds/img/alerts/success.svg +12 -0
  50. data/assets/uswds/img/alerts/warning.png +0 -0
  51. data/assets/uswds/img/alerts/warning.svg +16 -0
  52. data/assets/uswds/img/angle-arrow-down-hover.png +0 -0
  53. data/assets/uswds/img/angle-arrow-down-hover.svg +1 -0
  54. data/assets/uswds/img/angle-arrow-down-primary-hover.png +0 -0
  55. data/assets/uswds/img/angle-arrow-down-primary-hover.svg +1 -0
  56. data/assets/uswds/img/angle-arrow-down-primary.png +0 -0
  57. data/assets/uswds/img/angle-arrow-down-primary.svg +1 -0
  58. data/assets/uswds/img/angle-arrow-down.png +0 -0
  59. data/assets/uswds/img/angle-arrow-down.svg +1 -0
  60. data/assets/uswds/img/angle-arrow-up-primary-hover.png +0 -0
  61. data/assets/uswds/img/angle-arrow-up-primary-hover.svg +1 -0
  62. data/assets/uswds/img/angle-arrow-up-primary.png +0 -0
  63. data/assets/uswds/img/angle-arrow-up-primary.svg +1 -0
  64. data/assets/uswds/img/arrow-down.png +0 -0
  65. data/assets/uswds/img/arrow-down.svg +1 -0
  66. data/assets/uswds/img/arrow-right.png +0 -0
  67. data/assets/uswds/img/arrow-right.svg +1 -0
  68. data/assets/uswds/img/circle-124.png +0 -0
  69. data/assets/uswds/img/close.png +0 -0
  70. data/assets/uswds/img/close.svg +1 -0
  71. data/assets/uswds/img/correct8.png +0 -0
  72. data/assets/uswds/img/correct8.svg +1 -0
  73. data/assets/uswds/img/correct9.png +0 -0
  74. data/assets/uswds/img/correct9.svg +1 -0
  75. data/assets/uswds/img/external-link-alt-hover.png +0 -0
  76. data/assets/uswds/img/external-link-alt-hover.svg +1 -0
  77. data/assets/uswds/img/external-link-alt.png +0 -0
  78. data/assets/uswds/img/external-link-alt.svg +1 -0
  79. data/assets/uswds/img/external-link-hover.png +0 -0
  80. data/assets/uswds/img/external-link-hover.svg +1 -0
  81. data/assets/uswds/img/external-link.png +0 -0
  82. data/assets/uswds/img/external-link.svg +1 -0
  83. data/assets/uswds/img/favicons/favicon-114.png +0 -0
  84. data/assets/uswds/img/favicons/favicon-144.png +0 -0
  85. data/assets/uswds/img/favicons/favicon-16.png +0 -0
  86. data/assets/uswds/img/favicons/favicon-192.png +0 -0
  87. data/assets/uswds/img/favicons/favicon-40.png +0 -0
  88. data/assets/uswds/img/favicons/favicon-57.png +0 -0
  89. data/assets/uswds/img/favicons/favicon-72.png +0 -0
  90. data/assets/uswds/img/favicons/favicon.ico +0 -0
  91. data/assets/uswds/img/favicons/favicon.png +0 -0
  92. data/assets/uswds/img/hero.png +0 -0
  93. data/assets/uswds/img/icon-dot-gov.svg +1 -0
  94. data/assets/uswds/img/icon-https.svg +1 -0
  95. data/assets/uswds/img/logo-img.png +0 -0
  96. data/assets/uswds/img/minus-alt.png +0 -0
  97. data/assets/uswds/img/minus-alt.svg +1 -0
  98. data/assets/uswds/img/minus.png +0 -0
  99. data/assets/uswds/img/minus.svg +1 -0
  100. data/assets/uswds/img/plus-alt.png +0 -0
  101. data/assets/uswds/img/plus-alt.svg +1 -0
  102. data/assets/uswds/img/plus.png +0 -0
  103. data/assets/uswds/img/plus.svg +1 -0
  104. data/assets/uswds/img/search-alt.png +0 -0
  105. data/assets/uswds/img/search-alt.svg +1 -0
  106. data/assets/uswds/img/search.png +0 -0
  107. data/assets/uswds/img/search.svg +1 -0
  108. data/assets/uswds/img/social-icons/png/facebook25.png +0 -0
  109. data/assets/uswds/img/social-icons/png/rss25.png +0 -0
  110. data/assets/uswds/img/social-icons/png/twitter16.png +0 -0
  111. data/assets/uswds/img/social-icons/png/youtube15.png +0 -0
  112. data/assets/uswds/img/social-icons/svg/facebook25.svg +1 -0
  113. data/assets/uswds/img/social-icons/svg/rss25.svg +1 -0
  114. data/assets/uswds/img/social-icons/svg/twitter16.svg +1 -0
  115. data/assets/uswds/img/social-icons/svg/youtube15.svg +1 -0
  116. data/assets/uswds/img/us_flag_small.png +0 -0
  117. data/assets/uswds/js/uswds.js +1416 -0
  118. data/assets/uswds/js/uswds.min.js +2 -0
  119. data/assets/uswds/js/uswds.min.js.map +1 -0
  120. data/lib/guides_style_18f/includes/banner.html +32 -0
  121. data/lib/guides_style_18f/includes/footer.html +44 -7
  122. data/lib/guides_style_18f/includes/head.html +70 -0
  123. data/lib/guides_style_18f/includes/header.html +56 -67
  124. data/lib/guides_style_18f/includes/sidebar-children.html +2 -6
  125. data/lib/guides_style_18f/includes/sidebar.html +7 -8
  126. data/lib/guides_style_18f/layouts/default.html +8 -25
  127. data/lib/guides_style_18f/sass/_guides_style_18f_main.scss +1 -0
  128. data/lib/guides_style_18f/sass/_variables.scss +0 -0
  129. data/lib/guides_style_18f/version.rb +1 -1
  130. metadata +123 -4
  131. data/assets/css/google-fonts.css +0 -58
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 9e522221bb24ba7e951f447d1dca197206038951
4
- data.tar.gz: 6fc69db673871e064bb8ee7c5344da4dd6c014f7
3
+ metadata.gz: 250cf18c217df1c23746ed023bea3329bcb95e30
4
+ data.tar.gz: 59cae6c1b16d13183da35c5326d0ad15931b09b2
5
5
  SHA512:
6
- metadata.gz: 95abe49659bb77122625a5393f49fede8123621f27198ca2c36fb1a4c7625f24a4634c5df51817627a6809bb4961d610440dcc2394e574ffb08bcf14075521f8
7
- data.tar.gz: a127678c2626847e7161538a5a06a599a43b7c77473b6220e9371a0a83d565f64ff78d2e256f51b862951eb9d2fad8480e6aaecba79f67541b3e429a1bbc4e42
6
+ metadata.gz: c3e4bb27a5593111ac013ff8b8a7ece99c6fa6f322b66b645a5751d40d616da51eaafa906a81304b8de38e13f52097e5328c20a97b68a810ed531bb301e93017
7
+ data.tar.gz: 1ed69343476cbf9ecb75acf7545535c5fa60e27d96cfa9c4c52ff13135411d0a12d1a2c633d67b73b7e3e781f71dc5e405a432a8967a840285965350a4f772cc
@@ -0,0 +1,2 @@
1
+ @import 'search.css';
2
+ @import 'page.css';
@@ -0,0 +1,36 @@
1
+ /* Addenda to the USWDS styles. */
2
+
3
+ header,
4
+ aside {
5
+ margin-bottom: 5rem; /* taken from WDS styleguide layout */
6
+ }
7
+
8
+ footer {
9
+ margin-top: 5rem;
10
+ }
11
+
12
+ .usa-footer-logo {
13
+ padding-top: 1rem;
14
+ }
15
+
16
+ .usa-footer-nav {
17
+ text-align: right;
18
+ border-right: 1px solid #d6d7d9;
19
+ }
20
+
21
+ .usa-footer-nav ul {
22
+ margin-right: 1rem;
23
+ padding-right: 1rem;
24
+ }
25
+
26
+ .usa-footer-slim .usa-footer-nav .usa-footer-primary-content {
27
+ margin-right: 0;
28
+ }
29
+
30
+ .usa-footer .usa-footer-primary-link {
31
+ padding: 0;
32
+ }
33
+
34
+ .usa-footer div:last-child .usa-footer-primary-content {
35
+ padding: 1rem 0;
36
+ }
@@ -0,0 +1,24 @@
1
+ /* Additional CSS needed to properly style the search bar.
2
+ * This is only necessary because we're using the
3
+ * jekyll_pages_api_search_interface tag instead of the USWDS markup. */
4
+
5
+ .usa-search .search-interface .label-text {
6
+ position: absolute;
7
+ left: -999em;
8
+ }
9
+
10
+ .usa-search .search-interface [type=submit] {
11
+ color: rgba(0,0,0,0);
12
+ }
13
+
14
+ @media screen and (min-width: 951px) {
15
+ .usa-nav-secondary .usa-search {
16
+ margin-top: -3rem;
17
+ }
18
+ }
19
+
20
+ @media screen and (max-width: 950px) {
21
+ .usa-nav-secondary {
22
+ margin-top: 6rem;
23
+ }
24
+ }
Binary file
@@ -0,0 +1,108 @@
1
+ ## Welcome!
2
+
3
+ We’re so glad you’re thinking about contributing to an 18F open source project! If you’re unsure about anything, just ask — or submit your issue or pull request anyway. The worst that can happen is we’ll politely ask you to change something. We appreciate all friendly contributions.
4
+
5
+ One of our goals is to ensure a welcoming environment for all contibutors to our projects. Our staff follows the [18F Code of Conduct](https://github.com/18F/code-of-conduct/blob/master/code-of-conduct.md), and all contributors should do the same.
6
+
7
+ We encourage you to read this project’s CONTRIBUTING policy (you are here), its [LICENSE](https://github.com/18F/web-design-standards/blob/staging/LICENSE.md), [README](https://github.com/18F/web-design-standards/blob/staging/README.md) and its [Workflow](https://github.com/18F/web-design-standards/wiki/Workflow) process.
8
+
9
+ If you have any questions or want to read more, check out the [18F Open Source Policy GitHub repository]( https://github.com/18f/open-source-policy), or just [shoot us an email](mailto:18f@gsa.gov).
10
+
11
+ ## Guidelines
12
+
13
+ ### Contributor Guidelines for Design
14
+ We have provided some guidelines for folks that would like to submit new components to the U.S. Web Design Standards and the lifecycle those new components will go through. For more detail, please visit the [guidelines on our wiki](https://github.com/18F/web-design-standards/wiki/Contribution-Guidelines:-Design).
15
+
16
+ ### Submitting an issue
17
+
18
+ To help us get a better understanding of the issue you’re submitting, follow our ISSUE TEMPLATE and the guidelines it describes.
19
+
20
+ ### Submitting a pull request
21
+
22
+ Here are a few guidelines to follow when submitting a pull request:
23
+
24
+ 1. Create a GitHub account or sign in to your existing account.
25
+ 1. Fork this repo into your GitHub account (or just clone it if you’re an 18F team member). Read more about forking a repo here on GitHub:
26
+ [https://help.github.com/articles/fork-a-repo/](https://help.github.com/articles/fork-a-repo/)
27
+ 1. Create a branch from `staging` that lightly defines what you’re working on (for example, add-styles).
28
+ 1. Ensure that your contribution works via `npm`, if applicable. See below under
29
+ _Install the package locally via `npm-link`_.
30
+ 1. Once you’re ready to submit a pull request, fill out the PULL REQUEST template provided.
31
+ 1. Submit your pull request against the `staging` branch.
32
+
33
+ Have questions or need help with setup? Open an issue here [https://github.com/18F/web-design-standards/issues](https://github.com/18F/web-design-standards/issues).
34
+
35
+ ### Running locally
36
+
37
+ The U.S. Web Design Standards `uswds` package (the ZIP download and the files needed to use the Standards on your project) is built using gulp automation. To use gulp, first make sure you've installed it on your machine globally.
38
+
39
+ ```sh
40
+ npm install --global gulp-cli
41
+ ```
42
+
43
+ Then, to start, run the following command to install any new dependencies:
44
+
45
+ ```sh
46
+ npm install
47
+ ```
48
+
49
+ The following examples detail a few `npm` commands that alias our gulp tasks and that are useful throughout local development:
50
+
51
+ ```sh
52
+ npm test
53
+ ```
54
+
55
+ This command runs the gulp task for `eslint` and our test suite for the `uswds` package. It is an alias for `gulp eslint test`.
56
+
57
+ ```sh
58
+ npm run build
59
+ ```
60
+
61
+ This command builds the `uswds` package. It is an alias for `gulp build`.
62
+
63
+ ```sh
64
+ npm run build:package
65
+ ```
66
+
67
+ This command builds the `uswds` package, which includes the zip files generated for release purposes. It is an alias for `gulp copy-vendor-sass && gulp release`.
68
+
69
+
70
+ ```sh
71
+ npm run watch
72
+ ```
73
+
74
+ This command watches for any changes that happen in the `src` directory and rebuilds the package if any changes are made.
75
+
76
+ ## Coding guidelines
77
+
78
+ The purpose of our coding styleguides are to create consistent coding practices across 18F. The styleguide should be treated as a guide — rules can be modified according to project needs.
79
+
80
+ This project follows the 18F Front End Guide [CSS](https://pages.18f.gov/frontend/#css) and [JavaScript](https://pages.18f.gov/frontend/#javascript). Please use this guide for your reference.
81
+
82
+ ## Our use of branches
83
+
84
+ The `staging` branch is the bleeding edge of development. When cutting a new [release](https://github.com/18F/web-design-standards/releases), we update the versioning on our files by branching off of the `staging` branch and submitting a pull request into our `release` branch. This helps to make `staging` a place that can always receive contributions, no matter where we are in the release process. New commits to `staging` are automatically deployed to [our staging site](https://standards-staging.usa.gov/).
85
+
86
+ The `master` branch always holds the latest production-ready release. When cutting a [release](https://github.com/18F/web-design-standards/releases), we create a release branch from `staging` named for the new version: for example, `v0.9.x`. Once we’ve completed QA on that branch, we tag the release and merge it into the `master` branch.
87
+
88
+ The branches `18f-pages` and `18f-pages-staging` _used_ to be the primary release and development branches, back when the site was hosted on `pages.18f.gov`. Those branches still auto deploy to 18F Pages, but will now only contain minimal redirects to the new site.
89
+
90
+ ## Licenses and attribution
91
+
92
+ ### A few parts of this project are not in the public domain
93
+
94
+ For complete attribution and licensing information for parts of the project that are not in the public domain, see [LICENSE.md](https://github.com/18F/web-design-standards/blob/staging/LICENSE.md).
95
+
96
+ ### The rest of this project is in the public domain
97
+
98
+ The rest of this project is in the worldwide [public domain](https://github.com/18F/web-design-standards/blob/staging/LICENSE.md).
99
+
100
+ This project is in the public domain within the United States, and
101
+ copyright and related rights in the work worldwide are waived through
102
+ the [CC0 1.0 Universal public domain dedication](https://creativecommons.org/publicdomain/zero/1.0/).
103
+
104
+ ### Contributions will be released into the public domain
105
+
106
+ All contributions to this project will be released under the CC0
107
+ dedication. By submitting a pull request, you are agreeing to comply
108
+ with this waiver of copyright interest.
@@ -0,0 +1,63 @@
1
+ ## A few parts of this project are not in the public domain
2
+
3
+ ### Files licensed under the SIL Open Font License
4
+
5
+ The Source Sans Pro font files in `src/fonts` are a customized subset of [Source Sans Pro](https://github.com/adobe-fonts/source-sans-pro), licensed under the [SIL Open Font License](http://scripts.sil.org/cms/scripts/page.php?item_id=OFL), and copyright [Adobe Systems Incorporated](http://www.adobe.com/), with Reserved Font Name 'Source'. All Rights Reserved. Source is a trademark of Adobe Systems Incorporated in the United States and/or other countries.
6
+
7
+ The Merriweather font files in `src/fonts` are from [Google Web Fonts](https://www.google.com/fonts#UsePlace:use/Collection:Merriweather:400,300,400italic,700,700italic), licensed under the [SIL Open Font License](http://scripts.sil.org/cms/scripts/page.php?item_id=OFL), and copyright [Sorkin Type Co](www.sorkintype.com) with Reserved Font Name 'Merriweather'.
8
+
9
+ The files in `src/img` are from [Font Awesome](http://fontawesome.io/) by Dave Gandy under the [SIL Open Font License 1.1](http://scripts.sil.org/OFL).
10
+
11
+ ### Files licensed under the MIT license
12
+
13
+ The files in `src/stylesheets/lib` are from:
14
+
15
+ * [Bourbon](http://bourbon.io/), copyright [thoughtbot](https://thoughtbot.com/), inc., under the [MIT license](https://github.com/thoughtbot/neat/blob/master/LICENSE.md).
16
+ * [Neat](http://neat.bourbon.io/), copyright [thoughtbot](https://thoughtbot.com/), inc., also under the [MIT license](https://github.com/thoughtbot/neat/blob/master/LICENSE.md).
17
+ * [Normalize.css](https://github.com/necolas/normalize.css), copyright Nicolas Gallagher and Jonathan Neal, under the [MIT license](https://github.com/necolas/normalize.css/blob/master/LICENSE.md).
18
+
19
+ The file `src/js/vendor/html5shiv.js` is from [HTML5 Shiv](https://github.com/afarkas/html5shiv), copyright Alexander Farkas (aFarkas), under the [MIT license](https://github.com/aFarkas/html5shiv/blob/master/MIT%20and%20GPL2%20licenses.md).
20
+
21
+ The file `src/js/vendor/rem.min.js` is from [REM unit polyfill](https://github.com/chuckcarpenter/REM-unit-polyfill), copyright Chuck Carpenter, under the [MIT license](https://github.com/chuckcarpenter/REM-unit-polyfill/blob/master/LICENSE.md).
22
+
23
+ The file `src/js/vendor/respond.js` is from [Respond.js](https://github.com/scottjehl/Respond), copyright Scott Jehl, under the [MIT license](https://github.com/scottjehl/Respond/blob/master/LICENSE-MIT).
24
+
25
+ The file `src/js/vendor/selectivizr-min.js` is from [Selectivizr](http://selectivizr.com/), copyright Keith Clark, under the [MIT license](http://opensource.org/licenses/mit-license.php).
26
+
27
+ #### Full license text for the MIT licensed files:
28
+
29
+ ```
30
+ The MIT License (MIT)
31
+
32
+ Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the “Software”), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
33
+
34
+ The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
35
+
36
+ THE SOFTWARE IS PROVIDED “AS IS”, WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
37
+ ```
38
+
39
+ ## The rest of this project is in the worldwide public domain
40
+
41
+ As a work of the United States government, this project is in the public domain within the United States.
42
+
43
+ Additionally, we waive copyright and related rights in the work worldwide through the [CC0 1.0 Universal public domain dedication](https://creativecommons.org/publicdomain/zero/1.0/).
44
+
45
+ ### CC0 1.0 Universal Summary
46
+
47
+ This is a human-readable summary of the [Legal Code (read the full text)](https://creativecommons.org/publicdomain/zero/1.0/legalcode).
48
+
49
+ #### No Copyright
50
+
51
+ The person who associated a work with this deed has dedicated the work to the public domain by waiving all of his or her rights to the work worldwide under copyright law, including all related and neighboring rights, to the extent allowed by law.
52
+
53
+ You can copy, modify, distribute and perform the work, even for commercial purposes, all without asking permission.
54
+
55
+ #### Other Information
56
+
57
+ In no way are the patent or trademark rights of any person affected by CC0, nor are the rights that other persons may have in the work or in how the work is used, such as publicity or privacy rights.
58
+
59
+ Unless expressly stated otherwise, the person who associated a work with this deed makes no warranties about the work, and disclaims liability for all uses of the work, to the fullest extent permitted by applicable law. When using or citing the work, you should not imply endorsement by the author or the affirmer.
60
+
61
+ ### Contributions to this project
62
+
63
+ As stated in [CONTRIBUTING](CONTRIBUTING.md), all contributions to this project will be released under the CC0 dedication. By submitting a pull request, you are agreeing to comply with this waiver of copyright interest.
@@ -0,0 +1,225 @@
1
+ # U.S. Web Design Standards
2
+
3
+ [![CircleCI Build Status](https://circleci.com/gh/18F/web-design-standards/tree/staging.svg?style=shield)](https://circleci.com/gh/18F/web-design-standards/tree/staging)
4
+
5
+ The [U.S. Web Design Standards](https://standards.usa.gov) include a library of open source UI components and a visual style guide for U.S. federal government websites.
6
+
7
+ This repository is for the Standards themselves. 18F maintains [another repository for the documentation and website](https://github.com/18F/web-design-standards-docs). To see the Standards and documentation on the web, visit [https://standards.usa.gov](https://standards.usa.gov).
8
+
9
+ ## Contents
10
+
11
+ * [Background](#background)
12
+ * [Recent updates](#recent-updates)
13
+ * [Getting started](#getting-started)
14
+ * [Using the Standards](#using-the-standards)
15
+ * [Download](#download)
16
+ * [Install using `npm`](#install-using-npm)
17
+ * [Importing assets](#importing-assets)
18
+ * [Sass](#sass)
19
+ * [JavaScript](#javascript)
20
+ * [Use another framework or package manager](#use-another-framework-or-package-manager)
21
+ * [Need installation help?](#need-installation-help)
22
+ * [Contributing to the code base](#contributing-to-the-codebase)
23
+ * [Reuse of open-source style guides](#reuse-of-open-source-style-guides)
24
+ * [Licenses and attribution](#licenses-and-attribution)
25
+
26
+ ## Background
27
+
28
+ The components and style guide of the U.S. Web Design Standards follow industry-standard web accessibility guidelines and use the best practices of existing style libraries and modern web design. The [U.S. Digital Service](https://www.whitehouse.gov/digital/united-states-digital-service) and [18F](https://18f.gsa.gov/) created and maintain the U.S. Web Design Standards for designers and developers. They are designed for use by government product teams who want to create beautiful, easy-to-use online experiences for the public. To learn more about the project, check out this [blog post](https://18f.gsa.gov/2015/09/28/web-design-standards/) and to view websites and applications check out our list [here](WHO_IS_USING_USWDS.md).
29
+
30
+ ## Recent updates
31
+
32
+ Information about the most recent release of the Standards can always be found in the [release history](https://github.com/18F/web-design-standards/releases). We include details about significant updates and any backwards incompatible changes along with a list of all changes.
33
+
34
+ ## Getting started
35
+
36
+ We’re glad you’d like to use the Standards — here’s how you can get started:
37
+
38
+ * Designers: [Check out our Getting Started for Designers information](https://standards.usa.gov/getting-started/designers/).
39
+ * [Design files of all the assets included in the Standards are available for download](https://github.com/18F/web-design-standards-assets/archive/master.zip).
40
+ * Developers: [Follow the instructions in this README to get started.](#using-the-standards)
41
+ * [CSS, JavaScript, image, and font files of all the assets on this site are available for download](https://github.com/18F/web-design-standards/releases/download/v1.0.0/uswds-1.0.0.zip).
42
+
43
+ ## Using the Standards
44
+
45
+ There are a few different ways to use the Standards within your project. Which one you choose depends on the needs of your project and how you are most comfortable working. Here are a few notes on what to consider when deciding which installation method to use:
46
+
47
+ *Download the Standards if:*
48
+ - You are not familiar with `npm` and package management.
49
+
50
+ *Use the Standards `npm` package if:*
51
+ - You are familiar with using `npm` and package management.
52
+ - You would like to leverage Standards [Sass](#sass) files.
53
+
54
+ ### Download
55
+
56
+ 1. Download the [Standards zip file](https://github.com/18F/web-design-standards/releases/download/v1.0.0/uswds-1.0.0.zip) and open that file.
57
+
58
+ After extracting the zip file you should see the following file and folder structure:
59
+
60
+ ```
61
+ uswds-1.0.0/
62
+ ├── js/
63
+ │   ├── uswds.min.js.map
64
+ │   ├── uswds.min.js
65
+ │   └── uswds.js
66
+ ├── css/
67
+ │   ├── uswds.min.css.map
68
+ │   ├── uswds.min.css
69
+ │   └── uswds.css
70
+ ├── img/
71
+ └── fonts/
72
+ ```
73
+
74
+ 2. Copy these files and folders into a relevant place in your project's code base. Here is an example structure for how this might look:
75
+
76
+ ```
77
+ example-project/
78
+ ├── assets/
79
+ │   ├── uswds-1.0.0/
80
+ │   ├── stylesheets/
81
+ │   ├── images/
82
+ │   └── javascript/
83
+ └── index.html
84
+ ```
85
+
86
+ You'll notice in our example above that we also outline a `stylesheets`, `images` and `javascript` folder in your `assets` folder. These folders are to help organize any assets that are unique to your project.
87
+
88
+ 3. To use the Standards on your project, you’ll need to reference the [CSS (*C*ascading *S*tyle *S*heets)](https://developer.mozilla.org/en-US/docs/Web/CSS) and JavaScript files in each HTML page or dynamic templates in your project.
89
+
90
+ Here is an example of how to reference these assets in your `index.html` file:
91
+
92
+ ```html
93
+ <!DOCTYPE html>
94
+ <html>
95
+ <head>
96
+ <meta charset="utf-8">
97
+ <meta http-equiv="X-UA-Compatible" content="IE=edge">
98
+ <title>My Example Project</title>
99
+ <link rel="stylesheet" href="assets/uswds-1.0.0/css/uswds.min.css">
100
+ </head>
101
+ <body>
102
+
103
+ <script src="assets/uswds-1.0.0/js/uswds.min.js"></script>
104
+ </body>
105
+ </html>
106
+ ```
107
+
108
+ We offer both files, the CSS and the JavaScript, in two versions — a minified version, and an un-minified one. (In the examples above, we are using the minified files.) Use the minified files in a production environment or to reduce the file size of your downloaded assets. And the un-minified files are better if you are in a development environment or would like to debug the CSS or JavaScript assets in the browser.
109
+
110
+ And that’s it — you should now be able to copy our code samples into our `index.html` and start using the Standards.
111
+
112
+ ### Install using npm
113
+
114
+ `npm` is a package manager for Node based projects. The U.S. Web Design Standards maintains a [`uswds` package](https://www.npmjs.com/package/uswds) for you to utilize both the pre-compiled and compiled files on your project.
115
+
116
+ 1. Install `Node/npm`. Below is a link to find the install method that coincides with your operating system:
117
+
118
+ - Node v4.2.3+, [Installation guides](https://nodejs.org/en/download/)
119
+
120
+ **Note for Windows users:** If you are using Windows and are unfamiliar with `Node` or `npm`, we recommend following [Team Treehouse's tutorial](http://blog.teamtreehouse.com/install-node-js-npm-windows) for more information.
121
+
122
+ 2. Make sure you have installed it correctly:
123
+
124
+ ```shell
125
+ npm -v
126
+ 3.10.8 # This line may vary depending on what version of Node you've installed.
127
+ ```
128
+
129
+ 3. Create a `package.json` file. You can do this manually, but an easier method is to use the `npm init` command. This command will prompt you with a few questions to create your `package.json` file.
130
+
131
+ 4. Add `uswds` to your project’s `package.json`:
132
+
133
+ ```shell
134
+ npm install --save uswds
135
+ ```
136
+
137
+ The `uswds` module is now installed as a dependency. You can use the un-compiled files found in the `src/` or the compiled files in the `dist/` directory.
138
+
139
+ ```
140
+ node_modules/uswds/
141
+ ├── dist/
142
+ │   ├── css/
143
+ │   ├── fonts/
144
+ │   ├── img/
145
+ │   ├── js/
146
+ └── src/
147
+    ├── fonts/
148
+    ├── img/
149
+    ├── js/
150
+    └── stylesheets/
151
+ ```
152
+
153
+ #### Importing assets
154
+
155
+ Since you are already using `npm`, the U.S. Web Design Standards team recommends leveraging the ability to write custom scripts. Here are some links to how we do this with our docs website using `npm` + [`gulp`](http://gulpjs.com/):
156
+
157
+ [Link to `npm` scripts example in `web-design-standards-docs`](https://github.com/18F/web-design-standards-docs/blob/staging/package.json#L4)
158
+ [Link to gulpfile.js example in `web-design-standards-docs`](https://github.com/18F/web-design-standards-docs/blob/staging/gulpfile.js)
159
+
160
+ #### Sass
161
+
162
+ The Standards are easily customizable using the power of [Sass (Syntactically Awesome Style Sheets)](http://sass-lang.com/). The main Sass (SCSS) source file is located here:
163
+
164
+ ```
165
+ node_modules/uswds/src/stylesheets/uswds.scss
166
+ ```
167
+
168
+ Global variables are defined in the `node_modules/uswds/src/stylesheets/core/_variables.scss` file. Custom theming can be done by copying the `_variables.scss` file into your own project’s Sass folder, changing applicable variable values, and importing it before `uswds.scss`.
169
+
170
+ Below is an example of how you might setup your main Sass file to achieve this:
171
+
172
+ ```
173
+ @import 'variables.scss' # Custom Sass variables file
174
+ @import 'node_modules/uswds/src/stylesheets/uswds.scss';
175
+
176
+ ```
177
+
178
+ You can now use your copied version of `_variables.scss` to override any styles to create a more custom look and feel to your application.
179
+
180
+ #### JavaScript
181
+ `require('uswds')` will load all of the U.S. Web Design Standards’ JavaScript onto the page. Add this line to whatever initializer you use to load JavaScript into your application.
182
+
183
+
184
+ ### Use another framework or package manager
185
+
186
+ If you’re using another framework or package manager that doesn’t support `npm`, you can find the source files in this repository and use them in your project. Otherwise, we recommend that you follow the [download instructions](#download). Please note that the core team [isn’t responsible for all frameworks’ implementations](https://github.com/18F/web-design-standards/issues/877).
187
+
188
+ If you’re interested in maintaining a package that helps us distribute the U.S. Web Design Standards, the project’s build system can help you create distribution bundles to use in your project. Please read our [contributing guidelines](CONTRIBUTING.md#building-the-project-locally-with--gulp-) to locally build distributions for your framework or package manager.
189
+
190
+ ## Need installation help?
191
+
192
+ Do you have questions or need help with setup? Did you run into any weird errors while following these instructions? Feel free to open an issue here:
193
+
194
+ [https://github.com/18F/web-design-standards/issues](https://github.com/18F/web-design-standards/issues).
195
+
196
+ You can also email us directly at uswebdesignstandards@gsa.gov.
197
+
198
+ ## Contributing to the code base
199
+
200
+ For complete instructions on how to contribute code, please read [CONTRIBUTING.md](CONTRIBUTING.md). These instructions also include guidance on how to set up your own copy of the Standards style guide website for development.
201
+
202
+ If you would like to learn more about our workflow process, check out the [Workflow](https://github.com/18F/web-design-standards/wiki/Workflow) and [Label Glossary](https://github.com/18F/web-design-standards/wiki/Label-glossary) pages on the wiki.
203
+
204
+ If you have questions or concerns about our contributing workflow, please contact us by [filing a GitHub issue](https://github.com/18F/web-design-standards/issues) or [emailing our team](mailto:uswebdesignstandards@gsa.gov).
205
+
206
+ ## Reuse of open-source style guides
207
+
208
+ Much of the guidance in the U.S. Web Design Standards leans on open source designs, code, and patterns from other civic and government organizations, including:
209
+
210
+ * Consumer Financial Protection Bureau’s [Design Manual](https://cfpb.github.io/design-manual/)
211
+ * U.S. Patent and Trademark Office’s [Design Patterns](http://uspto.github.io/designpatterns/)
212
+ * Healthcare.gov [Style Guide](http://styleguide.healthcare.gov/)
213
+ * UK’s Government Digital Service’s [UI Elements](http://govuk-elements.herokuapp.com/)
214
+ * Code for America’s Chime [Styleguide](https://github.com/chimecms/chime-starter)
215
+ * Pivotal Labs [Component Library](http://styleguide.cfapps.io/)
216
+
217
+ ## Licenses and attribution
218
+
219
+ A few parts of this project are not in the public domain. Attribution and licensing information for those parts are described in detail in [LICENSE.md](LICENSE.md).
220
+
221
+ The rest of this project is in the worldwide public domain, released under the [CC0 1.0 Universal public domain dedication](https://creativecommons.org/publicdomain/zero/1.0/).
222
+
223
+ ## Contributing
224
+
225
+ All contributions to this project will be released under the CC0 dedication alongside the public domain portions of this project. For more information, see [CONTRIBUTING.md](CONTRIBUTING.md).