nesta-contentfocus-extensions 0.0.1 → 0.0.2
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/Gemfile.lock +53 -0
- data/Rakefile +1 -2
- data/assets/stylesheets/bitters/_base.scss +24 -0
- data/assets/stylesheets/bitters/_buttons.scss +10 -0
- data/assets/stylesheets/bitters/_forms.scss +78 -0
- data/assets/stylesheets/bitters/_grid-settings.scss +14 -0
- data/assets/stylesheets/bitters/_lists.scss +31 -0
- data/assets/stylesheets/bitters/_tables.scss +24 -0
- data/assets/stylesheets/bitters/_typography.scss +93 -0
- data/assets/stylesheets/bitters/_variables.scss +65 -0
- data/assets/stylesheets/bitters/extends/_button.scss +22 -0
- data/assets/stylesheets/bitters/extends/_clearfix.scss +3 -0
- data/assets/stylesheets/bitters/extends/_errors.scss +11 -0
- data/assets/stylesheets/bitters/extends/_flashes.scss +38 -0
- data/assets/stylesheets/bitters/extends/_hide-text.scss +3 -0
- data/assets/stylesheets/bourbon/_bourbon-deprecated-upcoming.scss +411 -0
- data/assets/stylesheets/bourbon/_bourbon.scss +87 -0
- data/assets/stylesheets/bourbon/addons/_border-color.scss +26 -0
- data/assets/stylesheets/bourbon/addons/_border-radius.scss +48 -0
- data/assets/stylesheets/bourbon/addons/_border-style.scss +25 -0
- data/assets/stylesheets/bourbon/addons/_border-width.scss +25 -0
- data/assets/stylesheets/bourbon/addons/_buttons.scss +64 -0
- data/assets/stylesheets/bourbon/addons/_clearfix.scss +25 -0
- data/assets/stylesheets/bourbon/addons/_ellipsis.scss +30 -0
- data/assets/stylesheets/bourbon/addons/_font-stacks.scss +31 -0
- data/assets/stylesheets/bourbon/addons/_hide-text.scss +27 -0
- data/assets/stylesheets/bourbon/addons/_margin.scss +26 -0
- data/assets/stylesheets/bourbon/addons/_padding.scss +26 -0
- data/assets/stylesheets/bourbon/addons/_position.scss +48 -0
- data/assets/stylesheets/bourbon/addons/_prefixer.scss +66 -0
- data/assets/stylesheets/bourbon/addons/_retina-image.scss +25 -0
- data/assets/stylesheets/bourbon/addons/_size.scss +51 -0
- data/assets/stylesheets/bourbon/addons/_text-inputs.scss +112 -0
- data/assets/stylesheets/bourbon/addons/_timing-functions.scss +34 -0
- data/assets/stylesheets/bourbon/addons/_triangle.scss +63 -0
- data/assets/stylesheets/bourbon/addons/_word-wrap.scss +29 -0
- data/assets/stylesheets/bourbon/css3/_animation.scss +43 -0
- data/assets/stylesheets/bourbon/css3/_appearance.scss +3 -0
- data/assets/stylesheets/bourbon/css3/_backface-visibility.scss +3 -0
- data/assets/stylesheets/bourbon/css3/_background-image.scss +42 -0
- data/assets/stylesheets/bourbon/css3/_background.scss +55 -0
- data/assets/stylesheets/bourbon/css3/_border-image.scss +59 -0
- data/assets/stylesheets/bourbon/css3/_calc.scss +4 -0
- data/assets/stylesheets/bourbon/css3/_columns.scss +47 -0
- data/assets/stylesheets/bourbon/css3/_filter.scss +4 -0
- data/assets/stylesheets/bourbon/css3/_flex-box.scss +287 -0
- data/assets/stylesheets/bourbon/css3/_font-face.scss +24 -0
- data/assets/stylesheets/bourbon/css3/_font-feature-settings.scss +4 -0
- data/assets/stylesheets/bourbon/css3/_hidpi-media-query.scss +10 -0
- data/assets/stylesheets/bourbon/css3/_hyphens.scss +4 -0
- data/assets/stylesheets/bourbon/css3/_image-rendering.scss +14 -0
- data/assets/stylesheets/bourbon/css3/_keyframes.scss +36 -0
- data/assets/stylesheets/bourbon/css3/_linear-gradient.scss +38 -0
- data/assets/stylesheets/bourbon/css3/_perspective.scss +8 -0
- data/assets/stylesheets/bourbon/css3/_placeholder.scss +8 -0
- data/assets/stylesheets/bourbon/css3/_radial-gradient.scss +39 -0
- data/assets/stylesheets/bourbon/css3/_selection.scss +42 -0
- data/assets/stylesheets/bourbon/css3/_text-decoration.scss +19 -0
- data/assets/stylesheets/bourbon/css3/_transform.scss +15 -0
- data/assets/stylesheets/bourbon/css3/_transition.scss +71 -0
- data/assets/stylesheets/bourbon/css3/_user-select.scss +3 -0
- data/assets/stylesheets/bourbon/functions/_assign-inputs.scss +11 -0
- data/assets/stylesheets/bourbon/functions/_contains-falsy.scss +20 -0
- data/assets/stylesheets/bourbon/functions/_contains.scss +26 -0
- data/assets/stylesheets/bourbon/functions/_is-length.scss +11 -0
- data/assets/stylesheets/bourbon/functions/_is-light.scss +21 -0
- data/assets/stylesheets/bourbon/functions/_is-number.scss +11 -0
- data/assets/stylesheets/bourbon/functions/_is-size.scss +13 -0
- data/assets/stylesheets/bourbon/functions/_modular-scale.scss +69 -0
- data/assets/stylesheets/bourbon/functions/_px-to-em.scss +13 -0
- data/assets/stylesheets/bourbon/functions/_px-to-rem.scss +15 -0
- data/assets/stylesheets/bourbon/functions/_shade.scss +24 -0
- data/assets/stylesheets/bourbon/functions/_strip-units.scss +17 -0
- data/assets/stylesheets/bourbon/functions/_tint.scss +24 -0
- data/assets/stylesheets/bourbon/functions/_transition-property-name.scss +22 -0
- data/assets/stylesheets/bourbon/functions/_unpack.scss +27 -0
- data/assets/stylesheets/bourbon/helpers/_convert-units.scss +21 -0
- data/assets/stylesheets/bourbon/helpers/_directional-values.scss +96 -0
- data/assets/stylesheets/bourbon/helpers/_font-source-declaration.scss +43 -0
- data/assets/stylesheets/bourbon/helpers/_gradient-positions-parser.scss +13 -0
- data/assets/stylesheets/bourbon/helpers/_linear-angle-parser.scss +25 -0
- data/assets/stylesheets/bourbon/helpers/_linear-gradient-parser.scss +41 -0
- data/assets/stylesheets/bourbon/helpers/_linear-positions-parser.scss +61 -0
- data/assets/stylesheets/bourbon/helpers/_linear-side-corner-parser.scss +31 -0
- data/assets/stylesheets/bourbon/helpers/_radial-arg-parser.scss +69 -0
- data/assets/stylesheets/bourbon/helpers/_radial-gradient-parser.scss +50 -0
- data/assets/stylesheets/bourbon/helpers/_radial-positions-parser.scss +18 -0
- data/assets/stylesheets/bourbon/helpers/_render-gradients.scss +26 -0
- data/assets/stylesheets/bourbon/helpers/_shape-size-stripper.scss +10 -0
- data/assets/stylesheets/bourbon/helpers/_str-to-num.scss +50 -0
- data/assets/stylesheets/bourbon/settings/_asset-pipeline.scss +7 -0
- data/assets/stylesheets/bourbon/settings/_prefixer.scss +9 -0
- data/assets/stylesheets/bourbon/settings/_px-to-em.scss +1 -0
- data/assets/stylesheets/contentfocus/_animations.scss +9 -0
- data/assets/stylesheets/contentfocus/_breadcrumb.scss +83 -0
- data/assets/stylesheets/contentfocus/_browser.scss +146 -0
- data/assets/stylesheets/contentfocus/_bullets.scss +63 -0
- data/assets/stylesheets/contentfocus/_comments.scss +59 -0
- data/assets/stylesheets/contentfocus/_device.scss +84 -0
- data/assets/stylesheets/contentfocus/_flashes.scss +30 -0
- data/assets/stylesheets/contentfocus/_footer.scss +78 -0
- data/assets/stylesheets/contentfocus/_forms.scss +110 -0
- data/assets/stylesheets/contentfocus/_geometric_typography.scss +104 -0
- data/assets/stylesheets/contentfocus/_hero.scss +108 -0
- data/assets/stylesheets/contentfocus/_hover_tile.scss +51 -0
- data/assets/stylesheets/contentfocus/_nav.scss +396 -0
- data/assets/stylesheets/contentfocus/_progress_bar.scss +92 -0
- data/assets/stylesheets/contentfocus/_variables.scss +84 -0
- data/assets/stylesheets/neat/_neat-helpers.scss +8 -0
- data/assets/stylesheets/neat/_neat.scss +23 -0
- data/assets/stylesheets/neat/functions/_new-breakpoint.scss +49 -0
- data/assets/stylesheets/neat/functions/_private.scss +114 -0
- data/assets/stylesheets/neat/grid/_box-sizing.scss +15 -0
- data/assets/stylesheets/neat/grid/_direction-context.scss +33 -0
- data/assets/stylesheets/neat/grid/_display-context.scss +28 -0
- data/assets/stylesheets/neat/grid/_fill-parent.scss +22 -0
- data/assets/stylesheets/neat/grid/_media.scss +92 -0
- data/assets/stylesheets/neat/grid/_omega.scss +87 -0
- data/assets/stylesheets/neat/grid/_outer-container.scss +38 -0
- data/assets/stylesheets/neat/grid/_pad.scss +25 -0
- data/assets/stylesheets/neat/grid/_private.scss +35 -0
- data/assets/stylesheets/neat/grid/_row.scss +52 -0
- data/assets/stylesheets/neat/grid/_shift.scss +50 -0
- data/assets/stylesheets/neat/grid/_span-columns.scss +94 -0
- data/assets/stylesheets/neat/grid/_to-deprecate.scss +97 -0
- data/assets/stylesheets/neat/grid/_visual-grid.scss +42 -0
- data/assets/stylesheets/neat/settings/_disable-warnings.scss +13 -0
- data/assets/stylesheets/neat/settings/_grid.scss +51 -0
- data/assets/stylesheets/neat/settings/_visual-grid.scss +27 -0
- data/lib/nesta-contentfocus-extensions.rb +14 -4
- data/lib/nesta-contentfocus-extensions/app.rb +8 -0
- data/lib/nesta-contentfocus-extensions/helpers.rb +21 -0
- data/lib/nesta-contentfocus-extensions/kramdown.rb +91 -0
- data/lib/nesta-contentfocus-extensions/menu.rb +4 -1
- data/lib/nesta-contentfocus-extensions/overrides.rb +17 -0
- data/lib/nesta-contentfocus-extensions/page.rb +29 -54
- data/lib/nesta-contentfocus-extensions/path.rb +13 -7
- data/lib/nesta-contentfocus-extensions/paths.rb +52 -0
- data/lib/nesta-contentfocus-extensions/renderer.rb +46 -0
- data/lib/nesta-contentfocus-extensions/routes.rb +15 -0
- data/lib/nesta-contentfocus-extensions/theme.rb +36 -0
- data/lib/nesta-contentfocus-extensions/version.rb +1 -1
- data/nesta-contentfocus-extensions.gemspec +14 -11
- metadata +184 -6
@@ -0,0 +1,92 @@
|
|
1
|
+
.progress-bar {
|
2
|
+
///////////////////////////////////////////////////////////////////////////////////
|
3
|
+
$base-border-color: gainsboro !default;
|
4
|
+
$base-background-color: white !default;
|
5
|
+
$base-border-radius: 3px !default;
|
6
|
+
$base-accent-color: #477DCA !default;
|
7
|
+
$base-link-color: $base-accent-color !default;
|
8
|
+
//////////////////////////////////////////////////////////////////////////////////
|
9
|
+
|
10
|
+
$progress-border-color: $base-border-color !default;
|
11
|
+
$progress-border: 1px solid $progress-border-color;
|
12
|
+
$progress-meter-border-color: $base-accent-color !default;
|
13
|
+
$progress-meter-border: 1px solid darken($progress-meter-border-color, 15%);
|
14
|
+
$progress-meter-color: $progress-meter-border-color;
|
15
|
+
$progress-background: darken($base-background-color, 5) !default;
|
16
|
+
$progress-animation-duration: 0.7s;
|
17
|
+
$progress-height: 30px;
|
18
|
+
|
19
|
+
background-color: $progress-background;
|
20
|
+
border: $progress-border;
|
21
|
+
box-shadow: inset 0 0 3px 0 rgba(darken($progress-background, 50%), 0.15);
|
22
|
+
border-radius: $base-border-radius;
|
23
|
+
height: $progress-height;
|
24
|
+
margin: 0 auto;
|
25
|
+
padding: 2px;
|
26
|
+
width: 100%;
|
27
|
+
|
28
|
+
> span.meter {
|
29
|
+
@include animation(progress $progress-animation-duration linear infinite);
|
30
|
+
@include box-sizing(border-box);
|
31
|
+
background-color: $progress-meter-color;
|
32
|
+
@include background-image(linear-gradient(-45deg, rgba(255,255,255, 0.15) 25%,
|
33
|
+
transparent 25%,
|
34
|
+
transparent 50%,
|
35
|
+
rgba(255,255,255, 0.15) 50%,
|
36
|
+
rgba(255,255,255, 0.15) 75%,
|
37
|
+
transparent 75%));
|
38
|
+
background-size: 40px 40px;
|
39
|
+
background-repeat: repeat-x;
|
40
|
+
border: $progress-meter-border;
|
41
|
+
border-radius: $base-border-radius / 1.5;
|
42
|
+
display: block;
|
43
|
+
height: 100%;
|
44
|
+
width: 0%;
|
45
|
+
}
|
46
|
+
}
|
47
|
+
|
48
|
+
@-webkit-keyframes progress {
|
49
|
+
0% {
|
50
|
+
background-position: 0px 0px;
|
51
|
+
}
|
52
|
+
100% {
|
53
|
+
background-position: 40px 0px;
|
54
|
+
}
|
55
|
+
}
|
56
|
+
|
57
|
+
@-moz-keyframes progress {
|
58
|
+
0% {
|
59
|
+
background-position: 0px 0px;
|
60
|
+
}
|
61
|
+
100% {
|
62
|
+
background-position: 40px 0px;
|
63
|
+
}
|
64
|
+
}
|
65
|
+
|
66
|
+
@-ms-keyframes progress {
|
67
|
+
0% {
|
68
|
+
background-position: 0px 0px;
|
69
|
+
}
|
70
|
+
100% {
|
71
|
+
background-position: 40px 0px;
|
72
|
+
}
|
73
|
+
}
|
74
|
+
|
75
|
+
@-o-keyframes progress {
|
76
|
+
0% {
|
77
|
+
background-position: 0px 0px;
|
78
|
+
}
|
79
|
+
100% {
|
80
|
+
background-position: 40px 0px;
|
81
|
+
}
|
82
|
+
}
|
83
|
+
|
84
|
+
@keyframes progress {
|
85
|
+
0% {
|
86
|
+
background-position: 0px 0px;
|
87
|
+
}
|
88
|
+
100% {
|
89
|
+
background-position: 40px 0px;
|
90
|
+
}
|
91
|
+
}
|
92
|
+
|
@@ -0,0 +1,84 @@
|
|
1
|
+
@import "neat-helpers";
|
2
|
+
|
3
|
+
// Typography
|
4
|
+
$base-font-family: freight-text-pro, Merriweather, Georgia, Cambria, 'Times New Roman', Times, serif;
|
5
|
+
$heading-font-family: jaf-bernino-sans, 'Open Sans' 'Lucida Grande', 'Lucida Sans Unicode', 'Lucida Sans', Geneva, Verdana, sans-serif;
|
6
|
+
$navigation-font-family: ff-meta-web-pro, $heading-font-family;
|
7
|
+
|
8
|
+
// Font sizes
|
9
|
+
$base-font-size: 22px;
|
10
|
+
$heading-font-size: $base-font-size * 1.64;
|
11
|
+
|
12
|
+
// Line height
|
13
|
+
$base-line-height: $base-font-size * 1.5;
|
14
|
+
$heading-line-height: $heading-font-size * 1.15;
|
15
|
+
|
16
|
+
// Other typesetting hints
|
17
|
+
$heading-letter-spacing: -2px*(23/32);
|
18
|
+
|
19
|
+
// Other sizes
|
20
|
+
$base-spacing: $base-line-height;
|
21
|
+
$small-spacing: $base-spacing / 2;
|
22
|
+
$base-z-index: 0;
|
23
|
+
|
24
|
+
// Colors
|
25
|
+
$success-color: #c1fca9;
|
26
|
+
$notice-color: #a7d4f9;
|
27
|
+
$error-color: #ffabb6;
|
28
|
+
$alert-color: #ffe7ab;
|
29
|
+
$base-accent-color: #262626;
|
30
|
+
$action-color: #5cd02e;
|
31
|
+
$base-button-color: $action-color;
|
32
|
+
$hover-button-color: lighten($base-button-color, 10%);
|
33
|
+
|
34
|
+
// Font colors
|
35
|
+
$base-font-color: rgba(0, 0, 0, 0.8);
|
36
|
+
$link-color: rgb(77, 204, 75);
|
37
|
+
|
38
|
+
// Borders
|
39
|
+
$base-border-radius: 5px;
|
40
|
+
$base-border-color: lighten($base-font-color, 75%);
|
41
|
+
$base-border: 1px solid $base-border-color;
|
42
|
+
|
43
|
+
// Background colors
|
44
|
+
$base-background-color: #fafafa;
|
45
|
+
$secondary-background-color: tint($base-background-color, 75%);
|
46
|
+
|
47
|
+
// Containers
|
48
|
+
$max-width: 100%;
|
49
|
+
|
50
|
+
// Screens
|
51
|
+
$medium-screen: 600px;
|
52
|
+
$large-screen: 900px;
|
53
|
+
$medium-screen-up: new-breakpoint(min-width $medium-screen 4);
|
54
|
+
$large-screen-up: new-breakpoint(min-width $large-screen 8);
|
55
|
+
|
56
|
+
// Forms
|
57
|
+
$form-font-family: $base-font-family;
|
58
|
+
$form-font-size: $base-font-size;
|
59
|
+
$form-border-radius: $base-border-radius;
|
60
|
+
$form-border-color: $base-border-color;
|
61
|
+
$form-border-color-hover: darken($form-border-color, 10);
|
62
|
+
$form-border-color-focus: adjust-color($action-color, $lightness: -5%);
|
63
|
+
$form-box-shadow: inset 0 1px rgba(#000, 0.06);
|
64
|
+
$form-box-shadow-focus: $form-box-shadow, 0 0 5px adjust-color($action-color, $lightness: -5%, $alpha: -0.3);
|
65
|
+
|
66
|
+
// Animations
|
67
|
+
$base-duration: 150ms;
|
68
|
+
$base-timing: ease;
|
69
|
+
|
70
|
+
// Navigation
|
71
|
+
$navigation-background-color: #262626;
|
72
|
+
$navigation-color: rgba(255,255,255,0.7);
|
73
|
+
|
74
|
+
// Hero
|
75
|
+
$hero-color: $base-font-color;
|
76
|
+
$hero-base-background-color: #fff;
|
77
|
+
|
78
|
+
// Progress bar
|
79
|
+
$progress-background-color: #9de381;
|
80
|
+
$progress-border-color: #62cf33;
|
81
|
+
$progress-meter-border-color: darken($progress-background-color, 20%);
|
82
|
+
$progress-meter-border: 1px solid darken($progress-meter-border-color, 15%);
|
83
|
+
$progress-meter-color: $progress-meter-border-color;
|
84
|
+
$progress-background: lighten($progress-background-color, 20%);
|
@@ -0,0 +1,23 @@
|
|
1
|
+
// Neat 1.7.2
|
2
|
+
// http://neat.bourbon.io
|
3
|
+
// Copyright 2012-2015 thoughtbot, inc.
|
4
|
+
// MIT License
|
5
|
+
|
6
|
+
// Helpers
|
7
|
+
@import "neat-helpers";
|
8
|
+
|
9
|
+
// Grid
|
10
|
+
@import "grid/private";
|
11
|
+
@import "grid/box-sizing";
|
12
|
+
@import "grid/omega";
|
13
|
+
@import "grid/outer-container";
|
14
|
+
@import "grid/span-columns";
|
15
|
+
@import "grid/row";
|
16
|
+
@import "grid/shift";
|
17
|
+
@import "grid/pad";
|
18
|
+
@import "grid/fill-parent";
|
19
|
+
@import "grid/media";
|
20
|
+
@import "grid/to-deprecate";
|
21
|
+
@import "grid/visual-grid";
|
22
|
+
@import "grid/display-context";
|
23
|
+
@import "grid/direction-context";
|
@@ -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,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
|
+
}
|