va_common 0.1.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +7 -0
- data/.gitignore +9 -0
- data/.travis.yml +4 -0
- data/CODE_OF_CONDUCT.md +13 -0
- data/Gemfile +4 -0
- data/README.md +66 -0
- data/Rakefile +1 -0
- data/app/assets/fonts/merriweather-bold-webfont.eot +0 -0
- data/app/assets/fonts/merriweather-bold-webfont.svg +294 -0
- data/app/assets/fonts/merriweather-bold-webfont.ttf +0 -0
- data/app/assets/fonts/merriweather-bold-webfont.woff +0 -0
- data/app/assets/fonts/merriweather-bold-webfont.woff2 +0 -0
- data/app/assets/fonts/merriweather-italic-webfont.eot +0 -0
- data/app/assets/fonts/merriweather-italic-webfont.svg +283 -0
- data/app/assets/fonts/merriweather-italic-webfont.ttf +0 -0
- data/app/assets/fonts/merriweather-italic-webfont.woff +0 -0
- data/app/assets/fonts/merriweather-italic-webfont.woff2 +0 -0
- data/app/assets/fonts/merriweather-light-webfont.eot +0 -0
- data/app/assets/fonts/merriweather-light-webfont.svg +299 -0
- data/app/assets/fonts/merriweather-light-webfont.ttf +0 -0
- data/app/assets/fonts/merriweather-light-webfont.woff +0 -0
- data/app/assets/fonts/merriweather-light-webfont.woff2 +0 -0
- data/app/assets/fonts/merriweather-regular-webfont.eot +0 -0
- data/app/assets/fonts/merriweather-regular-webfont.svg +294 -0
- data/app/assets/fonts/merriweather-regular-webfont.ttf +0 -0
- data/app/assets/fonts/merriweather-regular-webfont.woff +0 -0
- data/app/assets/fonts/merriweather-regular-webfont.woff2 +0 -0
- data/app/assets/fonts/sourcesanspro-bold-webfont.eot +0 -0
- data/app/assets/fonts/sourcesanspro-bold-webfont.svg +965 -0
- data/app/assets/fonts/sourcesanspro-bold-webfont.ttf +0 -0
- data/app/assets/fonts/sourcesanspro-bold-webfont.woff +0 -0
- data/app/assets/fonts/sourcesanspro-bold-webfont.woff2 +0 -0
- data/app/assets/fonts/sourcesanspro-italic-webfont.eot +0 -0
- data/app/assets/fonts/sourcesanspro-italic-webfont.svg +853 -0
- data/app/assets/fonts/sourcesanspro-italic-webfont.ttf +0 -0
- data/app/assets/fonts/sourcesanspro-italic-webfont.woff +0 -0
- data/app/assets/fonts/sourcesanspro-italic-webfont.woff2 +0 -0
- data/app/assets/fonts/sourcesanspro-light-webfont.eot +0 -0
- data/app/assets/fonts/sourcesanspro-light-webfont.svg +915 -0
- data/app/assets/fonts/sourcesanspro-light-webfont.ttf +0 -0
- data/app/assets/fonts/sourcesanspro-light-webfont.woff +0 -0
- data/app/assets/fonts/sourcesanspro-light-webfont.woff2 +0 -0
- data/app/assets/fonts/sourcesanspro-regular-webfont.eot +0 -0
- data/app/assets/fonts/sourcesanspro-regular-webfont.svg +989 -0
- data/app/assets/fonts/sourcesanspro-regular-webfont.ttf +0 -0
- data/app/assets/fonts/sourcesanspro-regular-webfont.woff +0 -0
- data/app/assets/fonts/sourcesanspro-regular-webfont.woff2 +0 -0
- data/app/assets/images/design/background/thread.png +0 -0
- data/app/assets/images/design/logo/logo-alt-hover.png +0 -0
- data/app/assets/images/design/logo/logo-alt.png +0 -0
- data/app/assets/images/design/logo/logo-hover.png +0 -0
- data/app/assets/images/design/logo/logo-small.png +0 -0
- data/app/assets/images/design/logo/logo.png +0 -0
- data/app/assets/images/design/logo/og-image.jpg +0 -0
- data/app/assets/images/design/seal/seal-footer.png +0 -0
- data/app/assets/images/design/seal/seal-footer.svg +1 -0
- data/app/assets/images/design/seal/seal.png +0 -0
- data/app/assets/images/design/seal/stars.png +0 -0
- data/app/assets/images/icons/apple-touch-icon-114x114.png +0 -0
- data/app/assets/images/icons/apple-touch-icon-152x152.png +0 -0
- data/app/assets/images/icons/apple-touch-icon-72x72.png +0 -0
- data/app/assets/images/icons/apple-touch-icon.png +0 -0
- data/app/assets/images/icons/favicon.ico +0 -0
- data/app/assets/images/icons/va.png +0 -0
- data/app/assets/images/icons/watermark.png +0 -0
- data/app/assets/images/icons/wrench.png +0 -0
- data/app/assets/images/social-icons/png/facebook25.png +0 -0
- data/app/assets/images/social-icons/png/rss25.png +0 -0
- data/app/assets/images/social-icons/png/twitter16.png +0 -0
- data/app/assets/images/social-icons/png/youtube15.png +0 -0
- data/app/assets/images/social-icons/svg/facebook25.svg +11 -0
- data/app/assets/images/social-icons/svg/rss25.svg +1 -0
- data/app/assets/images/social-icons/svg/twitter16.svg +15 -0
- data/app/assets/images/social-icons/svg/youtube15.svg +1 -0
- data/app/assets/js/components.js +376 -0
- data/app/assets/js/foundation/foundation.abide.js +408 -0
- data/app/assets/js/foundation/foundation.accordion.js +88 -0
- data/app/assets/js/foundation/foundation.alert.js +43 -0
- data/app/assets/js/foundation/foundation.clearing.js +586 -0
- data/app/assets/js/foundation/foundation.dropdown.js +463 -0
- data/app/assets/js/foundation/foundation.equalizer.js +104 -0
- data/app/assets/js/foundation/foundation.interchange.js +359 -0
- data/app/assets/js/foundation/foundation.joyride.js +932 -0
- data/app/assets/js/foundation/foundation.js +725 -0
- data/app/assets/js/foundation/foundation.magellan.js +215 -0
- data/app/assets/js/foundation/foundation.offcanvas.js +152 -0
- data/app/assets/js/foundation/foundation.orbit.js +476 -0
- data/app/assets/js/foundation/foundation.reveal.js +498 -0
- data/app/assets/js/foundation/foundation.slider.js +281 -0
- data/app/assets/js/foundation/foundation.tab.js +249 -0
- data/app/assets/js/foundation/foundation.tooltip.js +339 -0
- data/app/assets/js/foundation/foundation.topbar.js +458 -0
- data/app/assets/js/foundation.min.js +6376 -0
- data/app/assets/js/scripts-no-touch.js +33 -0
- data/app/assets/js/scripts-touch.js +33 -0
- data/app/assets/js/va_common_main.js +1 -0
- data/app/assets/js/vendor/classie.js +80 -0
- data/app/assets/js/vendor/html5shiv.js +8 -0
- data/app/assets/js/vendor/jquery-1.11.0.min.js +4 -0
- data/app/assets/js/vendor/jquery.js +9789 -0
- data/app/assets/js/vendor/jquery.smooth-scroll.js +255 -0
- data/app/assets/js/vendor/jquery.stellar.js +651 -0
- data/app/assets/js/vendor/jquery.tipsy.js +258 -0
- data/app/assets/js/vendor/menu.js +40 -0
- data/app/assets/js/vendor/modernizr.custom.js +4 -0
- data/app/assets/js/vendor/nwmatcher-1.2.5-min.js +7 -0
- data/app/assets/js/vendor/respond.min.js +6 -0
- data/app/assets/js/vendor/scroll-settings.js +3 -0
- data/app/assets/js/vendor/selectivizr-1.0.3b.js +560 -0
- data/app/assets/js/vendor/stellar-settings.js +8 -0
- data/app/assets/js/vendor/svg-injector.js +450 -0
- data/app/assets/js/vendor/tota11y.min.js +28 -0
- data/app/assets/js/vendor/wow.min.js +2 -0
- data/app/assets/stylesheets/_va.scss +2377 -0
- data/app/assets/stylesheets/components/_accordions.scss +98 -0
- data/app/assets/stylesheets/core/_base.scss +20 -0
- data/app/assets/stylesheets/core/_defaults.scss +92 -0
- data/app/assets/stylesheets/core/_grid-settings.scss +10 -0
- data/app/assets/stylesheets/core/_grid.scss +116 -0
- data/app/assets/stylesheets/core/_utilities.scss +105 -0
- data/app/assets/stylesheets/core/_variables.scss +88 -0
- data/app/assets/stylesheets/elements/_buttons.scss +189 -0
- data/app/assets/stylesheets/elements/_figure.scss +9 -0
- data/app/assets/stylesheets/elements/_inputs.scss +328 -0
- data/app/assets/stylesheets/elements/_labels.scss +39 -0
- data/app/assets/stylesheets/elements/_list.scss +82 -0
- data/app/assets/stylesheets/elements/_table.scss +39 -0
- data/app/assets/stylesheets/elements/_typography.scss +220 -0
- data/app/assets/stylesheets/foundation/_functions.scss +146 -0
- data/app/assets/stylesheets/foundation/_settings.scss +1467 -0
- data/app/assets/stylesheets/foundation/_variables.scss +1286 -0
- data/app/assets/stylesheets/foundation/components/_accordion.scss +157 -0
- data/app/assets/stylesheets/foundation/components/_alert-boxes.scss +128 -0
- data/app/assets/stylesheets/foundation/components/_block-grid.scss +132 -0
- data/app/assets/stylesheets/foundation/components/_breadcrumbs.scss +132 -0
- data/app/assets/stylesheets/foundation/components/_button-groups.scss +200 -0
- data/app/assets/stylesheets/foundation/components/_buttons.scss +259 -0
- data/app/assets/stylesheets/foundation/components/_clearing.scss +256 -0
- data/app/assets/stylesheets/foundation/components/_dropdown-buttons.scss +131 -0
- data/app/assets/stylesheets/foundation/components/_dropdown.scss +262 -0
- data/app/assets/stylesheets/foundation/components/_flex-video.scss +51 -0
- data/app/assets/stylesheets/foundation/components/_forms.scss +570 -0
- data/app/assets/stylesheets/foundation/components/_global.scss +481 -0
- data/app/assets/stylesheets/foundation/components/_grid.scss +289 -0
- data/app/assets/stylesheets/foundation/components/_icon-bar.scss +358 -0
- data/app/assets/stylesheets/foundation/components/_inline-lists.scss +57 -0
- data/app/assets/stylesheets/foundation/components/_joyride.scss +222 -0
- data/app/assets/stylesheets/foundation/components/_keystrokes.scss +61 -0
- data/app/assets/stylesheets/foundation/components/_labels.scss +106 -0
- data/app/assets/stylesheets/foundation/components/_magellan.scss +34 -0
- data/app/assets/stylesheets/foundation/components/_offcanvas.scss +515 -0
- data/app/assets/stylesheets/foundation/components/_orbit.scss +368 -0
- data/app/assets/stylesheets/foundation/components/_pagination.scss +162 -0
- data/app/assets/stylesheets/foundation/components/_panels.scss +101 -0
- data/app/assets/stylesheets/foundation/components/_pricing-tables.scss +150 -0
- data/app/assets/stylesheets/foundation/components/_progress-bars.scss +79 -0
- data/app/assets/stylesheets/foundation/components/_range-slider.scss +169 -0
- data/app/assets/stylesheets/foundation/components/_reveal.scss +202 -0
- data/app/assets/stylesheets/foundation/components/_side-nav.scss +116 -0
- data/app/assets/stylesheets/foundation/components/_split-buttons.scss +199 -0
- data/app/assets/stylesheets/foundation/components/_sub-nav.scss +123 -0
- data/app/assets/stylesheets/foundation/components/_switches.scss +238 -0
- data/app/assets/stylesheets/foundation/components/_tables.scss +135 -0
- data/app/assets/stylesheets/foundation/components/_tabs.scss +123 -0
- data/app/assets/stylesheets/foundation/components/_thumbs.scss +66 -0
- data/app/assets/stylesheets/foundation/components/_toolbar.scss +70 -0
- data/app/assets/stylesheets/foundation/components/_tooltips.scss +142 -0
- data/app/assets/stylesheets/foundation/components/_top-bar.scss +691 -0
- data/app/assets/stylesheets/foundation/components/_type.scss +525 -0
- data/app/assets/stylesheets/foundation/components/_visibility.scss +408 -0
- data/app/assets/stylesheets/functions/_new-breakpoint.scss +49 -0
- data/app/assets/stylesheets/functions/_private.scss +114 -0
- data/app/assets/stylesheets/lib/_normalize.scss +427 -0
- data/app/assets/stylesheets/lib/bourbon/_bourbon-deprecated-upcoming.scss +411 -0
- data/app/assets/stylesheets/lib/bourbon/_bourbon.scss +87 -0
- data/app/assets/stylesheets/lib/bourbon/addons/_border-color.scss +26 -0
- data/app/assets/stylesheets/lib/bourbon/addons/_border-radius.scss +48 -0
- data/app/assets/stylesheets/lib/bourbon/addons/_border-style.scss +25 -0
- data/app/assets/stylesheets/lib/bourbon/addons/_border-width.scss +25 -0
- data/app/assets/stylesheets/lib/bourbon/addons/_buttons.scss +64 -0
- data/app/assets/stylesheets/lib/bourbon/addons/_clearfix.scss +25 -0
- data/app/assets/stylesheets/lib/bourbon/addons/_ellipsis.scss +30 -0
- data/app/assets/stylesheets/lib/bourbon/addons/_font-stacks.scss +31 -0
- data/app/assets/stylesheets/lib/bourbon/addons/_hide-text.scss +27 -0
- data/app/assets/stylesheets/lib/bourbon/addons/_margin.scss +26 -0
- data/app/assets/stylesheets/lib/bourbon/addons/_padding.scss +26 -0
- data/app/assets/stylesheets/lib/bourbon/addons/_position.scss +48 -0
- data/app/assets/stylesheets/lib/bourbon/addons/_prefixer.scss +66 -0
- data/app/assets/stylesheets/lib/bourbon/addons/_retina-image.scss +25 -0
- data/app/assets/stylesheets/lib/bourbon/addons/_size.scss +51 -0
- data/app/assets/stylesheets/lib/bourbon/addons/_text-inputs.scss +112 -0
- data/app/assets/stylesheets/lib/bourbon/addons/_timing-functions.scss +34 -0
- data/app/assets/stylesheets/lib/bourbon/addons/_triangle.scss +63 -0
- data/app/assets/stylesheets/lib/bourbon/addons/_word-wrap.scss +29 -0
- data/app/assets/stylesheets/lib/bourbon/css3/_animation.scss +43 -0
- data/app/assets/stylesheets/lib/bourbon/css3/_appearance.scss +3 -0
- data/app/assets/stylesheets/lib/bourbon/css3/_backface-visibility.scss +3 -0
- data/app/assets/stylesheets/lib/bourbon/css3/_background-image.scss +42 -0
- data/app/assets/stylesheets/lib/bourbon/css3/_background.scss +55 -0
- data/app/assets/stylesheets/lib/bourbon/css3/_border-image.scss +59 -0
- data/app/assets/stylesheets/lib/bourbon/css3/_calc.scss +4 -0
- data/app/assets/stylesheets/lib/bourbon/css3/_columns.scss +47 -0
- data/app/assets/stylesheets/lib/bourbon/css3/_filter.scss +4 -0
- data/app/assets/stylesheets/lib/bourbon/css3/_flex-box.scss +287 -0
- data/app/assets/stylesheets/lib/bourbon/css3/_font-face.scss +24 -0
- data/app/assets/stylesheets/lib/bourbon/css3/_font-feature-settings.scss +4 -0
- data/app/assets/stylesheets/lib/bourbon/css3/_hidpi-media-query.scss +10 -0
- data/app/assets/stylesheets/lib/bourbon/css3/_hyphens.scss +4 -0
- data/app/assets/stylesheets/lib/bourbon/css3/_image-rendering.scss +14 -0
- data/app/assets/stylesheets/lib/bourbon/css3/_keyframes.scss +36 -0
- data/app/assets/stylesheets/lib/bourbon/css3/_linear-gradient.scss +38 -0
- data/app/assets/stylesheets/lib/bourbon/css3/_perspective.scss +8 -0
- data/app/assets/stylesheets/lib/bourbon/css3/_placeholder.scss +8 -0
- data/app/assets/stylesheets/lib/bourbon/css3/_radial-gradient.scss +39 -0
- data/app/assets/stylesheets/lib/bourbon/css3/_selection.scss +42 -0
- data/app/assets/stylesheets/lib/bourbon/css3/_text-decoration.scss +19 -0
- data/app/assets/stylesheets/lib/bourbon/css3/_transform.scss +15 -0
- data/app/assets/stylesheets/lib/bourbon/css3/_transition.scss +71 -0
- data/app/assets/stylesheets/lib/bourbon/css3/_user-select.scss +3 -0
- data/app/assets/stylesheets/lib/bourbon/functions/_assign-inputs.scss +11 -0
- data/app/assets/stylesheets/lib/bourbon/functions/_contains-falsy.scss +20 -0
- data/app/assets/stylesheets/lib/bourbon/functions/_contains.scss +26 -0
- data/app/assets/stylesheets/lib/bourbon/functions/_is-length.scss +11 -0
- data/app/assets/stylesheets/lib/bourbon/functions/_is-light.scss +21 -0
- data/app/assets/stylesheets/lib/bourbon/functions/_is-number.scss +11 -0
- data/app/assets/stylesheets/lib/bourbon/functions/_is-size.scss +13 -0
- data/app/assets/stylesheets/lib/bourbon/functions/_modular-scale.scss +69 -0
- data/app/assets/stylesheets/lib/bourbon/functions/_px-to-em.scss +13 -0
- data/app/assets/stylesheets/lib/bourbon/functions/_px-to-rem.scss +15 -0
- data/app/assets/stylesheets/lib/bourbon/functions/_shade.scss +24 -0
- data/app/assets/stylesheets/lib/bourbon/functions/_strip-units.scss +17 -0
- data/app/assets/stylesheets/lib/bourbon/functions/_tint.scss +24 -0
- data/app/assets/stylesheets/lib/bourbon/functions/_transition-property-name.scss +22 -0
- data/app/assets/stylesheets/lib/bourbon/functions/_unpack.scss +27 -0
- data/app/assets/stylesheets/lib/bourbon/helpers/_convert-units.scss +21 -0
- data/app/assets/stylesheets/lib/bourbon/helpers/_directional-values.scss +96 -0
- data/app/assets/stylesheets/lib/bourbon/helpers/_font-source-declaration.scss +43 -0
- data/app/assets/stylesheets/lib/bourbon/helpers/_gradient-positions-parser.scss +13 -0
- data/app/assets/stylesheets/lib/bourbon/helpers/_linear-angle-parser.scss +25 -0
- data/app/assets/stylesheets/lib/bourbon/helpers/_linear-gradient-parser.scss +41 -0
- data/app/assets/stylesheets/lib/bourbon/helpers/_linear-positions-parser.scss +61 -0
- data/app/assets/stylesheets/lib/bourbon/helpers/_linear-side-corner-parser.scss +31 -0
- data/app/assets/stylesheets/lib/bourbon/helpers/_radial-arg-parser.scss +69 -0
- data/app/assets/stylesheets/lib/bourbon/helpers/_radial-gradient-parser.scss +50 -0
- data/app/assets/stylesheets/lib/bourbon/helpers/_radial-positions-parser.scss +18 -0
- data/app/assets/stylesheets/lib/bourbon/helpers/_render-gradients.scss +26 -0
- data/app/assets/stylesheets/lib/bourbon/helpers/_shape-size-stripper.scss +10 -0
- data/app/assets/stylesheets/lib/bourbon/helpers/_str-to-num.scss +50 -0
- data/app/assets/stylesheets/lib/bourbon/settings/_asset-pipeline.scss +7 -0
- data/app/assets/stylesheets/lib/bourbon/settings/_prefixer.scss +9 -0
- data/app/assets/stylesheets/lib/bourbon/settings/_px-to-em.scss +1 -0
- data/app/assets/stylesheets/lib/neat/_neat-helpers.scss +8 -0
- data/app/assets/stylesheets/lib/neat/_neat.scss +23 -0
- data/app/assets/stylesheets/lib/neat/functions/_new-breakpoint.scss +49 -0
- data/app/assets/stylesheets/lib/neat/functions/_private.scss +114 -0
- data/app/assets/stylesheets/lib/neat/grid/_box-sizing.scss +15 -0
- data/app/assets/stylesheets/lib/neat/grid/_direction-context.scss +33 -0
- data/app/assets/stylesheets/lib/neat/grid/_display-context.scss +28 -0
- data/app/assets/stylesheets/lib/neat/grid/_fill-parent.scss +22 -0
- data/app/assets/stylesheets/lib/neat/grid/_media.scss +92 -0
- data/app/assets/stylesheets/lib/neat/grid/_omega.scss +87 -0
- data/app/assets/stylesheets/lib/neat/grid/_outer-container.scss +38 -0
- data/app/assets/stylesheets/lib/neat/grid/_pad.scss +25 -0
- data/app/assets/stylesheets/lib/neat/grid/_private.scss +35 -0
- data/app/assets/stylesheets/lib/neat/grid/_row.scss +52 -0
- data/app/assets/stylesheets/lib/neat/grid/_shift.scss +50 -0
- data/app/assets/stylesheets/lib/neat/grid/_span-columns.scss +94 -0
- data/app/assets/stylesheets/lib/neat/grid/_to-deprecate.scss +97 -0
- data/app/assets/stylesheets/lib/neat/grid/_visual-grid.scss +42 -0
- data/app/assets/stylesheets/lib/neat/settings/_disable-warnings.scss +13 -0
- data/app/assets/stylesheets/lib/neat/settings/_grid.scss +51 -0
- data/app/assets/stylesheets/lib/neat/settings/_visual-grid.scss +27 -0
- data/app/assets/stylesheets/va_common_main.css.scss +18 -0
- data/bin/console +14 -0
- data/bin/setup +7 -0
- data/lib/generators/files/_footer.html.erb +89 -0
- data/lib/generators/files/_header.html.erb +7 -0
- data/lib/generators/va_common_generator.rb +6 -0
- data/lib/generators/va_footer_generator.rb +7 -0
- data/lib/generators/va_header_generator.rb +7 -0
- data/lib/va_common/engine.rb +4 -0
- data/lib/va_common/version.rb +3 -0
- data/lib/va_common.rb +2 -0
- data/va_common.gemspec +22 -0
- metadata +354 -0
|
@@ -0,0 +1,116 @@
|
|
|
1
|
+
// Foundation by ZURB
|
|
2
|
+
// foundation.zurb.com
|
|
3
|
+
// Licensed under MIT Open Source
|
|
4
|
+
|
|
5
|
+
@import "global";
|
|
6
|
+
|
|
7
|
+
//
|
|
8
|
+
// @variables
|
|
9
|
+
//
|
|
10
|
+
|
|
11
|
+
$include-html-nav-classes: $include-html-classes !default;
|
|
12
|
+
|
|
13
|
+
// We use this to control padding.
|
|
14
|
+
$side-nav-padding: rem-calc(14 0) !default;
|
|
15
|
+
|
|
16
|
+
// We use these to control list styles.
|
|
17
|
+
$side-nav-list-type: none !default;
|
|
18
|
+
$side-nav-list-position: outside !default;
|
|
19
|
+
$side-nav-list-margin: rem-calc(0 0 7 0) !default;
|
|
20
|
+
|
|
21
|
+
// We use these to control link styles.
|
|
22
|
+
$side-nav-link-color: $primary-color !default;
|
|
23
|
+
$side-nav-link-color-active: scale-color($side-nav-link-color, $lightness: 30%) !default;
|
|
24
|
+
$side-nav-link-color-hover: scale-color($side-nav-link-color, $lightness: 30%) !default;
|
|
25
|
+
$side-nav-link-bg-hover: hsla(0, 0, 0, 0.025) !default;
|
|
26
|
+
$side-nav-link-margin: 0 !default;
|
|
27
|
+
$side-nav-link-padding: rem-calc(7 14) !default;
|
|
28
|
+
$side-nav-font-size: rem-calc(14) !default;
|
|
29
|
+
$side-nav-font-weight: $font-weight-normal !default;
|
|
30
|
+
$side-nav-font-weight-active: $side-nav-font-weight !default;
|
|
31
|
+
$side-nav-font-family: $body-font-family !default;
|
|
32
|
+
$side-nav-font-family-active: $side-nav-font-family !default;
|
|
33
|
+
|
|
34
|
+
// We use these to control heading styles.
|
|
35
|
+
$side-nav-heading-color: $side-nav-link-color !default;
|
|
36
|
+
$side-nav-heading-font-size: $side-nav-font-size !default;
|
|
37
|
+
$side-nav-heading-font-weight: bold !default;
|
|
38
|
+
$side-nav-heading-text-transform: uppercase !default;
|
|
39
|
+
|
|
40
|
+
// We use these to control border styles
|
|
41
|
+
$side-nav-divider-size: 1px !default;
|
|
42
|
+
$side-nav-divider-style: solid !default;
|
|
43
|
+
$side-nav-divider-color: scale-color($white, $lightness: 10%) !default;
|
|
44
|
+
|
|
45
|
+
|
|
46
|
+
//
|
|
47
|
+
// @mixins
|
|
48
|
+
//
|
|
49
|
+
|
|
50
|
+
|
|
51
|
+
// We use this to style the side-nav
|
|
52
|
+
//
|
|
53
|
+
// $divider-color - Border color of divider. Default: $side-nav-divider-color.
|
|
54
|
+
// $font-size - Font size of nav items. Default: $side-nav-font-size.
|
|
55
|
+
// $link-color - Color of navigation links. Default: $side-nav-link-color.
|
|
56
|
+
// $link-color-hover - Color of navigation links when hovered. Default: $side-nav-link-color-hover.
|
|
57
|
+
@mixin side-nav(
|
|
58
|
+
$divider-color:$side-nav-divider-color,
|
|
59
|
+
$font-size:$side-nav-font-size,
|
|
60
|
+
$link-color:$side-nav-link-color,
|
|
61
|
+
$link-color-hover:$side-nav-link-color-hover,
|
|
62
|
+
$link-bg-hover:$side-nav-link-bg-hover) {
|
|
63
|
+
display: block;
|
|
64
|
+
margin: 0;
|
|
65
|
+
padding: $side-nav-padding;
|
|
66
|
+
list-style-type: $side-nav-list-type;
|
|
67
|
+
list-style-position: $side-nav-list-position;
|
|
68
|
+
font-family: $side-nav-font-family;
|
|
69
|
+
|
|
70
|
+
li {
|
|
71
|
+
margin: $side-nav-list-margin;
|
|
72
|
+
font-size: $font-size;
|
|
73
|
+
font-weight: $side-nav-font-weight;
|
|
74
|
+
|
|
75
|
+
a:not(.button) {
|
|
76
|
+
display: block;
|
|
77
|
+
color: $link-color;
|
|
78
|
+
margin: $side-nav-link-margin;
|
|
79
|
+
padding: $side-nav-link-padding;
|
|
80
|
+
&:hover,
|
|
81
|
+
&:focus {
|
|
82
|
+
background: $link-bg-hover;
|
|
83
|
+
color: $link-color-hover;
|
|
84
|
+
}
|
|
85
|
+
}
|
|
86
|
+
|
|
87
|
+
&.active > a:first-child:not(.button) {
|
|
88
|
+
color: $side-nav-link-color-active;
|
|
89
|
+
font-weight: $side-nav-font-weight-active;
|
|
90
|
+
font-family: $side-nav-font-family-active;
|
|
91
|
+
}
|
|
92
|
+
|
|
93
|
+
&.divider {
|
|
94
|
+
border-top: $side-nav-divider-size $side-nav-divider-style;
|
|
95
|
+
height: 0;
|
|
96
|
+
padding: 0;
|
|
97
|
+
list-style: none;
|
|
98
|
+
border-top-color: $divider-color;
|
|
99
|
+
}
|
|
100
|
+
|
|
101
|
+
&.heading {
|
|
102
|
+
color: $side-nav-heading-color;
|
|
103
|
+
font: {
|
|
104
|
+
size: $side-nav-heading-font-size;
|
|
105
|
+
weight: $side-nav-heading-font-weight;
|
|
106
|
+
}
|
|
107
|
+
text-transform: $side-nav-heading-text-transform;
|
|
108
|
+
}
|
|
109
|
+
}
|
|
110
|
+
}
|
|
111
|
+
|
|
112
|
+
@include exports("side-nav") {
|
|
113
|
+
@if $include-html-nav-classes {
|
|
114
|
+
.side-nav { @include side-nav; }
|
|
115
|
+
}
|
|
116
|
+
}
|
|
@@ -0,0 +1,199 @@
|
|
|
1
|
+
// Foundation by ZURB
|
|
2
|
+
// foundation.zurb.com
|
|
3
|
+
// Licensed under MIT Open Source
|
|
4
|
+
|
|
5
|
+
@import "global";
|
|
6
|
+
@import "buttons";
|
|
7
|
+
@import "dropdown-buttons";
|
|
8
|
+
|
|
9
|
+
//
|
|
10
|
+
// @name _split-buttons.scss
|
|
11
|
+
// @dependencies _buttons.scss, _global.scss
|
|
12
|
+
//
|
|
13
|
+
|
|
14
|
+
//
|
|
15
|
+
// @variables
|
|
16
|
+
//
|
|
17
|
+
|
|
18
|
+
$include-html-button-classes: $include-html-classes !default;
|
|
19
|
+
|
|
20
|
+
// We use these to control different shared styles for Split Buttons
|
|
21
|
+
$split-button-function-factor: 10% !default;
|
|
22
|
+
$split-button-pip-color: $white !default;
|
|
23
|
+
$split-button-pip-color-alt: $oil !default;
|
|
24
|
+
$split-button-active-bg-tint: rgba(0,0,0,0.1) !default;
|
|
25
|
+
|
|
26
|
+
// We use these to control tiny split buttons
|
|
27
|
+
$split-button-padding-tny: $button-pip-tny * 10 !default;
|
|
28
|
+
$split-button-span-width-tny: $button-pip-tny * 6 !default;
|
|
29
|
+
$split-button-pip-size-tny: $button-pip-tny !default;
|
|
30
|
+
$split-button-pip-top-tny: $button-pip-tny * 2 !default;
|
|
31
|
+
$split-button-pip-default-float-tny: rem-calc(-6) !default;
|
|
32
|
+
|
|
33
|
+
// We use these to control small split buttons
|
|
34
|
+
$split-button-padding-sml: $button-pip-sml * 10 !default;
|
|
35
|
+
$split-button-span-width-sml: $button-pip-sml * 6 !default;
|
|
36
|
+
$split-button-pip-size-sml: $button-pip-sml !default;
|
|
37
|
+
$split-button-pip-top-sml: $button-pip-sml * 1.5 !default;
|
|
38
|
+
$split-button-pip-default-float-sml: rem-calc(-6) !default;
|
|
39
|
+
|
|
40
|
+
// We use these to control medium split buttons
|
|
41
|
+
$split-button-padding-med: $button-pip-med * 9 !default;
|
|
42
|
+
$split-button-span-width-med: $button-pip-med * 5.5 !default;
|
|
43
|
+
$split-button-pip-size-med: $button-pip-med - rem-calc(3) !default;
|
|
44
|
+
$split-button-pip-top-med: $button-pip-med * 1.5 !default;
|
|
45
|
+
$split-button-pip-default-float-med: rem-calc(-6) !default;
|
|
46
|
+
|
|
47
|
+
// We use these to control large split buttons
|
|
48
|
+
$split-button-padding-lrg: $button-pip-lrg * 8 !default;
|
|
49
|
+
$split-button-span-width-lrg: $button-pip-lrg * 5 !default;
|
|
50
|
+
$split-button-pip-size-lrg: $button-pip-lrg - rem-calc(6) !default;
|
|
51
|
+
$split-button-pip-top-lrg: $button-pip-lrg + rem-calc(5) !default;
|
|
52
|
+
$split-button-pip-default-float-lrg: rem-calc(-6) !default;
|
|
53
|
+
|
|
54
|
+
|
|
55
|
+
//
|
|
56
|
+
// @mixins
|
|
57
|
+
//
|
|
58
|
+
|
|
59
|
+
// We use this mixin to create split buttons that build upon the button mixins
|
|
60
|
+
//
|
|
61
|
+
// $padding - Type of padding to apply. Default: medium. Options: tiny, small, medium, large.
|
|
62
|
+
// $pip-color - Color of the triangle. Default: $split-button-pip-color.
|
|
63
|
+
// $span-border - Border color of button divider. Default: $primary-color.
|
|
64
|
+
// $base-style - Apply base style to split button. Default: true.
|
|
65
|
+
@mixin split-button(
|
|
66
|
+
$padding:medium,
|
|
67
|
+
$pip-color:$split-button-pip-color,
|
|
68
|
+
$span-border:$primary-color,
|
|
69
|
+
$base-style:true) {
|
|
70
|
+
|
|
71
|
+
// With this, we can control whether or not the base styles come through.
|
|
72
|
+
@if $base-style {
|
|
73
|
+
position: relative;
|
|
74
|
+
|
|
75
|
+
// Styling for the split arrow clickable area
|
|
76
|
+
span {
|
|
77
|
+
display: block;
|
|
78
|
+
height: 100%;
|
|
79
|
+
position: absolute;
|
|
80
|
+
#{$opposite-direction}: 0;
|
|
81
|
+
top: 0;
|
|
82
|
+
border-#{$default-float}: solid 1px;
|
|
83
|
+
|
|
84
|
+
// Building the triangle pip indicator
|
|
85
|
+
&:after {
|
|
86
|
+
position: absolute;
|
|
87
|
+
content: "";
|
|
88
|
+
width: 0;
|
|
89
|
+
height: 0;
|
|
90
|
+
display: block;
|
|
91
|
+
border-style: inset;
|
|
92
|
+
top: 50%;
|
|
93
|
+
|
|
94
|
+
#{$default-float}: 50%;
|
|
95
|
+
}
|
|
96
|
+
|
|
97
|
+
&:active { background-color: $split-button-active-bg-tint; }
|
|
98
|
+
}
|
|
99
|
+
}
|
|
100
|
+
|
|
101
|
+
// Control the border color for the span area of the split button
|
|
102
|
+
@if $span-border {
|
|
103
|
+
span {
|
|
104
|
+
border-#{$default-float}-color: rgba(255,255,255,0.5);
|
|
105
|
+
}
|
|
106
|
+
}
|
|
107
|
+
|
|
108
|
+
// Style of the button and clickable area for tiny sizes
|
|
109
|
+
@if $padding == tiny {
|
|
110
|
+
padding-#{$opposite-direction}: $split-button-padding-tny;
|
|
111
|
+
|
|
112
|
+
span { width: $split-button-span-width-tny;
|
|
113
|
+
&:after {
|
|
114
|
+
border-top-style: solid;
|
|
115
|
+
border-width: $split-button-pip-size-tny;
|
|
116
|
+
top: 48%;
|
|
117
|
+
margin-#{$default-float}: $split-button-pip-default-float-tny;
|
|
118
|
+
}
|
|
119
|
+
}
|
|
120
|
+
}
|
|
121
|
+
|
|
122
|
+
// Style of the button and clickable area for small sizes
|
|
123
|
+
@else if $padding == small {
|
|
124
|
+
padding-#{$opposite-direction}: $split-button-padding-sml;
|
|
125
|
+
|
|
126
|
+
span { width: $split-button-span-width-sml;
|
|
127
|
+
&:after {
|
|
128
|
+
border-top-style: solid;
|
|
129
|
+
border-width: $split-button-pip-size-sml;
|
|
130
|
+
top: 48%;
|
|
131
|
+
margin-#{$default-float}: $split-button-pip-default-float-sml;
|
|
132
|
+
}
|
|
133
|
+
}
|
|
134
|
+
}
|
|
135
|
+
|
|
136
|
+
// Style of the button and clickable area for default (medium) sizes
|
|
137
|
+
@else if $padding == medium {
|
|
138
|
+
padding-#{$opposite-direction}: $split-button-padding-med;
|
|
139
|
+
|
|
140
|
+
span { width: $split-button-span-width-med;
|
|
141
|
+
&:after {
|
|
142
|
+
border-top-style: solid;
|
|
143
|
+
border-width: $split-button-pip-size-med;
|
|
144
|
+
top: 48%;
|
|
145
|
+
margin-#{$default-float}: $split-button-pip-default-float-med;
|
|
146
|
+
}
|
|
147
|
+
}
|
|
148
|
+
}
|
|
149
|
+
|
|
150
|
+
// Style of the button and clickable area for large sizes
|
|
151
|
+
@else if $padding == large {
|
|
152
|
+
padding-#{$opposite-direction}: $split-button-padding-lrg;
|
|
153
|
+
|
|
154
|
+
span { width: $split-button-span-width-lrg;
|
|
155
|
+
&:after {
|
|
156
|
+
border-top-style: solid;
|
|
157
|
+
border-width: $split-button-pip-size-lrg;
|
|
158
|
+
top: 48%;
|
|
159
|
+
margin-#{$default-float}: $split-button-pip-default-float-lrg;
|
|
160
|
+
}
|
|
161
|
+
}
|
|
162
|
+
}
|
|
163
|
+
|
|
164
|
+
// Control the color of the triangle pip
|
|
165
|
+
@if $pip-color {
|
|
166
|
+
span:after { border-color: $pip-color transparent transparent transparent; }
|
|
167
|
+
}
|
|
168
|
+
}
|
|
169
|
+
|
|
170
|
+
@include exports("split-button") {
|
|
171
|
+
@if $include-html-button-classes {
|
|
172
|
+
|
|
173
|
+
.split.button { @include split-button;
|
|
174
|
+
|
|
175
|
+
&.secondary { @include split-button(false, $split-button-pip-color, $secondary-color, false); }
|
|
176
|
+
&.alert { @include split-button(false, false, $alert-color, false); }
|
|
177
|
+
&.success { @include split-button(false, false, $success-color, false); }
|
|
178
|
+
|
|
179
|
+
&.tiny { @include split-button(tiny, false, false, false); }
|
|
180
|
+
&.small { @include split-button(small, false, false, false); }
|
|
181
|
+
&.large { @include split-button(large, false, false, false); }
|
|
182
|
+
&.expand { padding-left: 2rem; }
|
|
183
|
+
|
|
184
|
+
&.secondary { @include split-button(false, $split-button-pip-color-alt, false, false); }
|
|
185
|
+
|
|
186
|
+
&.radius span { @include side-radius($opposite-direction, $global-radius); }
|
|
187
|
+
&.round span { @include side-radius($opposite-direction, 1000px); }
|
|
188
|
+
&.no-pip{
|
|
189
|
+
span:before{ border-style:none; }
|
|
190
|
+
span:after{ border-style:none; }
|
|
191
|
+
span{padding-top:$split-button-pip-top-med;}
|
|
192
|
+
&.tiny{ span{ padding-top:$split-button-pip-top-tny; } }
|
|
193
|
+
&.small{ span{ padding-top:$split-button-pip-top-sml; } }
|
|
194
|
+
&.large{ span{ padding-top:$split-button-pip-top-lrg; } }
|
|
195
|
+
}
|
|
196
|
+
}
|
|
197
|
+
|
|
198
|
+
}
|
|
199
|
+
}
|
|
@@ -0,0 +1,123 @@
|
|
|
1
|
+
// Foundation by ZURB
|
|
2
|
+
// foundation.zurb.com
|
|
3
|
+
// Licensed under MIT Open Source
|
|
4
|
+
|
|
5
|
+
@import "global";
|
|
6
|
+
|
|
7
|
+
//
|
|
8
|
+
// @name _sub-nav.scss
|
|
9
|
+
// @dependencies _global.scss
|
|
10
|
+
//
|
|
11
|
+
|
|
12
|
+
//
|
|
13
|
+
// @variables
|
|
14
|
+
//
|
|
15
|
+
|
|
16
|
+
$include-html-nav-classes: $include-html-classes !default;
|
|
17
|
+
|
|
18
|
+
// We use these to control margin and padding
|
|
19
|
+
$sub-nav-list-margin: rem-calc(-4 0 18) !default;
|
|
20
|
+
$sub-nav-list-padding-top: rem-calc(4) !default;
|
|
21
|
+
|
|
22
|
+
// We use this to control the definition
|
|
23
|
+
$sub-nav-font-family: $body-font-family !default;
|
|
24
|
+
$sub-nav-font-size: rem-calc(14) !default;
|
|
25
|
+
$sub-nav-font-color: $aluminum !default;
|
|
26
|
+
$sub-nav-font-weight: $font-weight-normal !default;
|
|
27
|
+
$sub-nav-text-decoration: none !default;
|
|
28
|
+
$sub-nav-padding: rem-calc(3 16) !default;
|
|
29
|
+
$sub-nav-border-radius: 3px !default;
|
|
30
|
+
$sub-nav-font-color-hover: scale-color($sub-nav-font-color, $lightness: -25%) !default;
|
|
31
|
+
|
|
32
|
+
|
|
33
|
+
// We use these to control the active item styles
|
|
34
|
+
|
|
35
|
+
$sub-nav-active-font-weight: $font-weight-normal !default;
|
|
36
|
+
$sub-nav-active-bg: $primary-color !default;
|
|
37
|
+
$sub-nav-active-bg-hover: scale-color($sub-nav-active-bg, $lightness: -14%) !default;
|
|
38
|
+
$sub-nav-active-color: $white !default;
|
|
39
|
+
$sub-nav-active-padding: $sub-nav-padding !default;
|
|
40
|
+
$sub-nav-active-cursor: default !default;
|
|
41
|
+
|
|
42
|
+
$sub-nav-item-divider: "" !default;
|
|
43
|
+
$sub-nav-item-divider-margin: rem-calc(12) !default;
|
|
44
|
+
|
|
45
|
+
//
|
|
46
|
+
// @mixins
|
|
47
|
+
//
|
|
48
|
+
|
|
49
|
+
|
|
50
|
+
// Create a sub-nav item
|
|
51
|
+
//
|
|
52
|
+
// $font-color - Font color. Default: $sub-nav-font-color.
|
|
53
|
+
// $font-size - Font size. Default: $sub-nav-font-size.
|
|
54
|
+
// $active-bg - Background of active nav item. Default: $sub-nav-active-bg.
|
|
55
|
+
// $active-bg-hover - Background of active nav item, when hovered. Default: $sub-nav-active-bg-hover.
|
|
56
|
+
@mixin sub-nav(
|
|
57
|
+
$font-color: $sub-nav-font-color,
|
|
58
|
+
$font-size: $sub-nav-font-size,
|
|
59
|
+
$active-bg: $sub-nav-active-bg,
|
|
60
|
+
$active-bg-hover: $sub-nav-active-bg-hover) {
|
|
61
|
+
display: block;
|
|
62
|
+
width: auto;
|
|
63
|
+
overflow: hidden;
|
|
64
|
+
margin: $sub-nav-list-margin;
|
|
65
|
+
padding-top: $sub-nav-list-padding-top;
|
|
66
|
+
|
|
67
|
+
dt {
|
|
68
|
+
text-transform: uppercase;
|
|
69
|
+
}
|
|
70
|
+
|
|
71
|
+
dt,
|
|
72
|
+
dd,
|
|
73
|
+
li {
|
|
74
|
+
float: $default-float;
|
|
75
|
+
display: inline;
|
|
76
|
+
margin-#{$default-float}: rem-calc(16);
|
|
77
|
+
margin-bottom: 0;
|
|
78
|
+
font-family: $sub-nav-font-family;
|
|
79
|
+
font-weight: $sub-nav-font-weight;
|
|
80
|
+
font-size: $font-size;
|
|
81
|
+
color: $font-color;
|
|
82
|
+
|
|
83
|
+
a {
|
|
84
|
+
text-decoration: $sub-nav-text-decoration;
|
|
85
|
+
color: $sub-nav-font-color;
|
|
86
|
+
padding: $sub-nav-padding;
|
|
87
|
+
&:hover {
|
|
88
|
+
color: $sub-nav-font-color-hover;
|
|
89
|
+
}
|
|
90
|
+
}
|
|
91
|
+
|
|
92
|
+
&.active a {
|
|
93
|
+
@include radius($sub-nav-border-radius);
|
|
94
|
+
font-weight: $sub-nav-active-font-weight;
|
|
95
|
+
background: $active-bg;
|
|
96
|
+
padding: $sub-nav-active-padding;
|
|
97
|
+
cursor: $sub-nav-active-cursor;
|
|
98
|
+
color: $sub-nav-active-color;
|
|
99
|
+
&:hover {
|
|
100
|
+
background: $active-bg-hover;
|
|
101
|
+
}
|
|
102
|
+
}
|
|
103
|
+
@if $sub-nav-item-divider != "" {
|
|
104
|
+
margin-#{$default-float}: 0;
|
|
105
|
+
|
|
106
|
+
&:before {
|
|
107
|
+
content: "#{$sub-nav-item-divider}";
|
|
108
|
+
margin: 0 $sub-nav-item-divider-margin;
|
|
109
|
+
}
|
|
110
|
+
|
|
111
|
+
&:first-child:before {
|
|
112
|
+
content: "";
|
|
113
|
+
margin: 0;
|
|
114
|
+
}
|
|
115
|
+
}
|
|
116
|
+
}
|
|
117
|
+
}
|
|
118
|
+
|
|
119
|
+
@include exports("sub-nav") {
|
|
120
|
+
@if $include-html-nav-classes {
|
|
121
|
+
.sub-nav { @include sub-nav; }
|
|
122
|
+
}
|
|
123
|
+
}
|
|
@@ -0,0 +1,238 @@
|
|
|
1
|
+
// Foundation by ZURB
|
|
2
|
+
// foundation.zurb.com
|
|
3
|
+
// Licensed under MIT Open Source
|
|
4
|
+
|
|
5
|
+
@import "global";
|
|
6
|
+
|
|
7
|
+
//
|
|
8
|
+
// @name
|
|
9
|
+
// @dependencies _global.scss
|
|
10
|
+
//
|
|
11
|
+
|
|
12
|
+
//
|
|
13
|
+
// @variables
|
|
14
|
+
//
|
|
15
|
+
|
|
16
|
+
$include-html-form-classes: $include-html-classes !default;
|
|
17
|
+
|
|
18
|
+
// Controlling background color for the switch container
|
|
19
|
+
$switch-bg: $gainsboro !default;
|
|
20
|
+
|
|
21
|
+
// We use these to control the switch heights for our default classes
|
|
22
|
+
$switch-height-tny: 1.5rem !default;
|
|
23
|
+
$switch-height-sml: 1.75rem !default;
|
|
24
|
+
$switch-height-med: 2rem !default;
|
|
25
|
+
$switch-height-lrg: 2.5rem !default;
|
|
26
|
+
$switch-bottom-margin: 1.5rem !default;
|
|
27
|
+
|
|
28
|
+
// We use these to style the switch-paddle
|
|
29
|
+
$switch-paddle-bg: $white !default;
|
|
30
|
+
$switch-paddle-transition-speed: .15s !default;
|
|
31
|
+
$switch-paddle-transition-ease: ease-out !default;
|
|
32
|
+
$switch-active-color: $primary-color !default;
|
|
33
|
+
|
|
34
|
+
|
|
35
|
+
//
|
|
36
|
+
// @mixins
|
|
37
|
+
//
|
|
38
|
+
|
|
39
|
+
// We use this mixin to create the base styles for our switch element.
|
|
40
|
+
//
|
|
41
|
+
// $transition-speed - Time in ms for switch to toggle. Default: $switch-paddle-transition-speed.
|
|
42
|
+
// $transition-ease - Easing function to use for animation (i.e. ease-out). Default: $switch-paddle-transition-ease.
|
|
43
|
+
@mixin switch-base(
|
|
44
|
+
$transition-speed:$switch-paddle-transition-speed,
|
|
45
|
+
$transition-ease:$switch-paddle-transition-ease) {
|
|
46
|
+
|
|
47
|
+
padding: 0;
|
|
48
|
+
border: none;
|
|
49
|
+
position: relative;
|
|
50
|
+
outline: 0;
|
|
51
|
+
-webkit-user-select: none;
|
|
52
|
+
-moz-user-select: none;
|
|
53
|
+
user-select: none;
|
|
54
|
+
|
|
55
|
+
// Default label styles for type and transition
|
|
56
|
+
label {
|
|
57
|
+
display: block;
|
|
58
|
+
margin-bottom: ($switch-height-med / 2);
|
|
59
|
+
position: relative;
|
|
60
|
+
color: transparent;
|
|
61
|
+
background: $switch-bg;
|
|
62
|
+
text-indent: 100%;
|
|
63
|
+
width: $switch-height-med * 2; height: $switch-height-med;
|
|
64
|
+
cursor: pointer;
|
|
65
|
+
|
|
66
|
+
// Transition for the switch label to follow paddle
|
|
67
|
+
@include single-transition(left, $transition-speed, $transition-ease);
|
|
68
|
+
}
|
|
69
|
+
|
|
70
|
+
// So that we don't need to recreate the form with any JS, we use the
|
|
71
|
+
// existing checkbox or radio button, but we cleverly position and hide it.
|
|
72
|
+
input {
|
|
73
|
+
opacity: 0;
|
|
74
|
+
position: absolute;
|
|
75
|
+
top: 9px;
|
|
76
|
+
left: 10px;
|
|
77
|
+
padding:0;
|
|
78
|
+
|
|
79
|
+
& + label { margin-left: 0; margin-right: 0; }
|
|
80
|
+
}
|
|
81
|
+
|
|
82
|
+
// The paddle for the switch is created from an after psuedoclass
|
|
83
|
+
// content element. This is sized and positioned, and reacts to
|
|
84
|
+
// the state of the input.
|
|
85
|
+
|
|
86
|
+
label:after {
|
|
87
|
+
content: "";
|
|
88
|
+
display: block;
|
|
89
|
+
background: $switch-paddle-bg;
|
|
90
|
+
position: absolute;
|
|
91
|
+
top: .25rem;
|
|
92
|
+
left: .25rem;
|
|
93
|
+
width: $switch-height-med - 0.5rem;
|
|
94
|
+
height: $switch-height-med - 0.5rem;
|
|
95
|
+
|
|
96
|
+
-webkit-transition: left $transition-speed $transition-ease;
|
|
97
|
+
-moz-transition: left $transition-speed $transition-ease;
|
|
98
|
+
-o-transition: translate3d(0,0,0);
|
|
99
|
+
transition: left $transition-speed $transition-ease;
|
|
100
|
+
|
|
101
|
+
-webkit-transform: translate3d(0,0,0);
|
|
102
|
+
-moz-transform: translate3d(0,0,0);
|
|
103
|
+
-o-transform: translate3d(0,0,0);
|
|
104
|
+
transform: translate3d(0,0,0);
|
|
105
|
+
}
|
|
106
|
+
|
|
107
|
+
input:checked + label {
|
|
108
|
+
background: $switch-active-color;
|
|
109
|
+
}
|
|
110
|
+
|
|
111
|
+
input:checked + label:after {
|
|
112
|
+
left: $switch-height-med + 0.25rem;
|
|
113
|
+
}
|
|
114
|
+
}
|
|
115
|
+
|
|
116
|
+
// We use this mixin to create the size styles for switches.
|
|
117
|
+
//
|
|
118
|
+
// $height - Height (in px) of the switch. Default: $switch-height-med.
|
|
119
|
+
// $font-size - Font size of text in switch. Default: $switch-font-size-med.
|
|
120
|
+
// $line-height - Line height of switch. Default: 2.3rem.
|
|
121
|
+
@mixin switch-size($height: $switch-height-med) {
|
|
122
|
+
|
|
123
|
+
label {
|
|
124
|
+
width: $height * 2;
|
|
125
|
+
height: $height;
|
|
126
|
+
}
|
|
127
|
+
|
|
128
|
+
label:after {
|
|
129
|
+
width: $height - 0.5rem;
|
|
130
|
+
height: $height - 0.5rem;
|
|
131
|
+
}
|
|
132
|
+
|
|
133
|
+
input:checked + label:after {
|
|
134
|
+
left: $height + 0.25rem;
|
|
135
|
+
}
|
|
136
|
+
|
|
137
|
+
}
|
|
138
|
+
|
|
139
|
+
// We use this mixin to add color and other fanciness to the switches.
|
|
140
|
+
//
|
|
141
|
+
// $paddle-bg - Background of switch paddle. Default: $switch-paddle-bg.
|
|
142
|
+
// $active-color - Background color of positive side of switch. Default: $switch-positive-color.
|
|
143
|
+
// $negative-color - Background color of negative side of switch. Default: $switch-negative-color.
|
|
144
|
+
// $radius - Radius to apply to switch. Default: false.
|
|
145
|
+
// $base-style - Apply base styles? Default: true.
|
|
146
|
+
@mixin switch-style(
|
|
147
|
+
$paddle-bg:$switch-paddle-bg,
|
|
148
|
+
$active-color:$switch-active-color,
|
|
149
|
+
$radius:false,
|
|
150
|
+
$base-style:true) {
|
|
151
|
+
|
|
152
|
+
@if $base-style {
|
|
153
|
+
|
|
154
|
+
label {
|
|
155
|
+
color: transparent;
|
|
156
|
+
background: $switch-bg;
|
|
157
|
+
}
|
|
158
|
+
|
|
159
|
+
label:after {
|
|
160
|
+
background: $paddle-bg;
|
|
161
|
+
}
|
|
162
|
+
|
|
163
|
+
input:checked + label {
|
|
164
|
+
background: $active-color;
|
|
165
|
+
}
|
|
166
|
+
}
|
|
167
|
+
|
|
168
|
+
// Setting up the radius for switches
|
|
169
|
+
@if $radius == true {
|
|
170
|
+
label {
|
|
171
|
+
border-radius: 2rem;
|
|
172
|
+
}
|
|
173
|
+
label:after {
|
|
174
|
+
border-radius: 2rem;
|
|
175
|
+
}
|
|
176
|
+
}
|
|
177
|
+
@else if $radius {
|
|
178
|
+
label {
|
|
179
|
+
border-radius: $radius;
|
|
180
|
+
}
|
|
181
|
+
label:after {
|
|
182
|
+
border-radius: $radius;
|
|
183
|
+
}
|
|
184
|
+
}
|
|
185
|
+
|
|
186
|
+
}
|
|
187
|
+
|
|
188
|
+
// We use this to quickly create switches with a single mixin
|
|
189
|
+
//
|
|
190
|
+
// $transition-speed - Time in ms for switch to toggle. Default: $switch-paddle-transition-speed.
|
|
191
|
+
// $transition-ease - Easing function to use for animation (i.e. ease-out). Default: $switch-paddle-transition-ease.
|
|
192
|
+
// $height - Height (in px) of the switch. Default: $switch-height-med.
|
|
193
|
+
// $paddle-bg - Background of switch paddle. Default: $switch-paddle-bg.
|
|
194
|
+
// $active-color - Background color of an active switch. Default: $switch-active-color.
|
|
195
|
+
// $radius - Radius to apply to switch. Default: false.
|
|
196
|
+
// $base-style - Apply base styles? Default: true.
|
|
197
|
+
@mixin switch(
|
|
198
|
+
$transition-speed: $switch-paddle-transition-speed,
|
|
199
|
+
$transition-ease: $switch-paddle-transition-ease,
|
|
200
|
+
$height: $switch-height-med,
|
|
201
|
+
$paddle-bg: $switch-paddle-bg,
|
|
202
|
+
$active-color: $switch-active-color,
|
|
203
|
+
$radius:false,
|
|
204
|
+
$base-style:true) {
|
|
205
|
+
@include switch-base($transition-speed, $transition-ease);
|
|
206
|
+
@include switch-size($height);
|
|
207
|
+
@include switch-style($paddle-bg, $active-color, $radius, $base-style);
|
|
208
|
+
}
|
|
209
|
+
|
|
210
|
+
@include exports("switch") {
|
|
211
|
+
@if $include-html-form-classes {
|
|
212
|
+
.switch {
|
|
213
|
+
@include switch;
|
|
214
|
+
|
|
215
|
+
// Large radio switches
|
|
216
|
+
&.large { @include switch-size($switch-height-lrg); }
|
|
217
|
+
|
|
218
|
+
// Small radio switches
|
|
219
|
+
&.small { @include switch-size($switch-height-sml); }
|
|
220
|
+
|
|
221
|
+
// Tiny radio switches
|
|
222
|
+
&.tiny { @include switch-size($switch-height-tny); }
|
|
223
|
+
|
|
224
|
+
// Add a radius to the switch
|
|
225
|
+
&.radius {
|
|
226
|
+
label { @include radius(4px); }
|
|
227
|
+
label:after { @include radius(3px); }
|
|
228
|
+
}
|
|
229
|
+
|
|
230
|
+
// Make the switch completely round, like a pill
|
|
231
|
+
&.round { @include radius(1000px);
|
|
232
|
+
label { @include radius(2rem); }
|
|
233
|
+
label:after { @include radius(2rem); }
|
|
234
|
+
}
|
|
235
|
+
|
|
236
|
+
}
|
|
237
|
+
}
|
|
238
|
+
}
|