federalist-basic-report-theme 0.1.0 → 0.1.3
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +5 -5
- data/README.md +13 -0
- data/_sass/uswds/_all.scss +1 -0
- data/_sass/uswds/components/_accordions.scss +150 -0
- data/_sass/uswds/components/_alerts.scss +128 -0
- data/_sass/uswds/components/_banner.scss +203 -0
- data/_sass/uswds/components/_footer.scss +522 -0
- data/_sass/uswds/components/_forms.scss +156 -0
- data/_sass/uswds/components/_graphic-list.scss +35 -0
- data/_sass/uswds/components/_header.scss +216 -0
- data/_sass/uswds/components/_hero.scss +37 -0
- data/_sass/uswds/components/_layout.scss +36 -0
- data/_sass/uswds/components/_media-block.scss +12 -0
- data/_sass/uswds/components/_navigation.scss +561 -0
- data/_sass/uswds/components/_search.scss +111 -0
- data/_sass/uswds/components/_section.scss +37 -0
- data/_sass/uswds/components/_sidenav.scss +31 -0
- data/_sass/uswds/components/_skipnav.scss +19 -0
- data/_sass/uswds/core/_base.scss +36 -0
- data/_sass/uswds/core/_defaults.scss +8 -0
- data/_sass/uswds/core/_fonts.scss +65 -0
- data/_sass/uswds/core/_grid-settings.scss +3 -0
- data/_sass/uswds/core/_grid.scss +198 -0
- data/_sass/uswds/core/_utilities.scss +252 -0
- data/_sass/uswds/core/_variables-vendor.scss +12 -0
- data/_sass/uswds/core/_variables.scss +159 -0
- data/_sass/uswds/elements/_buttons.scss +217 -0
- data/_sass/uswds/elements/_embed.scss +26 -0
- data/_sass/uswds/elements/_figure.scss +13 -0
- data/_sass/uswds/elements/_inputs.scss +368 -0
- data/_sass/uswds/elements/_labels.scss +20 -0
- data/_sass/uswds/elements/_list.scss +32 -0
- data/_sass/uswds/elements/_table.scss +55 -0
- data/_sass/uswds/elements/_typography.scss +240 -0
- data/_sass/uswds/lib/_bourbon-deprecated-upcoming.scss +411 -0
- data/_sass/uswds/lib/_bourbon.scss +87 -0
- data/_sass/uswds/lib/_neat-helpers.scss +11 -0
- data/_sass/uswds/lib/_neat.scss +23 -0
- data/_sass/uswds/lib/_normalize.scss +424 -0
- data/_sass/uswds/lib/addons/_border-color.scss +26 -0
- data/_sass/uswds/lib/addons/_border-radius.scss +48 -0
- data/_sass/uswds/lib/addons/_border-style.scss +25 -0
- data/_sass/uswds/lib/addons/_border-width.scss +25 -0
- data/_sass/uswds/lib/addons/_buttons.scss +64 -0
- data/_sass/uswds/lib/addons/_clearfix.scss +25 -0
- data/_sass/uswds/lib/addons/_ellipsis.scss +30 -0
- data/_sass/uswds/lib/addons/_font-stacks.scss +31 -0
- data/_sass/uswds/lib/addons/_hide-text.scss +27 -0
- data/_sass/uswds/lib/addons/_margin.scss +26 -0
- data/_sass/uswds/lib/addons/_padding.scss +26 -0
- data/_sass/uswds/lib/addons/_position.scss +48 -0
- data/_sass/uswds/lib/addons/_prefixer.scss +66 -0
- data/_sass/uswds/lib/addons/_retina-image.scss +25 -0
- data/_sass/uswds/lib/addons/_size.scss +51 -0
- data/_sass/uswds/lib/addons/_text-inputs.scss +113 -0
- data/_sass/uswds/lib/addons/_timing-functions.scss +34 -0
- data/_sass/uswds/lib/addons/_triangle.scss +63 -0
- data/_sass/uswds/lib/addons/_word-wrap.scss +29 -0
- data/_sass/uswds/lib/css3/_animation.scss +43 -0
- data/_sass/uswds/lib/css3/_appearance.scss +3 -0
- data/_sass/uswds/lib/css3/_backface-visibility.scss +3 -0
- data/_sass/uswds/lib/css3/_background-image.scss +42 -0
- data/_sass/uswds/lib/css3/_background.scss +55 -0
- data/_sass/uswds/lib/css3/_border-image.scss +59 -0
- data/_sass/uswds/lib/css3/_calc.scss +4 -0
- data/_sass/uswds/lib/css3/_columns.scss +47 -0
- data/_sass/uswds/lib/css3/_filter.scss +4 -0
- data/_sass/uswds/lib/css3/_flex-box.scss +287 -0
- data/_sass/uswds/lib/css3/_font-face.scss +24 -0
- data/_sass/uswds/lib/css3/_font-feature-settings.scss +4 -0
- data/_sass/uswds/lib/css3/_hidpi-media-query.scss +10 -0
- data/_sass/uswds/lib/css3/_hyphens.scss +4 -0
- data/_sass/uswds/lib/css3/_image-rendering.scss +14 -0
- data/_sass/uswds/lib/css3/_keyframes.scss +36 -0
- data/_sass/uswds/lib/css3/_linear-gradient.scss +38 -0
- data/_sass/uswds/lib/css3/_perspective.scss +8 -0
- data/_sass/uswds/lib/css3/_placeholder.scss +8 -0
- data/_sass/uswds/lib/css3/_radial-gradient.scss +39 -0
- data/_sass/uswds/lib/css3/_selection.scss +42 -0
- data/_sass/uswds/lib/css3/_text-decoration.scss +19 -0
- data/_sass/uswds/lib/css3/_transform.scss +15 -0
- data/_sass/uswds/lib/css3/_transition.scss +71 -0
- data/_sass/uswds/lib/css3/_user-select.scss +3 -0
- data/_sass/uswds/lib/functions/_assign-inputs.scss +11 -0
- data/_sass/uswds/lib/functions/_contains-falsy.scss +20 -0
- data/_sass/uswds/lib/functions/_contains.scss +26 -0
- data/_sass/uswds/lib/functions/_is-length.scss +11 -0
- data/_sass/uswds/lib/functions/_is-light.scss +21 -0
- data/_sass/uswds/lib/functions/_is-number.scss +11 -0
- data/_sass/uswds/lib/functions/_is-size.scss +13 -0
- data/_sass/uswds/lib/functions/_modular-scale.scss +69 -0
- data/_sass/uswds/lib/functions/_new-breakpoint.scss +49 -0
- data/_sass/uswds/lib/functions/_private.scss +114 -0
- data/_sass/uswds/lib/functions/_px-to-em.scss +13 -0
- data/_sass/uswds/lib/functions/_px-to-rem.scss +15 -0
- data/_sass/uswds/lib/functions/_shade.scss +24 -0
- data/_sass/uswds/lib/functions/_strip-units.scss +17 -0
- data/_sass/uswds/lib/functions/_tint.scss +24 -0
- data/_sass/uswds/lib/functions/_transition-property-name.scss +22 -0
- data/_sass/uswds/lib/functions/_unpack.scss +27 -0
- data/_sass/uswds/lib/grid/_box-sizing.scss +15 -0
- data/_sass/uswds/lib/grid/_direction-context.scss +33 -0
- data/_sass/uswds/lib/grid/_display-context.scss +28 -0
- data/_sass/uswds/lib/grid/_fill-parent.scss +22 -0
- data/_sass/uswds/lib/grid/_media.scss +92 -0
- data/_sass/uswds/lib/grid/_omega.scss +87 -0
- data/_sass/uswds/lib/grid/_outer-container.scss +34 -0
- data/_sass/uswds/lib/grid/_pad.scss +25 -0
- data/_sass/uswds/lib/grid/_private.scss +35 -0
- data/_sass/uswds/lib/grid/_row.scss +52 -0
- data/_sass/uswds/lib/grid/_shift.scss +50 -0
- data/_sass/uswds/lib/grid/_span-columns.scss +94 -0
- data/_sass/uswds/lib/grid/_to-deprecate.scss +97 -0
- data/_sass/uswds/lib/grid/_visual-grid.scss +42 -0
- data/_sass/uswds/lib/helpers/_convert-units.scss +21 -0
- data/_sass/uswds/lib/helpers/_directional-values.scss +96 -0
- data/_sass/uswds/lib/helpers/_font-source-declaration.scss +43 -0
- data/_sass/uswds/lib/helpers/_gradient-positions-parser.scss +13 -0
- data/_sass/uswds/lib/helpers/_linear-angle-parser.scss +25 -0
- data/_sass/uswds/lib/helpers/_linear-gradient-parser.scss +41 -0
- data/_sass/uswds/lib/helpers/_linear-positions-parser.scss +61 -0
- data/_sass/uswds/lib/helpers/_linear-side-corner-parser.scss +31 -0
- data/_sass/uswds/lib/helpers/_radial-arg-parser.scss +69 -0
- data/_sass/uswds/lib/helpers/_radial-gradient-parser.scss +50 -0
- data/_sass/uswds/lib/helpers/_radial-positions-parser.scss +18 -0
- data/_sass/uswds/lib/helpers/_render-gradients.scss +26 -0
- data/_sass/uswds/lib/helpers/_shape-size-stripper.scss +10 -0
- data/_sass/uswds/lib/helpers/_str-to-num.scss +50 -0
- data/_sass/uswds/lib/mixins/_clearfix.scss +25 -0
- data/_sass/uswds/lib/settings/_asset-pipeline.scss +7 -0
- data/_sass/uswds/lib/settings/_disable-warnings.scss +13 -0
- data/_sass/uswds/lib/settings/_grid.scss +51 -0
- data/_sass/uswds/lib/settings/_prefixer.scss +9 -0
- data/_sass/uswds/lib/settings/_px-to-em.scss +1 -0
- data/_sass/uswds/lib/settings/_visual-grid.scss +27 -0
- data/_sass/uswds/uswds.scss +42 -0
- data/assets/uswds/fonts/merriweather-bold-webfont.eot +0 -0
- data/assets/uswds/fonts/merriweather-bold-webfont.ttf +0 -0
- data/assets/uswds/fonts/merriweather-bold-webfont.woff +0 -0
- data/assets/uswds/fonts/merriweather-bold-webfont.woff2 +0 -0
- data/assets/uswds/fonts/merriweather-italic-webfont.eot +0 -0
- data/assets/uswds/fonts/merriweather-italic-webfont.ttf +0 -0
- data/assets/uswds/fonts/merriweather-italic-webfont.woff +0 -0
- data/assets/uswds/fonts/merriweather-italic-webfont.woff2 +0 -0
- data/assets/uswds/fonts/merriweather-light-webfont.eot +0 -0
- data/assets/uswds/fonts/merriweather-light-webfont.ttf +0 -0
- data/assets/uswds/fonts/merriweather-light-webfont.woff +0 -0
- data/assets/uswds/fonts/merriweather-light-webfont.woff2 +0 -0
- data/assets/uswds/fonts/merriweather-regular-webfont.eot +0 -0
- data/assets/uswds/fonts/merriweather-regular-webfont.ttf +0 -0
- data/assets/uswds/fonts/merriweather-regular-webfont.woff +0 -0
- data/assets/uswds/fonts/merriweather-regular-webfont.woff2 +0 -0
- data/assets/uswds/fonts/sourcesanspro-bold-webfont.eot +0 -0
- data/assets/uswds/fonts/sourcesanspro-bold-webfont.ttf +0 -0
- data/assets/uswds/fonts/sourcesanspro-bold-webfont.woff +0 -0
- data/assets/uswds/fonts/sourcesanspro-bold-webfont.woff2 +0 -0
- data/assets/uswds/fonts/sourcesanspro-italic-webfont.eot +0 -0
- data/assets/uswds/fonts/sourcesanspro-italic-webfont.ttf +0 -0
- data/assets/uswds/fonts/sourcesanspro-italic-webfont.woff +0 -0
- data/assets/uswds/fonts/sourcesanspro-italic-webfont.woff2 +0 -0
- data/assets/uswds/fonts/sourcesanspro-light-webfont.eot +0 -0
- data/assets/uswds/fonts/sourcesanspro-light-webfont.ttf +0 -0
- data/assets/uswds/fonts/sourcesanspro-light-webfont.woff +0 -0
- data/assets/uswds/fonts/sourcesanspro-light-webfont.woff2 +0 -0
- data/assets/uswds/fonts/sourcesanspro-regular-webfont.eot +0 -0
- data/assets/uswds/fonts/sourcesanspro-regular-webfont.ttf +0 -0
- data/assets/uswds/fonts/sourcesanspro-regular-webfont.woff +0 -0
- data/assets/uswds/fonts/sourcesanspro-regular-webfont.woff2 +0 -0
- data/assets/uswds/img/alerts/error.png +0 -0
- data/assets/uswds/img/alerts/error.svg +17 -0
- data/assets/uswds/img/alerts/info.png +0 -0
- data/assets/uswds/img/alerts/info.svg +18 -0
- data/assets/uswds/img/alerts/success.png +0 -0
- data/assets/uswds/img/alerts/success.svg +12 -0
- data/assets/uswds/img/alerts/warning.png +0 -0
- data/assets/uswds/img/alerts/warning.svg +16 -0
- data/assets/uswds/img/angle-arrow-down-hover.png +0 -0
- data/assets/uswds/img/angle-arrow-down-hover.svg +1 -0
- data/assets/uswds/img/angle-arrow-down-primary-hover.png +0 -0
- data/assets/uswds/img/angle-arrow-down-primary-hover.svg +1 -0
- data/assets/uswds/img/angle-arrow-down-primary.png +0 -0
- data/assets/uswds/img/angle-arrow-down-primary.svg +1 -0
- data/assets/uswds/img/angle-arrow-down.png +0 -0
- data/assets/uswds/img/angle-arrow-down.svg +1 -0
- data/assets/uswds/img/angle-arrow-up-primary-hover.png +0 -0
- data/assets/uswds/img/angle-arrow-up-primary-hover.svg +1 -0
- data/assets/uswds/img/angle-arrow-up-primary.png +0 -0
- data/assets/uswds/img/angle-arrow-up-primary.svg +1 -0
- data/assets/uswds/img/arrow-both.png +0 -0
- data/assets/uswds/img/arrow-both.svg +1 -0
- data/assets/uswds/img/arrow-down.png +0 -0
- data/assets/uswds/img/arrow-down.svg +1 -0
- data/assets/uswds/img/arrow-right.png +0 -0
- data/assets/uswds/img/arrow-right.svg +1 -0
- data/assets/uswds/img/circle-124.png +0 -0
- data/assets/uswds/img/close-primary.png +0 -0
- data/assets/uswds/img/close-primary.svg +16 -0
- data/assets/uswds/img/close.png +0 -0
- data/assets/uswds/img/close.svg +12 -0
- data/assets/uswds/img/correct8.png +0 -0
- data/assets/uswds/img/correct8.svg +1 -0
- data/assets/uswds/img/correct9.png +0 -0
- data/assets/uswds/img/correct9.svg +1 -0
- data/assets/uswds/img/external-link-alt-hover.png +0 -0
- data/assets/uswds/img/external-link-alt-hover.svg +1 -0
- data/assets/uswds/img/external-link-alt.png +0 -0
- data/assets/uswds/img/external-link-alt.svg +1 -0
- data/assets/uswds/img/external-link-hover.png +0 -0
- data/assets/uswds/img/external-link-hover.svg +1 -0
- data/assets/uswds/img/external-link.png +0 -0
- data/assets/uswds/img/external-link.svg +1 -0
- data/assets/uswds/img/favicons/favicon-114.png +0 -0
- data/assets/uswds/img/favicons/favicon-144.png +0 -0
- data/assets/uswds/img/favicons/favicon-16.png +0 -0
- data/assets/uswds/img/favicons/favicon-192.png +0 -0
- data/assets/uswds/img/favicons/favicon-40.png +0 -0
- data/assets/uswds/img/favicons/favicon-57.png +0 -0
- data/assets/uswds/img/favicons/favicon-72.png +0 -0
- data/assets/uswds/img/favicons/favicon.ico +0 -0
- data/assets/uswds/img/favicons/favicon.png +0 -0
- data/assets/uswds/img/hero.png +0 -0
- data/assets/uswds/img/icon-dot-gov.svg +1 -0
- data/assets/uswds/img/icon-https.svg +1 -0
- data/assets/uswds/img/logo-img.png +0 -0
- data/assets/uswds/img/minus-alt.png +0 -0
- data/assets/uswds/img/minus-alt.svg +1 -0
- data/assets/uswds/img/minus.png +0 -0
- data/assets/uswds/img/minus.svg +1 -0
- data/assets/uswds/img/plus-alt.png +0 -0
- data/assets/uswds/img/plus-alt.svg +1 -0
- data/assets/uswds/img/plus.png +0 -0
- data/assets/uswds/img/plus.svg +1 -0
- data/assets/uswds/img/search-alt.png +0 -0
- data/assets/uswds/img/search-alt.svg +1 -0
- data/assets/uswds/img/search-primary.png +0 -0
- data/assets/uswds/img/search-primary.svg +12 -0
- data/assets/uswds/img/search.png +0 -0
- data/assets/uswds/img/search.svg +1 -0
- data/assets/uswds/img/social-icons/png/facebook25.png +0 -0
- data/assets/uswds/img/social-icons/png/rss25.png +0 -0
- data/assets/uswds/img/social-icons/png/twitter16.png +0 -0
- data/assets/uswds/img/social-icons/png/youtube15.png +0 -0
- data/assets/uswds/img/social-icons/svg/facebook25.svg +1 -0
- data/assets/uswds/img/social-icons/svg/rss25.svg +1 -0
- data/assets/uswds/img/social-icons/svg/twitter16.svg +1 -0
- data/assets/uswds/img/social-icons/svg/youtube15.svg +1 -0
- data/assets/uswds/img/us_flag_small.png +0 -0
- data/assets/uswds/js/uswds.js +1930 -0
- data/assets/uswds/js/uswds.min.js +2 -0
- data/assets/uswds/js/uswds.min.js.map +1 -0
- metadata +251 -3
@@ -0,0 +1,49 @@
|
|
1
|
+
@charset "UTF-8";
|
2
|
+
|
3
|
+
/// Returns a media context (media query / grid context) that can be stored in a variable and passed to `media()` as a single-keyword argument. Media contexts defined using `new-breakpoint` are used by the visual grid, as long as they are defined before importing Neat.
|
4
|
+
///
|
5
|
+
/// @param {List} $query
|
6
|
+
/// A list of media query features and values. Each `$feature` should have a corresponding `$value`.
|
7
|
+
///
|
8
|
+
/// If there is only a single `$value` in `$query`, `$default-feature` is going to be used.
|
9
|
+
///
|
10
|
+
/// The number of total columns in the grid can be set by passing `$columns` at the end of the list (overrides `$total-columns`). For a list of valid values for `$feature`, click [here](http://www.w3.org/TR/css3-mediaqueries/#media1).
|
11
|
+
///
|
12
|
+
/// @param {Number (unitless)} $total-columns [$grid-columns]
|
13
|
+
/// - Number of columns to use in the new grid context. Can be set as a shorthand in the first parameter.
|
14
|
+
///
|
15
|
+
/// @example scss - Usage
|
16
|
+
/// $mobile: new-breakpoint(max-width 480px 4);
|
17
|
+
///
|
18
|
+
/// .element {
|
19
|
+
/// @include media($mobile) {
|
20
|
+
/// @include span-columns(4);
|
21
|
+
/// }
|
22
|
+
/// }
|
23
|
+
///
|
24
|
+
/// @example css - CSS Output
|
25
|
+
/// @media screen and (max-width: 480px) {
|
26
|
+
/// .element {
|
27
|
+
/// display: block;
|
28
|
+
/// float: left;
|
29
|
+
/// margin-right: 7.42297%;
|
30
|
+
/// width: 100%;
|
31
|
+
/// }
|
32
|
+
/// .element:last-child {
|
33
|
+
/// margin-right: 0;
|
34
|
+
/// }
|
35
|
+
/// }
|
36
|
+
|
37
|
+
@function new-breakpoint($query: $feature $value $columns, $total-columns: $grid-columns) {
|
38
|
+
@if length($query) == 1 {
|
39
|
+
$query: $default-feature nth($query, 1) $total-columns;
|
40
|
+
} @else if is-even(length($query)) {
|
41
|
+
$query: append($query, $total-columns);
|
42
|
+
}
|
43
|
+
|
44
|
+
@if is-not(belongs-to($query, $visual-grid-breakpoints)) {
|
45
|
+
$visual-grid-breakpoints: append($visual-grid-breakpoints, $query, comma) !global;
|
46
|
+
}
|
47
|
+
|
48
|
+
@return $query;
|
49
|
+
}
|
@@ -0,0 +1,114 @@
|
|
1
|
+
// Not function for Libsass compatibility
|
2
|
+
// https://github.com/sass/libsass/issues/368
|
3
|
+
@function is-not($value) {
|
4
|
+
@return if($value, false, true);
|
5
|
+
}
|
6
|
+
|
7
|
+
// Checks if a number is even
|
8
|
+
@function is-even($int) {
|
9
|
+
@return $int % 2 == 0;
|
10
|
+
}
|
11
|
+
|
12
|
+
// Checks if an element belongs to a list or not
|
13
|
+
@function belongs-to($tested-item, $list) {
|
14
|
+
@return is-not(not-belongs-to($tested-item, $list));
|
15
|
+
}
|
16
|
+
|
17
|
+
@function not-belongs-to($tested-item, $list) {
|
18
|
+
@return is-not(index($list, $tested-item));
|
19
|
+
}
|
20
|
+
|
21
|
+
// Contains display value
|
22
|
+
@function contains-display-value($query) {
|
23
|
+
@return belongs-to(table, $query)
|
24
|
+
or belongs-to(block, $query)
|
25
|
+
or belongs-to(inline-block, $query)
|
26
|
+
or belongs-to(inline, $query);
|
27
|
+
}
|
28
|
+
|
29
|
+
// Parses the first argument of span-columns()
|
30
|
+
@function container-span($span: $span) {
|
31
|
+
@if length($span) == 3 {
|
32
|
+
$container-columns: nth($span, 3);
|
33
|
+
@return $container-columns;
|
34
|
+
} @else if length($span) == 2 {
|
35
|
+
$container-columns: nth($span, 2);
|
36
|
+
@return $container-columns;
|
37
|
+
}
|
38
|
+
|
39
|
+
@return $grid-columns;
|
40
|
+
}
|
41
|
+
|
42
|
+
@function container-shift($shift: $shift) {
|
43
|
+
$parent-columns: $grid-columns !default !global;
|
44
|
+
|
45
|
+
@if length($shift) == 3 {
|
46
|
+
$container-columns: nth($shift, 3);
|
47
|
+
@return $container-columns;
|
48
|
+
} @else if length($shift) == 2 {
|
49
|
+
$container-columns: nth($shift, 2);
|
50
|
+
@return $container-columns;
|
51
|
+
}
|
52
|
+
|
53
|
+
@return $parent-columns;
|
54
|
+
}
|
55
|
+
|
56
|
+
// Generates a striped background
|
57
|
+
@function gradient-stops($grid-columns, $color: $visual-grid-color) {
|
58
|
+
$transparent: transparent;
|
59
|
+
|
60
|
+
$column-width: flex-grid(1, $grid-columns);
|
61
|
+
$gutter-width: flex-gutter($grid-columns);
|
62
|
+
$column-offset: $column-width;
|
63
|
+
|
64
|
+
$values: ($transparent 0, $color 0);
|
65
|
+
|
66
|
+
@for $i from 1 to $grid-columns*2 {
|
67
|
+
@if is-even($i) {
|
68
|
+
$values: append($values, $transparent $column-offset, comma);
|
69
|
+
$values: append($values, $color $column-offset, comma);
|
70
|
+
$column-offset: $column-offset + $column-width;
|
71
|
+
} @else {
|
72
|
+
$values: append($values, $color $column-offset, comma);
|
73
|
+
$values: append($values, $transparent $column-offset, comma);
|
74
|
+
$column-offset: $column-offset + $gutter-width;
|
75
|
+
}
|
76
|
+
}
|
77
|
+
|
78
|
+
@return $values;
|
79
|
+
}
|
80
|
+
|
81
|
+
// Layout direction
|
82
|
+
@function get-direction($layout, $default) {
|
83
|
+
$direction: null;
|
84
|
+
|
85
|
+
@if to-upper-case($layout) == "LTR" or to-upper-case($layout) == "RTL" {
|
86
|
+
$direction: direction-from-layout($layout);
|
87
|
+
} @else {
|
88
|
+
$direction: direction-from-layout($default);
|
89
|
+
}
|
90
|
+
|
91
|
+
@return $direction;
|
92
|
+
}
|
93
|
+
|
94
|
+
@function direction-from-layout($layout) {
|
95
|
+
$direction: null;
|
96
|
+
|
97
|
+
@if to-upper-case($layout) == "LTR" {
|
98
|
+
$direction: right;
|
99
|
+
} @else {
|
100
|
+
$direction: left;
|
101
|
+
}
|
102
|
+
|
103
|
+
@return $direction;
|
104
|
+
}
|
105
|
+
|
106
|
+
@function get-opposite-direction($direction) {
|
107
|
+
$opposite-direction: left;
|
108
|
+
|
109
|
+
@if $direction == "left" {
|
110
|
+
$opposite-direction: right;
|
111
|
+
}
|
112
|
+
|
113
|
+
@return $opposite-direction;
|
114
|
+
}
|
@@ -0,0 +1,13 @@
|
|
1
|
+
// Convert pixels to ems
|
2
|
+
// eg. for a relational value of 12px write em(12) when the parent is 16px
|
3
|
+
// if the parent is another value say 24px write em(12, 24)
|
4
|
+
|
5
|
+
@function em($pxval, $base: $em-base) {
|
6
|
+
@if not unitless($pxval) {
|
7
|
+
$pxval: strip-units($pxval);
|
8
|
+
}
|
9
|
+
@if not unitless($base) {
|
10
|
+
$base: strip-units($base);
|
11
|
+
}
|
12
|
+
@return ($pxval / $base) * 1em;
|
13
|
+
}
|
@@ -0,0 +1,15 @@
|
|
1
|
+
// Convert pixels to rems
|
2
|
+
// eg. for a relational value of 12px write rem(12)
|
3
|
+
// Assumes $em-base is the font-size of <html>
|
4
|
+
|
5
|
+
@function rem($pxval) {
|
6
|
+
@if not unitless($pxval) {
|
7
|
+
$pxval: strip-units($pxval);
|
8
|
+
}
|
9
|
+
|
10
|
+
$base: $em-base;
|
11
|
+
@if not unitless($base) {
|
12
|
+
$base: strip-units($base);
|
13
|
+
}
|
14
|
+
@return ($pxval / $base) * 1rem;
|
15
|
+
}
|
@@ -0,0 +1,24 @@
|
|
1
|
+
@charset "UTF-8";
|
2
|
+
|
3
|
+
/// Mixes a color with black.
|
4
|
+
///
|
5
|
+
/// @param {Color} $color
|
6
|
+
///
|
7
|
+
/// @param {Number (Percentage)} $percent
|
8
|
+
/// The amount of black to be mixed in.
|
9
|
+
///
|
10
|
+
/// @example scss - Usage
|
11
|
+
/// .element {
|
12
|
+
/// background-color: shade(#ffbb52, 60%);
|
13
|
+
/// }
|
14
|
+
///
|
15
|
+
/// @example css - CSS Output
|
16
|
+
/// .element {
|
17
|
+
/// background-color: #664a20;
|
18
|
+
/// }
|
19
|
+
///
|
20
|
+
/// @return {Color}
|
21
|
+
|
22
|
+
@function shade($color, $percent) {
|
23
|
+
@return mix(#000, $color, $percent);
|
24
|
+
}
|
@@ -0,0 +1,17 @@
|
|
1
|
+
@charset "UTF-8";
|
2
|
+
|
3
|
+
/// Strips the unit from a number.
|
4
|
+
///
|
5
|
+
/// @param {Number (With Unit)} $value
|
6
|
+
///
|
7
|
+
/// @example scss - Usage
|
8
|
+
/// $dimension: strip-units(10em);
|
9
|
+
///
|
10
|
+
/// @example css - CSS Output
|
11
|
+
/// $dimension: 10;
|
12
|
+
///
|
13
|
+
/// @return {Number (Unitless)}
|
14
|
+
|
15
|
+
@function strip-units($value) {
|
16
|
+
@return ($value / ($value * 0 + 1));
|
17
|
+
}
|
@@ -0,0 +1,24 @@
|
|
1
|
+
@charset "UTF-8";
|
2
|
+
|
3
|
+
/// Mixes a color with white.
|
4
|
+
///
|
5
|
+
/// @param {Color} $color
|
6
|
+
///
|
7
|
+
/// @param {Number (Percentage)} $percent
|
8
|
+
/// The amount of white to be mixed in.
|
9
|
+
///
|
10
|
+
/// @example scss - Usage
|
11
|
+
/// .element {
|
12
|
+
/// background-color: tint(#6ecaa6, 40%);
|
13
|
+
/// }
|
14
|
+
///
|
15
|
+
/// @example css - CSS Output
|
16
|
+
/// .element {
|
17
|
+
/// background-color: #a8dfc9;
|
18
|
+
/// }
|
19
|
+
///
|
20
|
+
/// @return {Color}
|
21
|
+
|
22
|
+
@function tint($color, $percent) {
|
23
|
+
@return mix(#fff, $color, $percent);
|
24
|
+
}
|
@@ -0,0 +1,22 @@
|
|
1
|
+
// Return vendor-prefixed property names if appropriate
|
2
|
+
// Example: transition-property-names((transform, color, background), moz) -> -moz-transform, color, background
|
3
|
+
//************************************************************************//
|
4
|
+
@function transition-property-names($props, $vendor: false) {
|
5
|
+
$new-props: ();
|
6
|
+
|
7
|
+
@each $prop in $props {
|
8
|
+
$new-props: append($new-props, transition-property-name($prop, $vendor), comma);
|
9
|
+
}
|
10
|
+
|
11
|
+
@return $new-props;
|
12
|
+
}
|
13
|
+
|
14
|
+
@function transition-property-name($prop, $vendor: false) {
|
15
|
+
// put other properties that need to be prefixed here aswell
|
16
|
+
@if $vendor and $prop == transform {
|
17
|
+
@return unquote('-'+$vendor+'-'+$prop);
|
18
|
+
}
|
19
|
+
@else {
|
20
|
+
@return $prop;
|
21
|
+
}
|
22
|
+
}
|
@@ -0,0 +1,27 @@
|
|
1
|
+
@charset "UTF-8";
|
2
|
+
|
3
|
+
/// Converts shorthand to the 4-value syntax.
|
4
|
+
///
|
5
|
+
/// @param {List} $shorthand
|
6
|
+
///
|
7
|
+
/// @example scss - Usage
|
8
|
+
/// .element {
|
9
|
+
/// margin: unpack(1em 2em);
|
10
|
+
/// }
|
11
|
+
///
|
12
|
+
/// @example css - CSS Output
|
13
|
+
/// .element {
|
14
|
+
/// margin: 1em 2em 1em 2em;
|
15
|
+
/// }
|
16
|
+
|
17
|
+
@function unpack($shorthand) {
|
18
|
+
@if length($shorthand) == 1 {
|
19
|
+
@return nth($shorthand, 1) nth($shorthand, 1) nth($shorthand, 1) nth($shorthand, 1);
|
20
|
+
} @else if length($shorthand) == 2 {
|
21
|
+
@return nth($shorthand, 1) nth($shorthand, 2) nth($shorthand, 1) nth($shorthand, 2);
|
22
|
+
} @else if length($shorthand) == 3 {
|
23
|
+
@return nth($shorthand, 1) nth($shorthand, 2) nth($shorthand, 3) nth($shorthand, 2);
|
24
|
+
} @else {
|
25
|
+
@return $shorthand;
|
26
|
+
}
|
27
|
+
}
|
@@ -0,0 +1,33 @@
|
|
1
|
+
@charset "UTF-8";
|
2
|
+
|
3
|
+
/// Changes the direction property used by other mixins called in the code block argument.
|
4
|
+
///
|
5
|
+
/// @param {String} $direction [left-to-right]
|
6
|
+
/// Layout direction to be used within the block. Can be `left-to-right` or `right-to-left`.
|
7
|
+
///
|
8
|
+
/// @example scss - Usage
|
9
|
+
/// @include direction-context(right-to-left) {
|
10
|
+
/// .right-to-left-block {
|
11
|
+
/// @include span-columns(6);
|
12
|
+
/// }
|
13
|
+
/// }
|
14
|
+
///
|
15
|
+
/// @example css - CSS Output
|
16
|
+
/// .right-to-left-block {
|
17
|
+
/// float: right;
|
18
|
+
/// ...
|
19
|
+
/// }
|
20
|
+
|
21
|
+
@mixin direction-context($direction: left-to-right) {
|
22
|
+
$scope-direction: $layout-direction;
|
23
|
+
|
24
|
+
@if to-lower-case($direction) == "left-to-right" {
|
25
|
+
$layout-direction: LTR !global;
|
26
|
+
} @else if to-lower-case($direction) == "right-to-left" {
|
27
|
+
$layout-direction: RTL !global;
|
28
|
+
}
|
29
|
+
|
30
|
+
@content;
|
31
|
+
|
32
|
+
$layout-direction: $scope-direction !global;
|
33
|
+
}
|
@@ -0,0 +1,28 @@
|
|
1
|
+
@charset "UTF-8";
|
2
|
+
|
3
|
+
/// Changes the display property used by other mixins called in the code block argument.
|
4
|
+
///
|
5
|
+
/// @param {String} $display [block]
|
6
|
+
/// Display value to be used within the block. Can be `table` or `block`.
|
7
|
+
///
|
8
|
+
/// @example scss
|
9
|
+
/// @include display-context(table) {
|
10
|
+
/// .display-table {
|
11
|
+
/// @include span-columns(6);
|
12
|
+
/// }
|
13
|
+
/// }
|
14
|
+
///
|
15
|
+
/// @example css
|
16
|
+
/// .display-table {
|
17
|
+
/// display: table-cell;
|
18
|
+
/// ...
|
19
|
+
/// }
|
20
|
+
|
21
|
+
@mixin display-context($display: block) {
|
22
|
+
$scope-display: $container-display-table;
|
23
|
+
$container-display-table: $display == table !global;
|
24
|
+
|
25
|
+
@content;
|
26
|
+
|
27
|
+
$container-display-table: $scope-display !global;
|
28
|
+
}
|
@@ -0,0 +1,22 @@
|
|
1
|
+
@charset "UTF-8";
|
2
|
+
|
3
|
+
/// Forces the element to fill its parent container.
|
4
|
+
///
|
5
|
+
/// @example scss - Usage
|
6
|
+
/// .element {
|
7
|
+
/// @include fill-parent;
|
8
|
+
/// }
|
9
|
+
///
|
10
|
+
/// @example css - CSS Output
|
11
|
+
/// .element {
|
12
|
+
/// width: 100%;
|
13
|
+
/// box-sizing: border-box;
|
14
|
+
/// }
|
15
|
+
|
16
|
+
@mixin fill-parent() {
|
17
|
+
width: 100%;
|
18
|
+
|
19
|
+
@if $border-box-sizing == false {
|
20
|
+
box-sizing: border-box;
|
21
|
+
}
|
22
|
+
}
|
@@ -0,0 +1,92 @@
|
|
1
|
+
@charset "UTF-8";
|
2
|
+
|
3
|
+
/// Outputs a media-query block with an optional grid context (the total number of columns used in the grid).
|
4
|
+
///
|
5
|
+
/// @param {List} $query
|
6
|
+
/// A list of media query features and values, where each `$feature` should have a corresponding `$value`.
|
7
|
+
/// For a list of valid values for `$feature`, click [here](http://www.w3.org/TR/css3-mediaqueries/#media1).
|
8
|
+
///
|
9
|
+
/// If there is only a single `$value` in `$query`, `$default-feature` is going to be used.
|
10
|
+
///
|
11
|
+
/// The number of total columns in the grid can be set by passing `$columns` at the end of the list (overrides `$total-columns`).
|
12
|
+
///
|
13
|
+
///
|
14
|
+
/// @param {Number (unitless)} $total-columns [$grid-columns]
|
15
|
+
/// - Number of columns to use in the new grid context. Can be set as a shorthand in the first parameter.
|
16
|
+
///
|
17
|
+
/// @example scss - Usage
|
18
|
+
/// .responsive-element {
|
19
|
+
/// @include media(769px) {
|
20
|
+
/// @include span-columns(6);
|
21
|
+
/// }
|
22
|
+
/// }
|
23
|
+
///
|
24
|
+
/// .new-context-element {
|
25
|
+
/// @include media(min-width 320px max-width 480px, 6) {
|
26
|
+
/// @include span-columns(6);
|
27
|
+
/// }
|
28
|
+
/// }
|
29
|
+
///
|
30
|
+
/// @example css - CSS Output
|
31
|
+
/// @media screen and (min-width: 769px) {
|
32
|
+
/// .responsive-element {
|
33
|
+
/// display: block;
|
34
|
+
/// float: left;
|
35
|
+
/// margin-right: 2.35765%;
|
36
|
+
/// width: 48.82117%;
|
37
|
+
/// }
|
38
|
+
///
|
39
|
+
/// .responsive-element:last-child {
|
40
|
+
/// margin-right: 0;
|
41
|
+
/// }
|
42
|
+
/// }
|
43
|
+
///
|
44
|
+
/// @media screen and (min-width: 320px) and (max-width: 480px) {
|
45
|
+
/// .new-context-element {
|
46
|
+
/// display: block;
|
47
|
+
/// float: left;
|
48
|
+
/// margin-right: 4.82916%;
|
49
|
+
/// width: 100%;
|
50
|
+
/// }
|
51
|
+
///
|
52
|
+
/// .new-context-element:last-child {
|
53
|
+
/// margin-right: 0;
|
54
|
+
/// }
|
55
|
+
/// }
|
56
|
+
|
57
|
+
@mixin media($query: $feature $value $columns, $total-columns: $grid-columns) {
|
58
|
+
@if length($query) == 1 {
|
59
|
+
@media screen and ($default-feature: nth($query, 1)) {
|
60
|
+
$default-grid-columns: $grid-columns;
|
61
|
+
$grid-columns: $total-columns !global;
|
62
|
+
@content;
|
63
|
+
$grid-columns: $default-grid-columns !global;
|
64
|
+
}
|
65
|
+
} @else {
|
66
|
+
$loop-to: length($query);
|
67
|
+
$media-query: "screen and ";
|
68
|
+
$default-grid-columns: $grid-columns;
|
69
|
+
$grid-columns: $total-columns !global;
|
70
|
+
|
71
|
+
@if is-not(is-even(length($query))) {
|
72
|
+
$grid-columns: nth($query, $loop-to) !global;
|
73
|
+
$loop-to: $loop-to - 1;
|
74
|
+
}
|
75
|
+
|
76
|
+
$i: 1;
|
77
|
+
@while $i <= $loop-to {
|
78
|
+
$media-query: $media-query + "(" + nth($query, $i) + ": " + nth($query, $i + 1) + ") ";
|
79
|
+
|
80
|
+
@if ($i + 1) != $loop-to {
|
81
|
+
$media-query: $media-query + "and ";
|
82
|
+
}
|
83
|
+
|
84
|
+
$i: $i + 2;
|
85
|
+
}
|
86
|
+
|
87
|
+
@media #{$media-query} {
|
88
|
+
@content;
|
89
|
+
$grid-columns: $default-grid-columns !global;
|
90
|
+
}
|
91
|
+
}
|
92
|
+
}
|