uswds-rails 0.1.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +7 -0
- data/.codeclimate.yml +17 -0
- data/.editorconfig +14 -0
- data/.gitignore +28 -0
- data/.rspec +3 -0
- data/.rubocop +3 -0
- data/.rubocop.yml +16 -0
- data/.ruby-version +1 -0
- data/.simplecov +13 -0
- data/.travis.yml +18 -0
- data/CONTRIBUTING.md +50 -0
- data/Gemfile +4 -0
- data/LICENSE.md +27 -0
- data/README.md +64 -0
- data/Rakefile +8 -0
- data/app/assets/stylesheets/uswds/components/_accordions.scss +150 -0
- data/app/assets/stylesheets/uswds/components/_alerts.scss +85 -0
- data/app/assets/stylesheets/uswds/components/_footer.scss +382 -0
- data/app/assets/stylesheets/uswds/components/_forms.scss +164 -0
- data/app/assets/stylesheets/uswds/components/_hero.scss +43 -0
- data/app/assets/stylesheets/uswds/components/_navigation.scss +446 -0
- data/app/assets/stylesheets/uswds/components/_search.scss +106 -0
- data/app/assets/stylesheets/uswds/core/_utilities.scss +232 -0
- data/app/assets/stylesheets/uswds/core/_variables.scss +112 -0
- data/app/assets/stylesheets/uswds/elements/_inputs.scss +346 -0
- data/app/assets/stylesheets/uswds/elements/_typography.scss +257 -0
- data/app/assets/stylesheets/uswds/uswds.scss +44 -0
- data/lib/uswds-rails.rb +1 -0
- data/lib/uswds/rails.rb +7 -0
- data/lib/uswds/rails/engine.rb +17 -0
- data/lib/uswds/rails/version.rb +6 -0
- data/uswds-rails.gemspec +36 -0
- data/vendor/assets/fonts/uswds/merriweather-bold-webfont.eot +0 -0
- data/vendor/assets/fonts/uswds/merriweather-bold-webfont.ttf +0 -0
- data/vendor/assets/fonts/uswds/merriweather-bold-webfont.woff +0 -0
- data/vendor/assets/fonts/uswds/merriweather-bold-webfont.woff2 +0 -0
- data/vendor/assets/fonts/uswds/merriweather-italic-webfont.eot +0 -0
- data/vendor/assets/fonts/uswds/merriweather-italic-webfont.ttf +0 -0
- data/vendor/assets/fonts/uswds/merriweather-italic-webfont.woff +0 -0
- data/vendor/assets/fonts/uswds/merriweather-italic-webfont.woff2 +0 -0
- data/vendor/assets/fonts/uswds/merriweather-light-webfont.eot +0 -0
- data/vendor/assets/fonts/uswds/merriweather-light-webfont.ttf +0 -0
- data/vendor/assets/fonts/uswds/merriweather-light-webfont.woff +0 -0
- data/vendor/assets/fonts/uswds/merriweather-light-webfont.woff2 +0 -0
- data/vendor/assets/fonts/uswds/merriweather-regular-webfont.eot +0 -0
- data/vendor/assets/fonts/uswds/merriweather-regular-webfont.ttf +0 -0
- data/vendor/assets/fonts/uswds/merriweather-regular-webfont.woff +0 -0
- data/vendor/assets/fonts/uswds/merriweather-regular-webfont.woff2 +0 -0
- data/vendor/assets/fonts/uswds/sourcesanspro-bold-webfont.eot +0 -0
- data/vendor/assets/fonts/uswds/sourcesanspro-bold-webfont.ttf +0 -0
- data/vendor/assets/fonts/uswds/sourcesanspro-bold-webfont.woff +0 -0
- data/vendor/assets/fonts/uswds/sourcesanspro-bold-webfont.woff2 +0 -0
- data/vendor/assets/fonts/uswds/sourcesanspro-italic-webfont.eot +0 -0
- data/vendor/assets/fonts/uswds/sourcesanspro-italic-webfont.ttf +0 -0
- data/vendor/assets/fonts/uswds/sourcesanspro-italic-webfont.woff +0 -0
- data/vendor/assets/fonts/uswds/sourcesanspro-italic-webfont.woff2 +0 -0
- data/vendor/assets/fonts/uswds/sourcesanspro-light-webfont.eot +0 -0
- data/vendor/assets/fonts/uswds/sourcesanspro-light-webfont.ttf +0 -0
- data/vendor/assets/fonts/uswds/sourcesanspro-light-webfont.woff +0 -0
- data/vendor/assets/fonts/uswds/sourcesanspro-light-webfont.woff2 +0 -0
- data/vendor/assets/fonts/uswds/sourcesanspro-regular-webfont.eot +0 -0
- data/vendor/assets/fonts/uswds/sourcesanspro-regular-webfont.ttf +0 -0
- data/vendor/assets/fonts/uswds/sourcesanspro-regular-webfont.woff +0 -0
- data/vendor/assets/fonts/uswds/sourcesanspro-regular-webfont.woff2 +0 -0
- data/vendor/assets/images/uswds/alerts/error.png +0 -0
- data/vendor/assets/images/uswds/alerts/error.svg +17 -0
- data/vendor/assets/images/uswds/alerts/info.png +0 -0
- data/vendor/assets/images/uswds/alerts/info.svg +18 -0
- data/vendor/assets/images/uswds/alerts/success.png +0 -0
- data/vendor/assets/images/uswds/alerts/success.svg +12 -0
- data/vendor/assets/images/uswds/alerts/warning.png +0 -0
- data/vendor/assets/images/uswds/alerts/warning.svg +16 -0
- data/vendor/assets/images/uswds/angle-arrow-down-hover.png +0 -0
- data/vendor/assets/images/uswds/angle-arrow-down-hover.svg +1 -0
- data/vendor/assets/images/uswds/angle-arrow-down-primary-hover.png +0 -0
- data/vendor/assets/images/uswds/angle-arrow-down-primary-hover.svg +1 -0
- data/vendor/assets/images/uswds/angle-arrow-down-primary.png +0 -0
- data/vendor/assets/images/uswds/angle-arrow-down-primary.svg +1 -0
- data/vendor/assets/images/uswds/angle-arrow-down.png +0 -0
- data/vendor/assets/images/uswds/angle-arrow-down.svg +1 -0
- data/vendor/assets/images/uswds/angle-arrow-up-primary-hover.png +0 -0
- data/vendor/assets/images/uswds/angle-arrow-up-primary-hover.svg +1 -0
- data/vendor/assets/images/uswds/angle-arrow-up-primary.png +0 -0
- data/vendor/assets/images/uswds/angle-arrow-up-primary.svg +1 -0
- data/vendor/assets/images/uswds/arrow-down.png +0 -0
- data/vendor/assets/images/uswds/arrow-down.svg +1 -0
- data/vendor/assets/images/uswds/arrow-right.png +0 -0
- data/vendor/assets/images/uswds/arrow-right.svg +1 -0
- data/vendor/assets/images/uswds/circle-124.png +0 -0
- data/vendor/assets/images/uswds/close.png +0 -0
- data/vendor/assets/images/uswds/close.svg +1 -0
- data/vendor/assets/images/uswds/correct8.png +0 -0
- data/vendor/assets/images/uswds/correct8.svg +1 -0
- data/vendor/assets/images/uswds/correct9.png +0 -0
- data/vendor/assets/images/uswds/correct9.svg +1 -0
- data/vendor/assets/images/uswds/external-link-alt-hover.png +0 -0
- data/vendor/assets/images/uswds/external-link-alt-hover.svg +1 -0
- data/vendor/assets/images/uswds/external-link-alt.png +0 -0
- data/vendor/assets/images/uswds/external-link-alt.svg +1 -0
- data/vendor/assets/images/uswds/external-link-hover.png +0 -0
- data/vendor/assets/images/uswds/external-link-hover.svg +1 -0
- data/vendor/assets/images/uswds/external-link.png +0 -0
- data/vendor/assets/images/uswds/external-link.svg +1 -0
- data/vendor/assets/images/uswds/favicons/favicon-114.png +0 -0
- data/vendor/assets/images/uswds/favicons/favicon-144.png +0 -0
- data/vendor/assets/images/uswds/favicons/favicon-16.png +0 -0
- data/vendor/assets/images/uswds/favicons/favicon-192.png +0 -0
- data/vendor/assets/images/uswds/favicons/favicon-40.png +0 -0
- data/vendor/assets/images/uswds/favicons/favicon-57.png +0 -0
- data/vendor/assets/images/uswds/favicons/favicon-72.png +0 -0
- data/vendor/assets/images/uswds/favicons/favicon.ico +0 -0
- data/vendor/assets/images/uswds/favicons/favicon.png +0 -0
- data/vendor/assets/images/uswds/hero.png +0 -0
- data/vendor/assets/images/uswds/icon-dot-gov.svg +1 -0
- data/vendor/assets/images/uswds/icon-https.svg +1 -0
- data/vendor/assets/images/uswds/logo-img.png +0 -0
- data/vendor/assets/images/uswds/minus-alt.png +0 -0
- data/vendor/assets/images/uswds/minus-alt.svg +1 -0
- data/vendor/assets/images/uswds/minus.png +0 -0
- data/vendor/assets/images/uswds/minus.svg +1 -0
- data/vendor/assets/images/uswds/plus-alt.png +0 -0
- data/vendor/assets/images/uswds/plus-alt.svg +1 -0
- data/vendor/assets/images/uswds/plus.png +0 -0
- data/vendor/assets/images/uswds/plus.svg +1 -0
- data/vendor/assets/images/uswds/search-alt.png +0 -0
- data/vendor/assets/images/uswds/search-alt.svg +1 -0
- data/vendor/assets/images/uswds/search.png +0 -0
- data/vendor/assets/images/uswds/search.svg +1 -0
- data/vendor/assets/images/uswds/social-icons/png/facebook25.png +0 -0
- data/vendor/assets/images/uswds/social-icons/png/rss25.png +0 -0
- data/vendor/assets/images/uswds/social-icons/png/twitter16.png +0 -0
- data/vendor/assets/images/uswds/social-icons/png/youtube15.png +0 -0
- data/vendor/assets/images/uswds/social-icons/svg/facebook25.svg +1 -0
- data/vendor/assets/images/uswds/social-icons/svg/rss25.svg +1 -0
- data/vendor/assets/images/uswds/social-icons/svg/twitter16.svg +1 -0
- data/vendor/assets/images/uswds/social-icons/svg/youtube15.svg +1 -0
- data/vendor/assets/images/uswds/us_flag_small.png +0 -0
- data/vendor/assets/javascripts/uswds/uswds.js +1739 -0
- data/vendor/assets/stylesheets/uswds/components/_accordions.scss +150 -0
- data/vendor/assets/stylesheets/uswds/components/_alerts.scss +85 -0
- data/vendor/assets/stylesheets/uswds/components/_banner.scss +204 -0
- data/vendor/assets/stylesheets/uswds/components/_footer.scss +382 -0
- data/vendor/assets/stylesheets/uswds/components/_forms.scss +164 -0
- data/vendor/assets/stylesheets/uswds/components/_graphic-list.scss +35 -0
- data/vendor/assets/stylesheets/uswds/components/_header.scss +221 -0
- data/vendor/assets/stylesheets/uswds/components/_hero.scss +43 -0
- data/vendor/assets/stylesheets/uswds/components/_layout.scss +36 -0
- data/vendor/assets/stylesheets/uswds/components/_media-block.scss +12 -0
- data/vendor/assets/stylesheets/uswds/components/_navigation.scss +446 -0
- data/vendor/assets/stylesheets/uswds/components/_search.scss +106 -0
- data/vendor/assets/stylesheets/uswds/components/_section.scss +37 -0
- data/vendor/assets/stylesheets/uswds/components/_sidenav.scss +8 -0
- data/vendor/assets/stylesheets/uswds/components/_skipnav.scss +19 -0
- data/vendor/assets/stylesheets/uswds/core/_base.scss +30 -0
- data/vendor/assets/stylesheets/uswds/core/_fonts.scss +65 -0
- data/vendor/assets/stylesheets/uswds/core/_grid.scss +154 -0
- data/vendor/assets/stylesheets/uswds/core/_utilities.scss +232 -0
- data/vendor/assets/stylesheets/uswds/core/_variables.scss +123 -0
- data/vendor/assets/stylesheets/uswds/elements/_buttons.scss +191 -0
- data/vendor/assets/stylesheets/uswds/elements/_embed.scss +26 -0
- data/vendor/assets/stylesheets/uswds/elements/_figure.scss +13 -0
- data/vendor/assets/stylesheets/uswds/elements/_inputs.scss +346 -0
- data/vendor/assets/stylesheets/uswds/elements/_labels.scss +20 -0
- data/vendor/assets/stylesheets/uswds/elements/_list.scss +32 -0
- data/vendor/assets/stylesheets/uswds/elements/_table.scss +47 -0
- data/vendor/assets/stylesheets/uswds/elements/_typography.scss +257 -0
- data/vendor/assets/stylesheets/uswds/uswds.scss +41 -0
- metadata +394 -0
@@ -0,0 +1,123 @@
|
|
1
|
+
// These variables drive almost every aspect of the U.S. Web Design
|
2
|
+
// system. Every variable is declared as !default so that it can be
|
3
|
+
// overridden by a previous import.
|
4
|
+
//
|
5
|
+
// XXX Do not modify this file!
|
6
|
+
//
|
7
|
+
// If you want to override a variable, set that variable in one of your
|
8
|
+
// own partials, then @import '{path/to/uswds/}core/variables'.
|
9
|
+
|
10
|
+
// Typography
|
11
|
+
// Removing the !default from $em-base so we are not inheriting that
|
12
|
+
// value from Bourbon.
|
13
|
+
$em-base: 10px;
|
14
|
+
$base-font-size: rem(17px) !default;
|
15
|
+
$small-font-size: rem(14px) !default;
|
16
|
+
$lead-font-size: rem(20px) !default;
|
17
|
+
$title-font-size: rem(52px) !default;
|
18
|
+
$h1-font-size: rem(40px) !default;
|
19
|
+
$h2-font-size: rem(30px) !default;
|
20
|
+
$h3-font-size: rem(20px) !default;
|
21
|
+
$h4-font-size: rem(17px) !default;
|
22
|
+
$h5-font-size: rem(15px) !default;
|
23
|
+
$h6-font-size: rem(13px) !default;
|
24
|
+
$base-line-height: 1.5 !default;
|
25
|
+
$heading-line-height: 1.3 !default;
|
26
|
+
$lead-line-height: 1.7 !default;
|
27
|
+
|
28
|
+
$font-sans: 'Source Sans Pro', $helvetica !default;
|
29
|
+
$font-serif: 'Merriweather', $georgia !default;
|
30
|
+
|
31
|
+
$font-normal: 400 !default;
|
32
|
+
$font-bold: 700 !default;
|
33
|
+
|
34
|
+
// Color
|
35
|
+
$color-primary: #0071bc !default;
|
36
|
+
$color-primary-darker: #205493 !default;
|
37
|
+
$color-primary-darkest: #112e51 !default;
|
38
|
+
|
39
|
+
$color-primary-alt: #02bfe7 !default;
|
40
|
+
$color-primary-alt-dark: #00a6d2 !default;
|
41
|
+
$color-primary-alt-darkest: #046b99 !default;
|
42
|
+
$color-primary-alt-light: #9bdaf1 !default; // lighten($color-primary-alt, 60%)
|
43
|
+
$color-primary-alt-lightest: #e1f3f8 !default; // lighten($color-primary-alt, 90%)
|
44
|
+
|
45
|
+
$color-secondary: #e31c3d !default;
|
46
|
+
$color-secondary-dark: #cd2026 !default;
|
47
|
+
$color-secondary-darkest: #981b1e !default;
|
48
|
+
$color-secondary-light: #e59393 !default; // lighten($color-secondary, 60%)
|
49
|
+
$color-secondary-lightest: #f9dede !default; // lighten($color-secondary, 90%)
|
50
|
+
|
51
|
+
$color-white: #ffffff !default;
|
52
|
+
$color-base: #212121 !default;
|
53
|
+
$color-black: #000000 !default;
|
54
|
+
|
55
|
+
$color-gray-dark: #323a45 !default;
|
56
|
+
$color-gray: #5b616b !default; // lighten($color-gray-dark, 20%)
|
57
|
+
$color-gray-medium: #757575 !default; // lightest gray that passes color contrast
|
58
|
+
$color-gray-light: #aeb0b5 !default; // lighten($color-gray-dark, 60%)
|
59
|
+
$color-gray-lighter: #d6d7d9 !default; // lighten($color-gray-dark, 80%)
|
60
|
+
$color-gray-lightest: #f1f1f1 !default; // lighten($color-gray-dark, 91%)
|
61
|
+
|
62
|
+
$color-gray-warm-dark: #494440 !default;
|
63
|
+
$color-gray-warm-light: #e4e2e0 !default; // lighten($color-gray-warm-dark, 90%)
|
64
|
+
$color-gray-cool-light: #dce4ef !default; // lighten($color-primary, 90%)
|
65
|
+
|
66
|
+
$color-gold: #fdb81e !default;
|
67
|
+
$color-gold-light: #f9c642 !default; // lighten($color-gold, 20%)
|
68
|
+
$color-gold-lighter: #fad980 !default; // lighten($color-gold, 60%)
|
69
|
+
$color-gold-lightest: #fff1d2 !default; // lighten($color-gold, 83%)
|
70
|
+
|
71
|
+
$color-green: #2e8540 !default;
|
72
|
+
$color-green-light: #4aa564 !default; // lighten($color-green, 20%)
|
73
|
+
$color-green-lighter: #94bfa2 !default; // lighten($color-green, 60%)
|
74
|
+
$color-green-lightest: #e7f4e4 !default; // lighten($color-green, 60%)
|
75
|
+
|
76
|
+
$color-cool-blue: #205493 !default;
|
77
|
+
$color-cool-blue-light: #4773aa !default; // lighten($color-cool-blue, 20%)
|
78
|
+
$color-cool-blue-lighter: #8ba6ca !default; // lighten($color-cool-blue, 60%)
|
79
|
+
$color-cool-blue-lightest: #dce4ef !default; // lighten($color-cool-blue, 90%)
|
80
|
+
|
81
|
+
$color-focus: #3e94cf !default;
|
82
|
+
$color-visited: #4c2c92 !default;
|
83
|
+
|
84
|
+
$color-shadow: rgba(#000, 0.3) !default;
|
85
|
+
|
86
|
+
// Mobile First Breakpoints
|
87
|
+
$small-screen: 481px !default;
|
88
|
+
$medium-screen: 600px !default;
|
89
|
+
$large-screen: 1201px !default;
|
90
|
+
|
91
|
+
// Grid column counts by screen size
|
92
|
+
$grid-columns-small: 1 !default;
|
93
|
+
$grid-columns-medium: 6 !default;
|
94
|
+
$grid-columns-large: 12 !default;
|
95
|
+
|
96
|
+
// @media single-keyword helpers
|
97
|
+
$small: new-breakpoint(min-width $small-screen $grid-columns-small) !default;
|
98
|
+
$medium: new-breakpoint(min-width $medium-screen $grid-columns-medium) !default;
|
99
|
+
$large: new-breakpoint(min-width $large-screen $grid-columns-large) !default;
|
100
|
+
|
101
|
+
// Relative font and image file paths
|
102
|
+
$font-path: '../fonts' !default;
|
103
|
+
$image-path: '../img' !default;
|
104
|
+
|
105
|
+
// Set $asset-pipeline to true if you're using the Rails Asset Pipeline
|
106
|
+
$asset-pipeline: false !default;
|
107
|
+
|
108
|
+
// Magic Numbers
|
109
|
+
$text-max-width: 53rem !default;
|
110
|
+
$lead-max-width: 77rem !default;
|
111
|
+
$site-max-width: 1040px !default;
|
112
|
+
$site-margins: 3rem !default;
|
113
|
+
$site-margins-mobile: 1.5rem !default;
|
114
|
+
$article-max-width: 600px !default;
|
115
|
+
$input-max-width: 46rem !default;
|
116
|
+
$border-radius: rem(3px) !default;
|
117
|
+
$box-shadow: 0 0 2px $color-shadow !default;
|
118
|
+
$focus-shadow: 0 0 3px $color-focus, 0 0 7px $color-focus !default;
|
119
|
+
$nav-width: 951px !default;
|
120
|
+
|
121
|
+
// 44 x 44 pixels hit target following Apple iOS Human Interface
|
122
|
+
// Guidelines
|
123
|
+
$hit-area: 4.4rem !default;
|
@@ -0,0 +1,191 @@
|
|
1
|
+
// Buttons variables
|
2
|
+
|
3
|
+
$button-stroke: inset 0 0 0 2px;
|
4
|
+
|
5
|
+
// Buttons
|
6
|
+
|
7
|
+
/* stylelint-disable selector-no-qualifying-type */
|
8
|
+
.usa-button,
|
9
|
+
.usa-button-primary,
|
10
|
+
.usa-button:visited,
|
11
|
+
.usa-button-primary:visited,
|
12
|
+
button,
|
13
|
+
[type=button],
|
14
|
+
[type=submit],
|
15
|
+
[type=reset],
|
16
|
+
[type=image] {
|
17
|
+
@include font-smoothing;
|
18
|
+
@include margin(0.5em 0.5em 0.5em null);
|
19
|
+
appearance: none;
|
20
|
+
background-color: $color-primary;
|
21
|
+
border: 0;
|
22
|
+
border-radius: $border-radius;
|
23
|
+
color: $color-white;
|
24
|
+
cursor: pointer;
|
25
|
+
display: inline-block;
|
26
|
+
font-family: $font-sans;
|
27
|
+
font-size: $base-font-size;
|
28
|
+
font-weight: $font-bold;
|
29
|
+
line-height: 1;
|
30
|
+
outline: none;
|
31
|
+
padding: 1rem 2rem;
|
32
|
+
text-align: center;
|
33
|
+
text-decoration: none;
|
34
|
+
width: 100%;
|
35
|
+
|
36
|
+
@include media($small-screen) {
|
37
|
+
width: auto;
|
38
|
+
}
|
39
|
+
|
40
|
+
&:hover,
|
41
|
+
&.usa-button-hover {
|
42
|
+
background-color: $color-primary-darker;
|
43
|
+
border-bottom: 0;
|
44
|
+
color: $color-white;
|
45
|
+
text-decoration: none;
|
46
|
+
}
|
47
|
+
|
48
|
+
&:focus,
|
49
|
+
&.usa-button-focus {
|
50
|
+
box-shadow: $focus-shadow;
|
51
|
+
}
|
52
|
+
|
53
|
+
&:active,
|
54
|
+
&.usa-button-active {
|
55
|
+
background-color: $color-primary-darkest;
|
56
|
+
}
|
57
|
+
|
58
|
+
&.usa-button-primary-alt {
|
59
|
+
background-color: $color-primary-alt;
|
60
|
+
color: $color-base;
|
61
|
+
|
62
|
+
&:hover,
|
63
|
+
&.usa-button-hover {
|
64
|
+
background-color: $color-primary-alt-dark;
|
65
|
+
}
|
66
|
+
|
67
|
+
&:active,
|
68
|
+
&.usa-button-active {
|
69
|
+
background-color: $color-primary-alt-darkest;
|
70
|
+
color: $color-white;
|
71
|
+
}
|
72
|
+
}
|
73
|
+
|
74
|
+
&.usa-button-secondary {
|
75
|
+
background-color: $color-secondary;
|
76
|
+
|
77
|
+
&:hover,
|
78
|
+
&.usa-button-hover {
|
79
|
+
background-color: $color-secondary-dark;
|
80
|
+
}
|
81
|
+
|
82
|
+
&:active,
|
83
|
+
&.usa-button-active {
|
84
|
+
background-color: $color-secondary-darkest;
|
85
|
+
}
|
86
|
+
}
|
87
|
+
|
88
|
+
&.usa-button-gray {
|
89
|
+
background-color: $color-gray;
|
90
|
+
|
91
|
+
&:hover,
|
92
|
+
&.usa-button-hover {
|
93
|
+
background-color: $color-gray-dark;
|
94
|
+
}
|
95
|
+
|
96
|
+
&:active,
|
97
|
+
&.usa-button-active {
|
98
|
+
background-color: $color-base;
|
99
|
+
}
|
100
|
+
}
|
101
|
+
|
102
|
+
&.usa-button-outline {
|
103
|
+
background-color: $color-white;
|
104
|
+
box-shadow: $button-stroke $color-primary;
|
105
|
+
color: $color-primary;
|
106
|
+
|
107
|
+
&:hover,
|
108
|
+
&.usa-button-hover {
|
109
|
+
box-shadow: $button-stroke $color-primary-darker;
|
110
|
+
color: $color-primary-darker;
|
111
|
+
}
|
112
|
+
|
113
|
+
&:active,
|
114
|
+
&.usa-button-active {
|
115
|
+
box-shadow: $button-stroke $color-primary-darkest;
|
116
|
+
color: $color-primary-darkest;
|
117
|
+
}
|
118
|
+
|
119
|
+
&:focus,
|
120
|
+
&.usa-button-focus {
|
121
|
+
box-shadow: $button-stroke $color-primary-darkest, $focus-shadow;
|
122
|
+
}
|
123
|
+
}
|
124
|
+
|
125
|
+
&.usa-button-outline-inverse {
|
126
|
+
background: transparent;
|
127
|
+
box-shadow: $button-stroke $color-white;
|
128
|
+
color: $color-white;
|
129
|
+
|
130
|
+
&:hover,
|
131
|
+
&.usa-button-hover {
|
132
|
+
box-shadow: $button-stroke $color-gray-lighter;
|
133
|
+
color: $color-gray-lighter;
|
134
|
+
}
|
135
|
+
|
136
|
+
&:active,
|
137
|
+
&.usa-button-active {
|
138
|
+
box-shadow: $button-stroke $color-gray-light;
|
139
|
+
color: $color-gray-lighter;
|
140
|
+
}
|
141
|
+
|
142
|
+
&:focus,
|
143
|
+
&.usa-button-focus {
|
144
|
+
box-shadow: $button-stroke $color-gray-light, $focus-shadow;
|
145
|
+
}
|
146
|
+
}
|
147
|
+
|
148
|
+
&.usa-button-big {
|
149
|
+
font-size: 1.9rem;
|
150
|
+
padding: 1.5rem 3rem;
|
151
|
+
}
|
152
|
+
}
|
153
|
+
/* stylelint-disable */
|
154
|
+
|
155
|
+
.usa-button:disabled,
|
156
|
+
.usa-button-disabled {
|
157
|
+
background-color: $color-gray-lighter;
|
158
|
+
color: $color-gray-dark;
|
159
|
+
pointer-events: none;
|
160
|
+
|
161
|
+
&:hover,
|
162
|
+
&.usa-button-hover,
|
163
|
+
&:active,
|
164
|
+
&.usa-button-active,
|
165
|
+
&:focus {
|
166
|
+
background-color: $color-gray-lighter;
|
167
|
+
border: 0;
|
168
|
+
box-shadow: none;
|
169
|
+
color: $color-gray-dark;
|
170
|
+
}
|
171
|
+
}
|
172
|
+
|
173
|
+
@mixin button-unstyled {
|
174
|
+
background-color: transparent;
|
175
|
+
border: 0;
|
176
|
+
border-radius: 0;
|
177
|
+
font-weight: $font-normal;
|
178
|
+
margin: 0;
|
179
|
+
outline: 0;
|
180
|
+
padding: 0;
|
181
|
+
text-align: left;
|
182
|
+
-webkit-font-smoothing: auto;
|
183
|
+
|
184
|
+
&:hover {
|
185
|
+
background-color: transparent;
|
186
|
+
}
|
187
|
+
}
|
188
|
+
|
189
|
+
.usa-button-unstyled {
|
190
|
+
@include button-unstyled;
|
191
|
+
}
|
@@ -0,0 +1,26 @@
|
|
1
|
+
$aspect-height: 9;
|
2
|
+
$aspect-width: 16;
|
3
|
+
|
4
|
+
@mixin embed-container ($height, $width) {
|
5
|
+
padding-bottom: percentage($height/$width);
|
6
|
+
}
|
7
|
+
|
8
|
+
.usa-embed-container {
|
9
|
+
iframe,
|
10
|
+
object,
|
11
|
+
embed {
|
12
|
+
position: absolute;
|
13
|
+
top: 0;
|
14
|
+
left: 0;
|
15
|
+
width: 100%;
|
16
|
+
height: 100%;
|
17
|
+
}
|
18
|
+
}
|
19
|
+
|
20
|
+
.usa-embed-container {
|
21
|
+
@include embed-container($aspect-height, $aspect-width);
|
22
|
+
position: relative;
|
23
|
+
height: 0;
|
24
|
+
overflow: hidden;
|
25
|
+
max-width: 100%;
|
26
|
+
}
|
@@ -0,0 +1,346 @@
|
|
1
|
+
// scss-lint:disable QualifyingElement, PropertyCount
|
2
|
+
|
3
|
+
$input-line-height: 1.3;
|
4
|
+
$input-border-width: 1px;
|
5
|
+
$input-padding-vertical: 1rem;
|
6
|
+
|
7
|
+
// input heights will vary by browser and type
|
8
|
+
// if height not explicitly set
|
9
|
+
$input-height-exact: (
|
10
|
+
($base-font-size * $input-line-height) +
|
11
|
+
($input-padding-vertical * 2) +
|
12
|
+
(rem($input-border-width * 2))
|
13
|
+
);
|
14
|
+
|
15
|
+
// truncated to 1 decimal place
|
16
|
+
// (i.e., 1.21rem -> 1.2rem)
|
17
|
+
$input-height: floor($input-height-exact * 10) / 10;
|
18
|
+
|
19
|
+
// Block form elements
|
20
|
+
/* stylelint-disable selector-no-qualifying-type */
|
21
|
+
input,
|
22
|
+
textarea,
|
23
|
+
select {
|
24
|
+
appearance: none;
|
25
|
+
border: $input-border-width solid $color-gray;
|
26
|
+
border-radius: 0;
|
27
|
+
box-sizing: border-box;
|
28
|
+
color: $color-base; // standardize on firefox
|
29
|
+
display: block;
|
30
|
+
font-size: $base-font-size;
|
31
|
+
height: $input-height;
|
32
|
+
line-height: $input-line-height;
|
33
|
+
margin: 0.2em 0;
|
34
|
+
max-width: $input-max-width;
|
35
|
+
outline: none;
|
36
|
+
padding: $input-padding-vertical 0.7em;
|
37
|
+
width: 100%;
|
38
|
+
|
39
|
+
&:focus,
|
40
|
+
&.usa-input-focus {
|
41
|
+
box-shadow: $focus-shadow;
|
42
|
+
}
|
43
|
+
|
44
|
+
&.usa-input-success {
|
45
|
+
border: 3px solid $color-green-light;
|
46
|
+
}
|
47
|
+
}
|
48
|
+
/* stylelint-enable */
|
49
|
+
|
50
|
+
.usa-input-error {
|
51
|
+
border-left: 4px solid $color-secondary-dark;
|
52
|
+
margin-top: 3rem;
|
53
|
+
padding-bottom: 0.8rem;
|
54
|
+
padding-left: 1.5rem;
|
55
|
+
padding-top: 0.8rem;
|
56
|
+
position: relative;
|
57
|
+
right: 1.9rem;
|
58
|
+
|
59
|
+
input,
|
60
|
+
textarea,
|
61
|
+
select {
|
62
|
+
border: 3px solid $color-secondary-dark;
|
63
|
+
width: calc(100% + 1.9rem); // 1.5rem left padding + 4px border from input error spacing
|
64
|
+
}
|
65
|
+
|
66
|
+
label {
|
67
|
+
margin-top: 0;
|
68
|
+
}
|
69
|
+
|
70
|
+
.usa-input-inline {
|
71
|
+
border: $input-border-width solid $color-gray;
|
72
|
+
width: inherit;
|
73
|
+
}
|
74
|
+
|
75
|
+
.usa-input-inline-error {
|
76
|
+
border: 3px solid $color-secondary-dark;
|
77
|
+
}
|
78
|
+
}
|
79
|
+
|
80
|
+
.usa-input-error-label {
|
81
|
+
display: block;
|
82
|
+
font-size: $base-font-size;
|
83
|
+
font-weight: $font-bold;
|
84
|
+
}
|
85
|
+
|
86
|
+
.usa-input-error-message {
|
87
|
+
color: $color-secondary-dark;
|
88
|
+
display: block;
|
89
|
+
font-size: $base-font-size;
|
90
|
+
font-weight: $font-bold;
|
91
|
+
padding-bottom: 3px;
|
92
|
+
padding-top: 3px;
|
93
|
+
}
|
94
|
+
|
95
|
+
.usa-input-required:after {
|
96
|
+
color: $color-secondary-darkest;
|
97
|
+
content: ' (*Required)';
|
98
|
+
}
|
99
|
+
|
100
|
+
label {
|
101
|
+
display: block;
|
102
|
+
margin-top: 3rem;
|
103
|
+
max-width: $input-max-width;
|
104
|
+
}
|
105
|
+
|
106
|
+
textarea {
|
107
|
+
height: 16rem;
|
108
|
+
}
|
109
|
+
|
110
|
+
select {
|
111
|
+
-moz-appearance: none;
|
112
|
+
-webkit-appearance: none;
|
113
|
+
appearance: none;
|
114
|
+
background-color: $color-white;
|
115
|
+
background-image: url('#{$image-path}/arrow-down.png');
|
116
|
+
background-image: url('#{$image-path}/arrow-down.svg');
|
117
|
+
background-position: right 1.3rem center;
|
118
|
+
background-repeat: no-repeat;
|
119
|
+
background-size: 1.3rem;
|
120
|
+
}
|
121
|
+
|
122
|
+
legend {
|
123
|
+
font-size: $h2-font-size;
|
124
|
+
font-weight: $font-bold;
|
125
|
+
}
|
126
|
+
|
127
|
+
.usa-fieldset-inputs {
|
128
|
+
label {
|
129
|
+
margin-top: 0;
|
130
|
+
}
|
131
|
+
}
|
132
|
+
|
133
|
+
// Hint text
|
134
|
+
|
135
|
+
.usa-form-hint {
|
136
|
+
color: $color-gray-medium;
|
137
|
+
font-family: $font-sans;
|
138
|
+
margin-bottom: 0;
|
139
|
+
}
|
140
|
+
|
141
|
+
// Custom checkboxes
|
142
|
+
|
143
|
+
[type=checkbox],
|
144
|
+
[type=radio] {
|
145
|
+
margin-left: -2rem;
|
146
|
+
opacity: 0;
|
147
|
+
position: absolute;
|
148
|
+
|
149
|
+
.lt-ie9 & {
|
150
|
+
border: 0;
|
151
|
+
float: left;
|
152
|
+
margin: 0.4em 0.4em 0 0;
|
153
|
+
position: static;
|
154
|
+
width: auto;
|
155
|
+
}
|
156
|
+
}
|
157
|
+
|
158
|
+
[type=checkbox] + label,
|
159
|
+
[type=radio] + label {
|
160
|
+
cursor: pointer;
|
161
|
+
font-weight: 400;
|
162
|
+
margin-bottom: 0.5em;
|
163
|
+
}
|
164
|
+
|
165
|
+
[type=checkbox] + label::before,
|
166
|
+
[type=radio] + label::before {
|
167
|
+
background: $color-white;
|
168
|
+
border-radius: $border-radius;
|
169
|
+
box-shadow: 0 0 0 1px $color-gray-medium;
|
170
|
+
content: '\a0';
|
171
|
+
display: inline-block;
|
172
|
+
height: 1.8rem;
|
173
|
+
line-height: 1.8rem;
|
174
|
+
margin-right: 0.6em;
|
175
|
+
text-indent: 0.15em;
|
176
|
+
vertical-align: middle\0; // Target IE 11 and below to vertically center inputs
|
177
|
+
width: 1.8rem;
|
178
|
+
}
|
179
|
+
|
180
|
+
[type=radio] + label::before {
|
181
|
+
box-shadow: 0 0 0 2px $color-white, 0 0 0 3px $color-gray-medium;
|
182
|
+
height: 1.6rem;
|
183
|
+
line-height: 1.6rem;
|
184
|
+
width: 1.6rem;
|
185
|
+
border-radius: 100%;
|
186
|
+
}
|
187
|
+
|
188
|
+
[type=checkbox]:checked + label::before,
|
189
|
+
[type=radio]:checked + label::before {
|
190
|
+
background-color: $color-primary;
|
191
|
+
box-shadow: 0 0 0 1px $color-primary;
|
192
|
+
}
|
193
|
+
|
194
|
+
[type=radio]:checked + label::before {
|
195
|
+
box-shadow: 0 0 0 2px $color-white, 0 0 0 4px $color-primary;
|
196
|
+
}
|
197
|
+
|
198
|
+
[type=radio]:focus + label::before {
|
199
|
+
box-shadow: 0 0 0 2px $color-white, 0 0 0 4px $color-primary, 0 0 3px 4px $color-focus, 0 0 7px 4px $color-focus;
|
200
|
+
}
|
201
|
+
|
202
|
+
[type=checkbox]:checked + label::before,
|
203
|
+
[type=checkbox]:checked:disabled + label::before {
|
204
|
+
background-image: url('#{$image-path}/correct8.png');
|
205
|
+
background-image: url('#{$image-path}/correct8.svg');
|
206
|
+
background-position: 50%;
|
207
|
+
background-repeat: no-repeat;
|
208
|
+
}
|
209
|
+
|
210
|
+
[type=checkbox]:focus + label::before {
|
211
|
+
box-shadow: 0 0 0 1px $color-white, 0 0 0 3px $color-primary;
|
212
|
+
}
|
213
|
+
|
214
|
+
[type=checkbox]:disabled + label {
|
215
|
+
color: $color-gray;
|
216
|
+
}
|
217
|
+
|
218
|
+
[type=checkbox]:disabled + label::before,
|
219
|
+
[type=radio]:disabled + label::before {
|
220
|
+
background: $color-gray-lighter;
|
221
|
+
box-shadow: 0 0 0 1px $color-gray-light;
|
222
|
+
cursor: not-allowed;
|
223
|
+
}
|
224
|
+
|
225
|
+
// Range inputs
|
226
|
+
|
227
|
+
[type=range] {
|
228
|
+
-webkit-appearance: none;
|
229
|
+
border: none;
|
230
|
+
padding-left: 0;
|
231
|
+
width: 100%;
|
232
|
+
}
|
233
|
+
|
234
|
+
[type=range]:focus {
|
235
|
+
box-shadow: none;
|
236
|
+
outline: none;
|
237
|
+
}
|
238
|
+
|
239
|
+
[type=range]::-webkit-slider-runnable-track {
|
240
|
+
background: $color-gray-light;
|
241
|
+
border: 1px solid $color-gray-medium;
|
242
|
+
cursor: pointer;
|
243
|
+
height: 1.2rem;
|
244
|
+
width: 100%;
|
245
|
+
}
|
246
|
+
|
247
|
+
[type=range]::-moz-range-track {
|
248
|
+
background: $color-primary;
|
249
|
+
border: 1px solid $color-gray-medium;
|
250
|
+
cursor: pointer;
|
251
|
+
height: 1.2rem;
|
252
|
+
width: 100%;
|
253
|
+
}
|
254
|
+
|
255
|
+
[type=range]::-ms-track {
|
256
|
+
background: transparent;
|
257
|
+
color: transparent;
|
258
|
+
cursor: pointer;
|
259
|
+
height: 1.2rem;
|
260
|
+
width: 100%;
|
261
|
+
}
|
262
|
+
|
263
|
+
[type=range]::-webkit-slider-thumb {
|
264
|
+
-webkit-appearance: none;
|
265
|
+
border: 1px solid $color-gray-medium;
|
266
|
+
height: 2.2rem;
|
267
|
+
border-radius: 1.5rem;
|
268
|
+
background: $color-gray-lightest;
|
269
|
+
cursor: pointer;
|
270
|
+
margin-top: -.65rem;
|
271
|
+
width: 2.2rem;
|
272
|
+
}
|
273
|
+
|
274
|
+
[type=range]::-moz-range-thumb {
|
275
|
+
background: $color-gray-lightest;
|
276
|
+
border: 1px solid $color-gray-medium;
|
277
|
+
border-radius: 1.5rem;
|
278
|
+
cursor: pointer;
|
279
|
+
height: 2.2rem;
|
280
|
+
width: 2.2rem;
|
281
|
+
}
|
282
|
+
|
283
|
+
[type=range]::-ms-thumb {
|
284
|
+
background: $color-gray-lightest;
|
285
|
+
border: 1px solid $color-gray-medium;
|
286
|
+
border-radius: 1.5rem;
|
287
|
+
cursor: pointer;
|
288
|
+
height: 2.2rem;
|
289
|
+
width: 2.2rem;
|
290
|
+
}
|
291
|
+
|
292
|
+
[type=range]::-ms-fill-lower {
|
293
|
+
background: $color-gray-light;
|
294
|
+
border: 1px solid $color-gray-medium;
|
295
|
+
border-radius: 2rem;
|
296
|
+
}
|
297
|
+
|
298
|
+
[type=range]::-ms-fill-upper {
|
299
|
+
background: $color-gray-light;
|
300
|
+
border: 1px solid $color-gray-medium;
|
301
|
+
border-radius: 2rem;
|
302
|
+
}
|
303
|
+
|
304
|
+
[type=range]:focus::-webkit-slider-thumb {
|
305
|
+
border: 2px solid $color-focus;
|
306
|
+
}
|
307
|
+
|
308
|
+
[type=range]:focus::-moz-range-thumb {
|
309
|
+
border: 2px solid $color-focus;
|
310
|
+
}
|
311
|
+
|
312
|
+
[type=range]:focus::-ms-thumb {
|
313
|
+
border: 2px solid $color-focus;
|
314
|
+
}
|
315
|
+
|
316
|
+
// Memorable dates
|
317
|
+
|
318
|
+
.usa-date-of-birth {
|
319
|
+
label {
|
320
|
+
margin-top: 0;
|
321
|
+
}
|
322
|
+
|
323
|
+
[type=number]::-webkit-inner-spin-button,
|
324
|
+
[type=number]::-webkit-outer-spin-button {
|
325
|
+
-webkit-appearance: none;
|
326
|
+
appearance: none;
|
327
|
+
margin: 0;
|
328
|
+
}
|
329
|
+
|
330
|
+
[type=number] {
|
331
|
+
-moz-appearance: textfield;
|
332
|
+
}
|
333
|
+
}
|
334
|
+
|
335
|
+
.usa-form-group-day,
|
336
|
+
.usa-form-group-month,
|
337
|
+
.usa-form-group-year {
|
338
|
+
clear: none;
|
339
|
+
float: left;
|
340
|
+
margin-right: 1.5rem;
|
341
|
+
width: 5rem;
|
342
|
+
}
|
343
|
+
|
344
|
+
.usa-form-group-year {
|
345
|
+
width: 7rem;
|
346
|
+
}
|