dendron-jekyll 0.3.2
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +7 -0
- data/LICENSE.txt +21 -0
- data/README.md +68 -0
- data/Rakefile +1 -0
- data/_includes/active.html +8 -0
- data/_includes/archive-single.html +33 -0
- data/_includes/crumbs.html +15 -0
- data/_includes/css/custom.scss.liquid +1 -0
- data/_includes/css/just-the-docs.scss.liquid +7 -0
- data/_includes/documents-collection.html +25 -0
- data/_includes/figure +9 -0
- data/_includes/head.html +40 -0
- data/_includes/head_custom.html +0 -0
- data/_includes/js/custom.js +0 -0
- data/_includes/nav.html +37 -0
- data/_includes/sidebar.html +19 -0
- data/_includes/title.html +5 -0
- data/_includes/toc +7 -0
- data/_includes/toc-mm.html +96 -0
- data/_includes/toc.html +16 -0
- data/_includes/vendor/anchor_headings.html +100 -0
- data/_layouts/about.html +5 -0
- data/_layouts/archive.html +30 -0
- data/_layouts/default.html +160 -0
- data/_layouts/home.html +5 -0
- data/_layouts/page.html +5 -0
- data/_layouts/post.html +5 -0
- data/_layouts/single.html +97 -0
- data/_layouts/table_wrappers.html +7 -0
- data/_layouts/vendor/compress.html +10 -0
- data/_sass/base.scss +108 -0
- data/_sass/buttons.scss +118 -0
- data/_sass/code.scss +261 -0
- data/_sass/color_schemes/dark.scss +17 -0
- data/_sass/color_schemes/light.scss +0 -0
- data/_sass/content.scss +196 -0
- data/_sass/custom/custom.scss +0 -0
- data/_sass/labels.scss +37 -0
- data/_sass/layout.scss +205 -0
- data/_sass/minimal-mistakes/_animations.scss +21 -0
- data/_sass/minimal-mistakes/_archive.scss +455 -0
- data/_sass/minimal-mistakes/_base.scss +357 -0
- data/_sass/minimal-mistakes/_buttons.scss +97 -0
- data/_sass/minimal-mistakes/_footer.scss +86 -0
- data/_sass/minimal-mistakes/_forms.scss +393 -0
- data/_sass/minimal-mistakes/_masthead.scss +93 -0
- data/_sass/minimal-mistakes/_mixins.scss +92 -0
- data/_sass/minimal-mistakes/_navigation.scss +566 -0
- data/_sass/minimal-mistakes/_notices.scss +105 -0
- data/_sass/minimal-mistakes/_page.scss +553 -0
- data/_sass/minimal-mistakes/_print.scss +252 -0
- data/_sass/minimal-mistakes/_reset.scss +187 -0
- data/_sass/minimal-mistakes/_search.scss +132 -0
- data/_sass/minimal-mistakes/_sidebar.scss +347 -0
- data/_sass/minimal-mistakes/_syntax.scss +324 -0
- data/_sass/minimal-mistakes/_tables.scss +39 -0
- data/_sass/minimal-mistakes/_utilities.scss +593 -0
- data/_sass/minimal-mistakes/_variables.scss +169 -0
- data/_sass/minimal-mistakes/skins/_air.scss +23 -0
- data/_sass/minimal-mistakes/skins/_aqua.scss +30 -0
- data/_sass/minimal-mistakes/skins/_contrast.scss +51 -0
- data/_sass/minimal-mistakes/skins/_dark.scss +28 -0
- data/_sass/minimal-mistakes/skins/_default.scss +5 -0
- data/_sass/minimal-mistakes/skins/_dirt.scss +33 -0
- data/_sass/minimal-mistakes/skins/_mint.scss +23 -0
- data/_sass/minimal-mistakes/skins/_neon.scss +57 -0
- data/_sass/minimal-mistakes/skins/_plum.scss +64 -0
- data/_sass/minimal-mistakes/skins/_sunrise.scss +44 -0
- data/_sass/minimal-mistakes/vendor/breakpoint/_breakpoint.scss +114 -0
- data/_sass/minimal-mistakes/vendor/breakpoint/_context.scss +95 -0
- data/_sass/minimal-mistakes/vendor/breakpoint/_helpers.scss +151 -0
- data/_sass/minimal-mistakes/vendor/breakpoint/_legacy-settings.scss +50 -0
- data/_sass/minimal-mistakes/vendor/breakpoint/_no-query.scss +15 -0
- data/_sass/minimal-mistakes/vendor/breakpoint/_parsers.scss +215 -0
- data/_sass/minimal-mistakes/vendor/breakpoint/_respond-to.scss +82 -0
- data/_sass/minimal-mistakes/vendor/breakpoint/_settings.scss +71 -0
- data/_sass/minimal-mistakes/vendor/breakpoint/parsers/_double.scss +33 -0
- data/_sass/minimal-mistakes/vendor/breakpoint/parsers/_query.scss +82 -0
- data/_sass/minimal-mistakes/vendor/breakpoint/parsers/_resolution.scss +31 -0
- data/_sass/minimal-mistakes/vendor/breakpoint/parsers/_single.scss +26 -0
- data/_sass/minimal-mistakes/vendor/breakpoint/parsers/_triple.scss +36 -0
- data/_sass/minimal-mistakes/vendor/breakpoint/parsers/double/_default-pair.scss +21 -0
- data/_sass/minimal-mistakes/vendor/breakpoint/parsers/double/_default.scss +22 -0
- data/_sass/minimal-mistakes/vendor/breakpoint/parsers/double/_double-string.scss +22 -0
- data/_sass/minimal-mistakes/vendor/breakpoint/parsers/resolution/_resolution.scss +60 -0
- data/_sass/minimal-mistakes/vendor/breakpoint/parsers/single/_default.scss +13 -0
- data/_sass/minimal-mistakes/vendor/breakpoint/parsers/triple/_default.scss +18 -0
- data/_sass/minimal-mistakes/vendor/magnific-popup/_magnific-popup.scss +649 -0
- data/_sass/minimal-mistakes/vendor/magnific-popup/_settings.scss +46 -0
- data/_sass/minimal-mistakes/vendor/susy/_su.scss +4 -0
- data/_sass/minimal-mistakes/vendor/susy/_susy-prefix.scss +13 -0
- data/_sass/minimal-mistakes/vendor/susy/_susy.scss +5 -0
- data/_sass/minimal-mistakes/vendor/susy/plugins/_svg-grid.scss +5 -0
- data/_sass/minimal-mistakes/vendor/susy/plugins/svg-grid/_prefix.scss +7 -0
- data/_sass/minimal-mistakes/vendor/susy/plugins/svg-grid/_svg-api.scss +114 -0
- data/_sass/minimal-mistakes/vendor/susy/plugins/svg-grid/_svg-grid-math.scss +67 -0
- data/_sass/minimal-mistakes/vendor/susy/plugins/svg-grid/_svg-settings.scss +14 -0
- data/_sass/minimal-mistakes/vendor/susy/plugins/svg-grid/_svg-unprefix.scss +18 -0
- data/_sass/minimal-mistakes/vendor/susy/plugins/svg-grid/_svg-utilities.scss +133 -0
- data/_sass/minimal-mistakes/vendor/susy/susy/_api.scss +318 -0
- data/_sass/minimal-mistakes/vendor/susy/susy/_normalize.scss +261 -0
- data/_sass/minimal-mistakes/vendor/susy/susy/_parse.scss +163 -0
- data/_sass/minimal-mistakes/vendor/susy/susy/_settings.scss +329 -0
- data/_sass/minimal-mistakes/vendor/susy/susy/_su-math.scss +441 -0
- data/_sass/minimal-mistakes/vendor/susy/susy/_su-validate.scss +213 -0
- data/_sass/minimal-mistakes/vendor/susy/susy/_syntax-helpers.scss +191 -0
- data/_sass/minimal-mistakes/vendor/susy/susy/_unprefix.scss +56 -0
- data/_sass/minimal-mistakes/vendor/susy/susy/_utilities.scss +167 -0
- data/_sass/modules.scss +25 -0
- data/_sass/navigation.scss +196 -0
- data/_sass/print.scss +40 -0
- data/_sass/search.scss +323 -0
- data/_sass/support/_functions.scss +9 -0
- data/_sass/support/_variables.scss +135 -0
- data/_sass/support/mixins/_buttons.scss +27 -0
- data/_sass/support/mixins/_layout.scss +34 -0
- data/_sass/support/mixins/_typography.scss +86 -0
- data/_sass/support/mixins/mixins.scss +3 -0
- data/_sass/support/support.scss +3 -0
- data/_sass/tables.scss +58 -0
- data/_sass/typography.scss +60 -0
- data/_sass/utilities/_colors.scss +239 -0
- data/_sass/utilities/_layout.scss +95 -0
- data/_sass/utilities/_lists.scss +17 -0
- data/_sass/utilities/_spacing.scss +165 -0
- data/_sass/utilities/_typography.scss +91 -0
- data/_sass/utilities/utilities.scss +5 -0
- data/_sass/vendor/normalize.scss/README.md +78 -0
- data/_sass/vendor/normalize.scss/normalize.scss +427 -0
- data/_sass/vendor/normalize.scss/package.json +70 -0
- data/assets/css/just-the-docs-dark.scss +3 -0
- data/assets/css/just-the-docs-default.scss +8 -0
- data/assets/css/just-the-docs-light.scss +3 -0
- data/assets/images/just-the-docs.png +0 -0
- data/assets/images/search.svg +1 -0
- data/assets/js/just-the-docs.js +473 -0
- data/assets/js/vendor/lunr.min.js +6 -0
- data/assets/js/zzzz-search-data.json +60 -0
- data/bin/just-the-docs +16 -0
- data/lib/tasks/search.rake +74 -0
- metadata +245 -0
@@ -0,0 +1,191 @@
|
|
1
|
+
/// Syntax Utilities for Extending Susy
|
2
|
+
/// ===================================
|
3
|
+
/// There are many steps involved
|
4
|
+
/// when translating between the Susy syntax layer,
|
5
|
+
/// and the Su core math.
|
6
|
+
/// That entire process can be condensed with these two functions.
|
7
|
+
/// For anyone that wants to access the full power of Susy,
|
8
|
+
/// and build their own plugins, functions, or mixins –
|
9
|
+
/// this is the primary API for compiling user input,
|
10
|
+
/// and accessing the core math.
|
11
|
+
///
|
12
|
+
/// This is the same technique we use internally,
|
13
|
+
/// to keep our API layer simple and light-weight.
|
14
|
+
/// Every function accepts two arguments,
|
15
|
+
/// a "shorthand" description of the span or context,
|
16
|
+
/// and an optional settings-map to override global defaults.
|
17
|
+
///
|
18
|
+
/// - Use `susy-compile()` to parse, merge, and normalize
|
19
|
+
/// all the user settings into a single map.
|
20
|
+
/// - Then use `su-call()` to call one of the core math functions,
|
21
|
+
/// with whatever data is needed for that function.
|
22
|
+
///
|
23
|
+
/// @group plugin-utils
|
24
|
+
/// @see susy-compile
|
25
|
+
/// @see su-call
|
26
|
+
///
|
27
|
+
/// @example scss - Susy API `gutter` function
|
28
|
+
/// @function susy-gutter(
|
29
|
+
/// $context: susy-get('columns'),
|
30
|
+
/// $config: ()
|
31
|
+
/// ) {
|
32
|
+
/// // compile and normalize all user arguments and global settings
|
33
|
+
/// $context: susy-compile($context, $config, 'context-only');
|
34
|
+
/// // call `su-gutter` with the appropriate data
|
35
|
+
/// @return su-call('su-gutter', $context);
|
36
|
+
/// }
|
37
|
+
///
|
38
|
+
/// @example scss - Sample `span` mixin for floated grids
|
39
|
+
/// @mixin span(
|
40
|
+
/// $span,
|
41
|
+
/// $config: ()
|
42
|
+
/// ) {
|
43
|
+
/// $context: susy-compile($span, $config);
|
44
|
+
/// width: su-call('su-span', $context);
|
45
|
+
///
|
46
|
+
/// @if index($span, 'last') {
|
47
|
+
/// float: right;
|
48
|
+
/// } @else {
|
49
|
+
/// float: left;
|
50
|
+
/// margin-right: su-call('su-gutter', $context);
|
51
|
+
/// }
|
52
|
+
/// }
|
53
|
+
|
54
|
+
|
55
|
+
|
56
|
+
// Compile
|
57
|
+
// -------
|
58
|
+
/// Susy's syntax layer has various moving parts,
|
59
|
+
/// with syntax-parsing for the grid/span shorthand,
|
60
|
+
/// and normalization for each of the resulting values.
|
61
|
+
/// The compile function rolls this all together
|
62
|
+
/// in a single call –
|
63
|
+
/// for quick access from our internal API functions,
|
64
|
+
/// or any additional functions and mixins you add to your project.
|
65
|
+
/// Pass user input and configuration maps to the compiler,
|
66
|
+
/// and it will hand back a map of values ready for Su.
|
67
|
+
/// Combine this with the `su-call` function
|
68
|
+
/// to quickly parse, normalize, and process grid calculations.
|
69
|
+
///
|
70
|
+
/// @group plugin-utils
|
71
|
+
/// @see su-call
|
72
|
+
///
|
73
|
+
/// @param {list | map} $shorthand -
|
74
|
+
/// Shorthand expression to define the width of the span,
|
75
|
+
/// optionally containing:
|
76
|
+
/// - a count, length, or column-list span;
|
77
|
+
/// - `at $n`, `first`, or `last` location on asymmetrical grids;
|
78
|
+
/// - `narrow`, `wide`, or `wider` for optionally spreading
|
79
|
+
/// across adjacent gutters;
|
80
|
+
/// - `of $n <spread>` for available grid columns
|
81
|
+
/// and spread of the container
|
82
|
+
/// (span counts like `of 6` are only valid
|
83
|
+
/// in the context of symmetrical grids);
|
84
|
+
/// - and `set-gutters $n` to override global gutter settings
|
85
|
+
/// @param {map} $config [null] -
|
86
|
+
/// Optional map of Susy grid configuration settings
|
87
|
+
/// @param {bool} $context-only [false] -
|
88
|
+
/// Allow the parser to ignore span and span-spread values,
|
89
|
+
/// only parsing context and container-spread
|
90
|
+
///
|
91
|
+
/// @return {map} -
|
92
|
+
/// Parsed and normalized map of settings,
|
93
|
+
/// based on global and local configuration,
|
94
|
+
/// alongwith shorthad adjustments.
|
95
|
+
///
|
96
|
+
/// @example scss -
|
97
|
+
/// $user-input: 3 wide of susy-repeat(6, 120px) set-gutters 10px;
|
98
|
+
/// $grid-data: susy-compile($user-input, $susy);
|
99
|
+
///
|
100
|
+
/// @each $key, $value in $grid-data {
|
101
|
+
/// /* #{$key}: #{$value}, */
|
102
|
+
/// }
|
103
|
+
@function susy-compile(
|
104
|
+
$short,
|
105
|
+
$config: null,
|
106
|
+
$context-only: false
|
107
|
+
) {
|
108
|
+
// Get and normalize config
|
109
|
+
$config: if($config, susy-settings($config), susy-settings());
|
110
|
+
$normal-config: susy-normalize($config);
|
111
|
+
|
112
|
+
// Parse and normalize shorthand
|
113
|
+
@if (type-of($short) != 'map') and (length($short) > 0) {
|
114
|
+
$short: susy-parse($short, $context-only);
|
115
|
+
}
|
116
|
+
|
117
|
+
$normal-short: susy-normalize($short, $normal-config);
|
118
|
+
|
119
|
+
// Merge and return
|
120
|
+
@return map-merge($normal-config, $normal-short);
|
121
|
+
}
|
122
|
+
|
123
|
+
|
124
|
+
|
125
|
+
// Call
|
126
|
+
// ----
|
127
|
+
/// The Susy parsing and normalization process
|
128
|
+
/// results in a map of configuration settings,
|
129
|
+
/// much like the global `$susy` settings map.
|
130
|
+
/// In order to pass that information along to Su math functions,
|
131
|
+
/// the proper values have to be picked out,
|
132
|
+
/// and converted to arguments.
|
133
|
+
///
|
134
|
+
/// The `su-call` function streamlines that process,
|
135
|
+
/// weeding out the unnecessary data,
|
136
|
+
/// and passing the rest along to Su in the proper format.
|
137
|
+
/// Combine this with `susy-compile` to quickly parse,
|
138
|
+
/// normalize, and process grid calculations.
|
139
|
+
///
|
140
|
+
/// @group plugin-utils
|
141
|
+
///
|
142
|
+
/// @require su-span
|
143
|
+
/// @require su-gutter
|
144
|
+
/// @require su-slice
|
145
|
+
/// @see susy-compile
|
146
|
+
///
|
147
|
+
/// @param {'su-span' | 'su-gutter' | 'su-slice'} $name -
|
148
|
+
/// Name of the Su math function to call.
|
149
|
+
/// @param {map} $config -
|
150
|
+
/// Parsed and normalized map of Susy configuration settings
|
151
|
+
/// to use for math-function arguments.
|
152
|
+
///
|
153
|
+
/// @return {*} -
|
154
|
+
/// Results of the function being called.
|
155
|
+
///
|
156
|
+
/// @example scss -
|
157
|
+
/// $user-input: 3 wide of susy-repeat(6, 120px) set-gutters 10px;
|
158
|
+
/// $grid-data: susy-compile($user-input, $susy);
|
159
|
+
///
|
160
|
+
/// .su-span {
|
161
|
+
/// width: su-call('su-span', $grid-data);
|
162
|
+
/// }
|
163
|
+
@function su-call(
|
164
|
+
$name,
|
165
|
+
$config
|
166
|
+
) {
|
167
|
+
$grid-function-args: (
|
168
|
+
'su-span': ('span', 'columns', 'gutters', 'spread', 'container-spread', 'location'),
|
169
|
+
'su-gutter': ('columns', 'gutters', 'container-spread'),
|
170
|
+
'su-slice': ('span', 'columns', 'location'),
|
171
|
+
);
|
172
|
+
|
173
|
+
$args: map-get($grid-function-args, $name);
|
174
|
+
|
175
|
+
@if not $args {
|
176
|
+
$options: 'Try one of these: #{map-keys($grid-function-args)}';
|
177
|
+
@return _susy-error(
|
178
|
+
'#{$name} is not a public Su function. #{$options}',
|
179
|
+
'su-call');
|
180
|
+
}
|
181
|
+
|
182
|
+
$call: if(function-exists('get-function'), get-function($name), $name);
|
183
|
+
$output: ();
|
184
|
+
|
185
|
+
@each $arg in $args {
|
186
|
+
$value: map-get($config, $arg);
|
187
|
+
$output: if($value, map-merge($output, ($arg: $value)), $output);
|
188
|
+
}
|
189
|
+
|
190
|
+
@return call($call, $output...);
|
191
|
+
}
|
@@ -0,0 +1,56 @@
|
|
1
|
+
// Unprefix Susy
|
2
|
+
// =============
|
3
|
+
|
4
|
+
|
5
|
+
// Span
|
6
|
+
// ----
|
7
|
+
/// Un-prefixed alias for `susy-span`
|
8
|
+
/// (available by default)
|
9
|
+
///
|
10
|
+
/// @group api
|
11
|
+
/// @alias susy-span
|
12
|
+
///
|
13
|
+
/// @param {list} $span
|
14
|
+
/// @param {map} $config [()]
|
15
|
+
@function span(
|
16
|
+
$span,
|
17
|
+
$config: ()
|
18
|
+
) {
|
19
|
+
@return susy-span($span, $config);
|
20
|
+
}
|
21
|
+
|
22
|
+
|
23
|
+
// Gutter
|
24
|
+
// ------
|
25
|
+
/// Un-prefixed alias for `susy-gutter`
|
26
|
+
/// (available by default)
|
27
|
+
///
|
28
|
+
/// @group api
|
29
|
+
/// @alias susy-gutter
|
30
|
+
///
|
31
|
+
/// @param {integer | list} $context [null] -
|
32
|
+
/// @param {map} $config [()]
|
33
|
+
@function gutter(
|
34
|
+
$context: susy-get('columns'),
|
35
|
+
$config: ()
|
36
|
+
) {
|
37
|
+
@return susy-gutter($context, $config);
|
38
|
+
}
|
39
|
+
|
40
|
+
|
41
|
+
// Slice
|
42
|
+
// -----
|
43
|
+
/// Un-prefixed alias for `susy-slice`
|
44
|
+
/// (available by default)
|
45
|
+
///
|
46
|
+
/// @group api
|
47
|
+
/// @alias susy-slice
|
48
|
+
///
|
49
|
+
/// @param {list} $span
|
50
|
+
/// @param {map} $config [()]
|
51
|
+
@function slice(
|
52
|
+
$span,
|
53
|
+
$config: ()
|
54
|
+
) {
|
55
|
+
@return susy-slice($span, $config);
|
56
|
+
}
|
@@ -0,0 +1,167 @@
|
|
1
|
+
// Sass Utilities
|
2
|
+
// ==============
|
3
|
+
// - Susy Error Output Override [variable]
|
4
|
+
// - Susy Error [function]
|
5
|
+
|
6
|
+
|
7
|
+
|
8
|
+
// Susy Error Output Override
|
9
|
+
// --------------------------
|
10
|
+
/// Turn off error output for testing
|
11
|
+
/// @group x-utility
|
12
|
+
/// @access private
|
13
|
+
$_susy-error-output-override: false !default;
|
14
|
+
|
15
|
+
|
16
|
+
|
17
|
+
// Susy Error
|
18
|
+
// ----------
|
19
|
+
/// Optionally return error messages without failing,
|
20
|
+
/// as a way to test error cases
|
21
|
+
///
|
22
|
+
/// @group x-utility
|
23
|
+
/// @access private
|
24
|
+
///
|
25
|
+
/// @param {string} $message -
|
26
|
+
/// A useful error message, explaining the problem
|
27
|
+
/// @param {string} $source -
|
28
|
+
/// The original source of the error for debugging
|
29
|
+
/// @param {bool} $override [$_susy-error-output-override] -
|
30
|
+
/// Optionally return the error rather than failing
|
31
|
+
/// @return {string} -
|
32
|
+
/// Combined error with source and message
|
33
|
+
/// @throws When `$override == true`
|
34
|
+
@function _susy-error(
|
35
|
+
$message,
|
36
|
+
$source,
|
37
|
+
$override: $_susy-error-output-override
|
38
|
+
) {
|
39
|
+
@if $override {
|
40
|
+
@return 'ERROR [#{$source}] #{$message}';
|
41
|
+
}
|
42
|
+
|
43
|
+
@error '[#{$source}] #{$message}';
|
44
|
+
}
|
45
|
+
|
46
|
+
|
47
|
+
// Su Is Comparable
|
48
|
+
// ----------------
|
49
|
+
/// Check that the units in a grid are comparable
|
50
|
+
///
|
51
|
+
/// @group x-validation
|
52
|
+
/// @access private
|
53
|
+
///
|
54
|
+
/// @param {numbers} $lengths… -
|
55
|
+
/// Arglist of all the number values to compare
|
56
|
+
/// (columns, gutters, span, etc)
|
57
|
+
///
|
58
|
+
/// @return {'fluid' | 'static' | false} -
|
59
|
+
/// The type of span (fluid or static) when units match,
|
60
|
+
/// or `false` for mismatched units
|
61
|
+
@function _su-is-comparable(
|
62
|
+
$lengths...
|
63
|
+
) {
|
64
|
+
$first: nth($lengths, 1);
|
65
|
+
|
66
|
+
@if (length($lengths) == 1) {
|
67
|
+
@return if(unitless($first), 'fluid', 'static');
|
68
|
+
}
|
69
|
+
|
70
|
+
@for $i from 2 through length($lengths) {
|
71
|
+
$comp: nth($lengths, $i);
|
72
|
+
|
73
|
+
$fail: not comparable($first, $comp);
|
74
|
+
$fail: $fail or (unitless($first) and not unitless($comp));
|
75
|
+
$fail: $fail or (unitless($comp) and not unitless($first));
|
76
|
+
|
77
|
+
@if $fail {
|
78
|
+
@return false;
|
79
|
+
}
|
80
|
+
}
|
81
|
+
|
82
|
+
@return if(unitless($first), 'fluid', 'static');
|
83
|
+
}
|
84
|
+
|
85
|
+
|
86
|
+
// Su Map Add Units
|
87
|
+
// ----------------
|
88
|
+
/// The calc features use a map of units and values
|
89
|
+
/// to compile the proper algorythm.
|
90
|
+
/// This function adds a new value to any comparable existing unit/value,
|
91
|
+
/// or adds a new unit/value pair to the map
|
92
|
+
///
|
93
|
+
/// @group x-utility
|
94
|
+
/// @access private
|
95
|
+
///
|
96
|
+
/// @param {map} $map -
|
97
|
+
/// A map of unit/value pairs, e.g. ('px': 120px)
|
98
|
+
/// @param {length} $value -
|
99
|
+
/// A new length to be added to the map
|
100
|
+
/// @return {map} -
|
101
|
+
/// The updated map, with new value added
|
102
|
+
///
|
103
|
+
/// @example scss -
|
104
|
+
/// $map: (0px: 120px);
|
105
|
+
/// $map: _su-map-add-units($map, 1in); // add a comparable unit
|
106
|
+
/// $map: _su-map-add-units($map, 3vw); // add a new unit
|
107
|
+
///
|
108
|
+
/// @each $units, $value in $map {
|
109
|
+
/// /* #{$units}: #{$value} */
|
110
|
+
/// }
|
111
|
+
@function _su-map-add-units(
|
112
|
+
$map,
|
113
|
+
$value
|
114
|
+
) {
|
115
|
+
$unit: $value * 0;
|
116
|
+
$has: map-get($map, $unit) or 0;
|
117
|
+
|
118
|
+
@if ($has == 0) {
|
119
|
+
@each $try, $could in $map {
|
120
|
+
$match: comparable($try, $value);
|
121
|
+
$unit: if($match, $try, $unit);
|
122
|
+
$has: if($match, $could, $has);
|
123
|
+
}
|
124
|
+
}
|
125
|
+
|
126
|
+
@return map-merge($map, ($unit: $has + $value));
|
127
|
+
}
|
128
|
+
|
129
|
+
|
130
|
+
// Susy Flatten
|
131
|
+
// ------------
|
132
|
+
/// Flatten a multidimensional list
|
133
|
+
///
|
134
|
+
/// @group x-utility
|
135
|
+
/// @access private
|
136
|
+
///
|
137
|
+
/// @param {list} $list -
|
138
|
+
/// The list to be flattened
|
139
|
+
/// @return {list} -
|
140
|
+
/// The flattened list
|
141
|
+
///
|
142
|
+
/// @example scss -
|
143
|
+
/// $list: 120px (30em 30em) 120px;
|
144
|
+
/// /* #{_susy-flatten($list)} */
|
145
|
+
@function _susy-flatten(
|
146
|
+
$list
|
147
|
+
) {
|
148
|
+
$flat: ();
|
149
|
+
|
150
|
+
// Don't iterate over maps
|
151
|
+
@if (type-of($list) == 'map') {
|
152
|
+
@return $list;
|
153
|
+
}
|
154
|
+
|
155
|
+
// Iterate over lists (or single items)
|
156
|
+
@each $item in $list {
|
157
|
+
@if (type-of($item) == 'list') {
|
158
|
+
$item: _susy-flatten($item);
|
159
|
+
$flat: join($flat, $item);
|
160
|
+
} @else {
|
161
|
+
$flat: append($flat, $item);
|
162
|
+
}
|
163
|
+
}
|
164
|
+
|
165
|
+
// Return flattened list
|
166
|
+
@return $flat;
|
167
|
+
}
|
data/_sass/modules.scss
ADDED
@@ -0,0 +1,25 @@
|
|
1
|
+
//
|
2
|
+
// Import external dependencies
|
3
|
+
//
|
4
|
+
@import "./vendor/normalize.scss/normalize.scss";
|
5
|
+
|
6
|
+
//
|
7
|
+
// Modules
|
8
|
+
//
|
9
|
+
@import "./base";
|
10
|
+
@import "./layout";
|
11
|
+
@import "./content";
|
12
|
+
@import "./navigation";
|
13
|
+
@import "./typography";
|
14
|
+
@import "./labels";
|
15
|
+
@import "./buttons";
|
16
|
+
@import "./search";
|
17
|
+
@import "./tables";
|
18
|
+
@import "./code";
|
19
|
+
@import "./utilities/utilities";
|
20
|
+
@import "./print";
|
21
|
+
|
22
|
+
@import "minimal-mistakes/variables";
|
23
|
+
@import "minimal-mistakes/vendor/breakpoint/breakpoint";
|
24
|
+
@import "minimal-mistakes/mixins";
|
25
|
+
@import "minimal-mistakes/sidebar";
|
@@ -0,0 +1,196 @@
|
|
1
|
+
//
|
2
|
+
// Main nav, breadcrumb, etc...
|
3
|
+
//
|
4
|
+
// stylelint-disable selector-no-type, max-nesting-depth, selector-max-compound-selectors, selector-max-type, selector-max-specificity
|
5
|
+
|
6
|
+
.nav-list {
|
7
|
+
padding: 0;
|
8
|
+
margin-top: 0;
|
9
|
+
margin-bottom: 0;
|
10
|
+
list-style: none;
|
11
|
+
|
12
|
+
.nav-list-item {
|
13
|
+
@include fs-4;
|
14
|
+
position: relative;
|
15
|
+
margin: 0;
|
16
|
+
|
17
|
+
@include mq(md) {
|
18
|
+
@include fs-3;
|
19
|
+
}
|
20
|
+
|
21
|
+
.nav-list-link {
|
22
|
+
display: block;
|
23
|
+
min-height: $nav-list-item-height-sm;
|
24
|
+
padding-top: $sp-1;
|
25
|
+
padding-bottom: $sp-1;
|
26
|
+
line-height: #{$nav-list-item-height-sm - 2 * $sp-1};
|
27
|
+
@if $nav-list-expander-right {
|
28
|
+
padding-right: $nav-list-item-height-sm;
|
29
|
+
padding-left: $gutter-spacing-sm;
|
30
|
+
} @else {
|
31
|
+
padding-right: $gutter-spacing-sm;
|
32
|
+
padding-left: $nav-list-item-height-sm;
|
33
|
+
}
|
34
|
+
|
35
|
+
@include mq(md) {
|
36
|
+
min-height: $nav-list-item-height;
|
37
|
+
line-height: #{$nav-list-item-height - 2 * $sp-1};
|
38
|
+
@if $nav-list-expander-right {
|
39
|
+
padding-right: $nav-list-item-height;
|
40
|
+
padding-left: $gutter-spacing;
|
41
|
+
} @else {
|
42
|
+
padding-right: $gutter-spacing;
|
43
|
+
padding-left: $nav-list-item-height;
|
44
|
+
}
|
45
|
+
}
|
46
|
+
|
47
|
+
&.active {
|
48
|
+
font-weight: 600;
|
49
|
+
text-decoration: none;
|
50
|
+
}
|
51
|
+
|
52
|
+
&:hover,
|
53
|
+
&.active {
|
54
|
+
background-image: linear-gradient(
|
55
|
+
-90deg,
|
56
|
+
rgba($feedback-color, 1) 0%,
|
57
|
+
rgba($feedback-color, 0.8) 80%,
|
58
|
+
rgba($feedback-color, 0) 100%
|
59
|
+
);
|
60
|
+
}
|
61
|
+
}
|
62
|
+
|
63
|
+
.nav-list-expander {
|
64
|
+
position: absolute;
|
65
|
+
@if $nav-list-expander-right {
|
66
|
+
right: 0;
|
67
|
+
}
|
68
|
+
width: $nav-list-item-height-sm;
|
69
|
+
height: $nav-list-item-height-sm;
|
70
|
+
padding-top: #{$nav-list-item-height-sm / 4};
|
71
|
+
padding-right: #{$nav-list-item-height-sm / 4};
|
72
|
+
padding-bottom: #{$nav-list-item-height-sm / 4};
|
73
|
+
padding-left: #{$nav-list-item-height-sm / 4};
|
74
|
+
color: $link-color;
|
75
|
+
|
76
|
+
@include mq(md) {
|
77
|
+
width: $nav-list-item-height;
|
78
|
+
height: $nav-list-item-height;
|
79
|
+
padding-top: #{$nav-list-item-height / 4};
|
80
|
+
padding-right: #{$nav-list-item-height / 4};
|
81
|
+
padding-bottom: #{$nav-list-item-height / 4};
|
82
|
+
padding-left: #{$nav-list-item-height / 4};
|
83
|
+
}
|
84
|
+
|
85
|
+
&:hover {
|
86
|
+
background-image: linear-gradient(
|
87
|
+
-90deg,
|
88
|
+
rgba($feedback-color, 1) 0%,
|
89
|
+
rgba($feedback-color, 0.8) 100%
|
90
|
+
);
|
91
|
+
}
|
92
|
+
|
93
|
+
@if $nav-list-expander-right {
|
94
|
+
svg {
|
95
|
+
transform: rotate(90deg);
|
96
|
+
}
|
97
|
+
}
|
98
|
+
}
|
99
|
+
|
100
|
+
> .nav-list {
|
101
|
+
display: none;
|
102
|
+
padding-left: $sp-3;
|
103
|
+
list-style: none;
|
104
|
+
|
105
|
+
.nav-list-item {
|
106
|
+
position: relative;
|
107
|
+
|
108
|
+
.nav-list-link {
|
109
|
+
color: $nav-child-link-color;
|
110
|
+
}
|
111
|
+
|
112
|
+
.nav-list-expander {
|
113
|
+
color: $nav-child-link-color;
|
114
|
+
}
|
115
|
+
}
|
116
|
+
}
|
117
|
+
|
118
|
+
&.active {
|
119
|
+
> .nav-list-expander svg {
|
120
|
+
@if $nav-list-expander-right {
|
121
|
+
transform: rotate(-90deg);
|
122
|
+
} @else {
|
123
|
+
transform: rotate(90deg);
|
124
|
+
}
|
125
|
+
}
|
126
|
+
|
127
|
+
> .nav-list {
|
128
|
+
display: block;
|
129
|
+
}
|
130
|
+
}
|
131
|
+
}
|
132
|
+
}
|
133
|
+
|
134
|
+
// Aux nav
|
135
|
+
|
136
|
+
.aux-nav {
|
137
|
+
height: 100%;
|
138
|
+
overflow-x: auto;
|
139
|
+
@include fs-2;
|
140
|
+
|
141
|
+
.aux-nav-list {
|
142
|
+
display: flex;
|
143
|
+
height: 100%;
|
144
|
+
padding: 0;
|
145
|
+
margin: 0;
|
146
|
+
list-style: none;
|
147
|
+
}
|
148
|
+
|
149
|
+
.aux-nav-list-item {
|
150
|
+
display: inline-block;
|
151
|
+
height: 100%;
|
152
|
+
padding: 0;
|
153
|
+
margin: 0;
|
154
|
+
}
|
155
|
+
|
156
|
+
@include mq(md) {
|
157
|
+
padding-right: $gutter-spacing-sm;
|
158
|
+
}
|
159
|
+
}
|
160
|
+
|
161
|
+
// Breadcrumb nav
|
162
|
+
|
163
|
+
.breadcrumb-nav {
|
164
|
+
@include mq(md) {
|
165
|
+
margin-top: -$sp-4;
|
166
|
+
}
|
167
|
+
}
|
168
|
+
|
169
|
+
.breadcrumb-nav-list {
|
170
|
+
padding-left: 0;
|
171
|
+
margin-bottom: $sp-3;
|
172
|
+
list-style: none;
|
173
|
+
}
|
174
|
+
|
175
|
+
.breadcrumb-nav-list-item {
|
176
|
+
display: table-cell;
|
177
|
+
@include fs-2;
|
178
|
+
|
179
|
+
&::before {
|
180
|
+
display: none;
|
181
|
+
}
|
182
|
+
|
183
|
+
&::after {
|
184
|
+
display: inline-block;
|
185
|
+
margin-right: $sp-2;
|
186
|
+
margin-left: $sp-2;
|
187
|
+
color: $grey-dk-000;
|
188
|
+
content: "/";
|
189
|
+
}
|
190
|
+
|
191
|
+
&:last-child {
|
192
|
+
&::after {
|
193
|
+
content: "";
|
194
|
+
}
|
195
|
+
}
|
196
|
+
}
|