minimal-mistakes-jekyll 4.8.0 → 4.8.1

Sign up to get free protection for your applications and to get access to all the features.
Files changed (141) hide show
  1. checksums.yaml +4 -4
  2. data/CHANGELOG.md +15 -2
  3. data/LICENSE.txt +59 -59
  4. data/README.md +1 -3
  5. data/_data/navigation.yml +11 -11
  6. data/_data/ui-text.yml +977 -932
  7. data/_includes/analytics-providers/custom.html +2 -2
  8. data/_includes/analytics-providers/google-universal.html +9 -9
  9. data/_includes/analytics-providers/google.html +10 -10
  10. data/_includes/analytics.html +11 -11
  11. data/_includes/archive-single.html +37 -37
  12. data/_includes/author-profile-custom-links.html +6 -6
  13. data/_includes/author-profile.html +266 -249
  14. data/_includes/base_path +4 -4
  15. data/_includes/breadcrumbs.html +39 -39
  16. data/_includes/browser-upgrade.html +3 -3
  17. data/_includes/category-list.html +25 -25
  18. data/_includes/comment.html +22 -22
  19. data/_includes/comments-providers/custom.html +2 -2
  20. data/_includes/comments-providers/discourse.html +13 -13
  21. data/_includes/comments-providers/facebook.html +7 -7
  22. data/_includes/comments-providers/google-plus.html +1 -1
  23. data/_includes/comments-providers/staticman.html +41 -41
  24. data/_includes/comments-providers/staticman_v2.html +41 -41
  25. data/_includes/feature_row +49 -49
  26. data/_includes/figure +12 -12
  27. data/_includes/footer.html +25 -25
  28. data/_includes/footer/custom.html +2 -2
  29. data/_includes/gallery +46 -46
  30. data/_includes/group-by-array +46 -46
  31. data/_includes/head.html +42 -42
  32. data/_includes/head/custom.html +4 -4
  33. data/_includes/masthead.html +32 -32
  34. data/_includes/nav_list +46 -46
  35. data/_includes/page__hero_video.html +4 -4
  36. data/_includes/page__taxonomy.html +6 -6
  37. data/_includes/paginator.html +69 -69
  38. data/_includes/post_pagination.html +13 -13
  39. data/_includes/read-time.html +14 -14
  40. data/_includes/scripts.html +20 -20
  41. data/_includes/search_form.html +3 -3
  42. data/_includes/seo.html +162 -162
  43. data/_includes/sidebar.html +22 -22
  44. data/_includes/social-share.html +13 -13
  45. data/_includes/tag-list.html +25 -25
  46. data/_includes/toc +6 -6
  47. data/_includes/toc.html +74 -74
  48. data/_includes/video +11 -11
  49. data/_layouts/archive-taxonomy.html +14 -14
  50. data/_layouts/compress.html +10 -10
  51. data/_layouts/default.html +1 -1
  52. data/_layouts/home.html +11 -11
  53. data/_layouts/search.html +32 -32
  54. data/_layouts/single.html +92 -92
  55. data/_layouts/splash.html +21 -21
  56. data/_sass/minimal-mistakes.scss +1 -1
  57. data/_sass/minimal-mistakes/_animations.scss +20 -20
  58. data/_sass/minimal-mistakes/_archive.scss +310 -310
  59. data/_sass/minimal-mistakes/_base.scss +360 -360
  60. data/_sass/minimal-mistakes/_buttons.scss +97 -97
  61. data/_sass/minimal-mistakes/_footer.scss +82 -82
  62. data/_sass/minimal-mistakes/_masthead.scss +83 -83
  63. data/_sass/minimal-mistakes/_mixins.scss +91 -91
  64. data/_sass/minimal-mistakes/_navigation.scss +540 -540
  65. data/_sass/minimal-mistakes/_notices.scss +99 -99
  66. data/_sass/minimal-mistakes/_page.scss +426 -426
  67. data/_sass/minimal-mistakes/_search.scss +107 -107
  68. data/_sass/minimal-mistakes/_sidebar.scss +267 -262
  69. data/_sass/minimal-mistakes/_tables.scss +36 -36
  70. data/_sass/minimal-mistakes/_utilities.scss +516 -516
  71. data/_sass/minimal-mistakes/_variables.scss +137 -137
  72. data/_sass/minimal-mistakes/skins/_air.scss +22 -22
  73. data/_sass/minimal-mistakes/skins/_aqua.scss +29 -29
  74. data/_sass/minimal-mistakes/skins/_contrast.scss +33 -33
  75. data/_sass/minimal-mistakes/skins/_dark.scss +23 -23
  76. data/_sass/minimal-mistakes/skins/_default.scss +5 -5
  77. data/_sass/minimal-mistakes/skins/_dirt.scss +14 -14
  78. data/_sass/minimal-mistakes/skins/_mint.scss +22 -22
  79. data/_sass/minimal-mistakes/skins/_sunrise.scss +25 -25
  80. data/_sass/minimal-mistakes/vendor/breakpoint/_breakpoint.scss +114 -114
  81. data/_sass/minimal-mistakes/vendor/breakpoint/_context.scss +94 -94
  82. data/_sass/minimal-mistakes/vendor/breakpoint/_helpers.scss +151 -151
  83. data/_sass/minimal-mistakes/vendor/breakpoint/_legacy-settings.scss +49 -49
  84. data/_sass/minimal-mistakes/vendor/breakpoint/_no-query.scss +15 -15
  85. data/_sass/minimal-mistakes/vendor/breakpoint/_parsers.scss +215 -215
  86. data/_sass/minimal-mistakes/vendor/breakpoint/_respond-to.scss +82 -82
  87. data/_sass/minimal-mistakes/vendor/breakpoint/_settings.scss +70 -70
  88. data/_sass/minimal-mistakes/vendor/breakpoint/parsers/_double.scss +33 -33
  89. data/_sass/minimal-mistakes/vendor/breakpoint/parsers/_query.scss +82 -82
  90. data/_sass/minimal-mistakes/vendor/breakpoint/parsers/_resolution.scss +31 -31
  91. data/_sass/minimal-mistakes/vendor/breakpoint/parsers/_single.scss +26 -26
  92. data/_sass/minimal-mistakes/vendor/breakpoint/parsers/_triple.scss +36 -36
  93. data/_sass/minimal-mistakes/vendor/breakpoint/parsers/double/_default-pair.scss +21 -21
  94. data/_sass/minimal-mistakes/vendor/breakpoint/parsers/double/_default.scss +22 -22
  95. data/_sass/minimal-mistakes/vendor/breakpoint/parsers/double/_double-string.scss +21 -21
  96. data/_sass/minimal-mistakes/vendor/breakpoint/parsers/resolution/_resolution.scss +60 -60
  97. data/_sass/minimal-mistakes/vendor/breakpoint/parsers/single/_default.scss +13 -13
  98. data/_sass/minimal-mistakes/vendor/breakpoint/parsers/triple/_default.scss +18 -18
  99. data/_sass/minimal-mistakes/vendor/font-awesome/_animated.scss +34 -34
  100. data/_sass/minimal-mistakes/vendor/font-awesome/_bordered-pulled.scss +25 -25
  101. data/_sass/minimal-mistakes/vendor/font-awesome/_core.scss +12 -12
  102. data/_sass/minimal-mistakes/vendor/font-awesome/_fixed-width.scss +6 -6
  103. data/_sass/minimal-mistakes/vendor/font-awesome/_font-awesome.scss +18 -18
  104. data/_sass/minimal-mistakes/vendor/font-awesome/_icons.scss +789 -789
  105. data/_sass/minimal-mistakes/vendor/font-awesome/_larger.scss +13 -13
  106. data/_sass/minimal-mistakes/vendor/font-awesome/_list.scss +19 -19
  107. data/_sass/minimal-mistakes/vendor/font-awesome/_mixins.scss +60 -60
  108. data/_sass/minimal-mistakes/vendor/font-awesome/_path.scss +15 -15
  109. data/_sass/minimal-mistakes/vendor/font-awesome/_rotated-flipped.scss +20 -20
  110. data/_sass/minimal-mistakes/vendor/font-awesome/_screen-reader.scss +5 -5
  111. data/_sass/minimal-mistakes/vendor/font-awesome/_stacked.scss +20 -20
  112. data/_sass/minimal-mistakes/vendor/font-awesome/_variables.scss +800 -800
  113. data/_sass/minimal-mistakes/vendor/magnific-popup/_magnific-popup.scss +649 -649
  114. data/_sass/minimal-mistakes/vendor/magnific-popup/_settings.scss +45 -45
  115. data/_sass/minimal-mistakes/vendor/susy/_susy-prefix.scss +13 -13
  116. data/_sass/minimal-mistakes/vendor/susy/_susy.scss +5 -5
  117. data/_sass/minimal-mistakes/vendor/susy/plugins/_svg-grid.scss +5 -5
  118. data/_sass/minimal-mistakes/vendor/susy/plugins/svg-grid/_prefix.scss +7 -7
  119. data/_sass/minimal-mistakes/vendor/susy/plugins/svg-grid/_svg-api.scss +114 -114
  120. data/_sass/minimal-mistakes/vendor/susy/plugins/svg-grid/_svg-grid-math.scss +67 -67
  121. data/_sass/minimal-mistakes/vendor/susy/plugins/svg-grid/_svg-settings.scss +14 -14
  122. data/_sass/minimal-mistakes/vendor/susy/plugins/svg-grid/_svg-unprefix.scss +18 -18
  123. data/_sass/minimal-mistakes/vendor/susy/plugins/svg-grid/_svg-utilities.scss +133 -133
  124. data/_sass/minimal-mistakes/vendor/susy/susy/_api.scss +318 -318
  125. data/_sass/minimal-mistakes/vendor/susy/susy/_normalize.scss +261 -261
  126. data/_sass/minimal-mistakes/vendor/susy/susy/_parse.scss +163 -163
  127. data/_sass/minimal-mistakes/vendor/susy/susy/_settings.scss +329 -329
  128. data/_sass/minimal-mistakes/vendor/susy/susy/_su-math.scss +441 -441
  129. data/_sass/minimal-mistakes/vendor/susy/susy/_su-validate.scss +213 -213
  130. data/_sass/minimal-mistakes/vendor/susy/susy/_syntax-helpers.scss +191 -191
  131. data/_sass/minimal-mistakes/vendor/susy/susy/_unprefix.scss +56 -56
  132. data/_sass/minimal-mistakes/vendor/susy/susy/_utilities.scss +167 -167
  133. data/assets/css/main.scss +7 -7
  134. data/assets/fonts/fontawesome-webfont.svg +2671 -2671
  135. data/assets/js/_main.js +85 -85
  136. data/assets/js/lunr-en.js +104 -93
  137. data/assets/js/lunr.min.js +2977 -7
  138. data/assets/js/main.min.js +5 -5
  139. data/assets/js/plugins/jquery.fitvids.js +81 -81
  140. data/assets/js/plugins/jquery.greedy-navigation.js +83 -83
  141. metadata +3 -3
@@ -1,14 +1,14 @@
1
- // SVG Settings
2
- // ============
3
-
4
-
5
- // Susy SVG Defaults
6
- // =================
7
- /// This plugin adds the `svg-grid-colors` property
8
- /// and default value to `$_susy-defaults` —
9
- /// you can override that value in `$susy`
10
- /// or any other grid settings map.
11
- /// @group plugin_svg-grid
12
- $_susy-defaults: map-merge((
13
- 'svg-grid-colors': hsla(120, 50%, 50%, 0.5) hsla(120, 50%, 75%, 0.5),
14
- ), $_susy-defaults);
1
+ // SVG Settings
2
+ // ============
3
+
4
+
5
+ // Susy SVG Defaults
6
+ // =================
7
+ /// This plugin adds the `svg-grid-colors` property
8
+ /// and default value to `$_susy-defaults` —
9
+ /// you can override that value in `$susy`
10
+ /// or any other grid settings map.
11
+ /// @group plugin_svg-grid
12
+ $_susy-defaults: map-merge((
13
+ 'svg-grid-colors': hsla(120, 50%, 50%, 0.5) hsla(120, 50%, 75%, 0.5),
14
+ ), $_susy-defaults);
@@ -1,18 +1,18 @@
1
- // Unprefix Susy SVG Grid
2
- // ======================
3
-
4
-
5
-
6
- // SVG Grid
7
- // --------
8
- /// Un-prefixed alias for `susy-svg-grid`
9
- ///
10
- /// @group plugin_svg-grid
11
- /// @alias susy-svg-grid
12
- @function svg-grid(
13
- $grid: $susy,
14
- $colors: susy-get('svg-grid-colors'),
15
- $offset: null
16
- ) {
17
- @return susy-svg-grid($grid, $colors, $offset);
18
- }
1
+ // Unprefix Susy SVG Grid
2
+ // ======================
3
+
4
+
5
+
6
+ // SVG Grid
7
+ // --------
8
+ /// Un-prefixed alias for `susy-svg-grid`
9
+ ///
10
+ /// @group plugin_svg-grid
11
+ /// @alias susy-svg-grid
12
+ @function svg-grid(
13
+ $grid: $susy,
14
+ $colors: susy-get('svg-grid-colors'),
15
+ $offset: null
16
+ ) {
17
+ @return susy-svg-grid($grid, $colors, $offset);
18
+ }
@@ -1,133 +1,133 @@
1
- // SVG Utilities
2
- // =============
3
-
4
-
5
-
6
- // SVG Validate Units
7
- // ------------------
8
- /// Make sure a length is supported in svg
9
- ///
10
- /// @access private
11
- ///
12
- /// @param {Length} $length -
13
- /// The length to validate
14
- /// @param {String} $name [null] -
15
- /// Optional name of length origin,
16
- /// for error reporting
17
- ///
18
- /// @return {Length} -
19
- /// An svg-validated length, or comparable valid length
20
- @function _susy-svg-validate-units(
21
- $length,
22
- $name: null
23
- ) {
24
- $_svg-units: ('em', 'ex', 'px', 'pt', 'pc', 'cm', 'mm', 'in', '%');
25
- $string: type-of($length) == 'string';
26
-
27
- @if ($length == 0) or ($string) or index($_svg-units, unit($length)) {
28
- @return $length;
29
- }
30
-
31
- @return _susy-error(
32
- '`#{unit($length)}` #{$name} units are not supported in SVG',
33
- '_susy-svg-validate-units');
34
- }
35
-
36
-
37
-
38
- // SVG Rect
39
- // --------
40
- /// Build a single svg rectangle
41
- ///
42
- /// @access private
43
- ///
44
- /// @param {Length} $x -
45
- /// Horizontal position for the rectangle
46
- /// @param {Length} $width -
47
- /// Width of the rectangle
48
- /// @param {Length} $offset [null] -
49
- /// Offset the rectangle, to account for edge gutters
50
- ///
51
- /// @return {String} -
52
- /// Escaped string representing one svg rectangle
53
- @function _susy-svg-rect(
54
- $x,
55
- $width,
56
- $offset: null
57
- ) {
58
- $x: _susy-svg-validate-units($x);
59
- $width: _susy-svg-validate-units($width);
60
- $offset: if($offset == 0, null, $offset);
61
-
62
- @if (type-of($offset) == 'number') and (type-of($x) == 'number') {
63
- @if comparable($x, $offset) {
64
- $x: $x + $offset;
65
- } @else {
66
- $x: 'calc(#{$x} + #{$offset})';
67
- }
68
- } @else if $offset and ($x != 0) {
69
- $x: 'calc(#{$x} + #{$offset})';
70
- } @else if $offset {
71
- $x: $offset;
72
- }
73
-
74
- @return '%3Crect x="#{$x}" width="#{$width}" height="100%"/%3E';
75
- }
76
-
77
-
78
-
79
- // SVG Color
80
- // ---------
81
- /// Stringify colors, and escape hex symbol
82
- ///
83
- /// @access private
84
- ///
85
- /// @param {Color} $color -
86
- /// Color to stringify and escape
87
- ///
88
- /// @return {String} -
89
- /// Escaped string value of color
90
- @function _susy-svg-color(
91
- $color
92
- ) {
93
- $color: inspect($color); // convert to string
94
-
95
- @if (str-index($color, '#') == 1) {
96
- $color: '%23' + str-slice($color, 2);
97
- }
98
-
99
- @return $color;
100
- }
101
-
102
-
103
-
104
- // SVG Gradient
105
- // ------------
106
- /// Create a multi-color svg gradient
107
- ///
108
- /// @access private
109
- ///
110
- /// @param {List} $colors -
111
- /// List of colors to be equally spaced from `0%` to `100%`
112
- /// in each column rectangle
113
- ///
114
- /// @return {String} -
115
- /// Escaped string representing one svg gradient
116
- /// (`id="susy-svg-gradient"`)
117
- @function _susy-svg-gradient(
118
- $colors
119
- ) {
120
- $gradient: '%3Cdefs%3E%3ClinearGradient spreadMethod="pad"';
121
- $gradient: '#{$gradient} id="susy-svg-gradient"';
122
- $gradient: '#{$gradient} x1="0%" y1="0%" x2="100%" y2="0%"%3E';
123
-
124
- @for $i from 1 through length($colors) {
125
- $color: _susy-svg-color(nth($colors, $i));
126
- $offset: percentage(($i - 1) / (length($colors) - 1));
127
- $stop: '%3Cstop offset="#{$offset}" style="stop-color:#{$color};" /%3E';
128
-
129
- $gradient: $gradient + $stop;
130
- }
131
-
132
- @return $gradient + '%3C/linearGradient%3E%3C/defs%3E';
133
- }
1
+ // SVG Utilities
2
+ // =============
3
+
4
+
5
+
6
+ // SVG Validate Units
7
+ // ------------------
8
+ /// Make sure a length is supported in svg
9
+ ///
10
+ /// @access private
11
+ ///
12
+ /// @param {Length} $length -
13
+ /// The length to validate
14
+ /// @param {String} $name [null] -
15
+ /// Optional name of length origin,
16
+ /// for error reporting
17
+ ///
18
+ /// @return {Length} -
19
+ /// An svg-validated length, or comparable valid length
20
+ @function _susy-svg-validate-units(
21
+ $length,
22
+ $name: null
23
+ ) {
24
+ $_svg-units: ('em', 'ex', 'px', 'pt', 'pc', 'cm', 'mm', 'in', '%');
25
+ $string: type-of($length) == 'string';
26
+
27
+ @if ($length == 0) or ($string) or index($_svg-units, unit($length)) {
28
+ @return $length;
29
+ }
30
+
31
+ @return _susy-error(
32
+ '`#{unit($length)}` #{$name} units are not supported in SVG',
33
+ '_susy-svg-validate-units');
34
+ }
35
+
36
+
37
+
38
+ // SVG Rect
39
+ // --------
40
+ /// Build a single svg rectangle
41
+ ///
42
+ /// @access private
43
+ ///
44
+ /// @param {Length} $x -
45
+ /// Horizontal position for the rectangle
46
+ /// @param {Length} $width -
47
+ /// Width of the rectangle
48
+ /// @param {Length} $offset [null] -
49
+ /// Offset the rectangle, to account for edge gutters
50
+ ///
51
+ /// @return {String} -
52
+ /// Escaped string representing one svg rectangle
53
+ @function _susy-svg-rect(
54
+ $x,
55
+ $width,
56
+ $offset: null
57
+ ) {
58
+ $x: _susy-svg-validate-units($x);
59
+ $width: _susy-svg-validate-units($width);
60
+ $offset: if($offset == 0, null, $offset);
61
+
62
+ @if (type-of($offset) == 'number') and (type-of($x) == 'number') {
63
+ @if comparable($x, $offset) {
64
+ $x: $x + $offset;
65
+ } @else {
66
+ $x: 'calc(#{$x} + #{$offset})';
67
+ }
68
+ } @else if $offset and ($x != 0) {
69
+ $x: 'calc(#{$x} + #{$offset})';
70
+ } @else if $offset {
71
+ $x: $offset;
72
+ }
73
+
74
+ @return '%3Crect x="#{$x}" width="#{$width}" height="100%"/%3E';
75
+ }
76
+
77
+
78
+
79
+ // SVG Color
80
+ // ---------
81
+ /// Stringify colors, and escape hex symbol
82
+ ///
83
+ /// @access private
84
+ ///
85
+ /// @param {Color} $color -
86
+ /// Color to stringify and escape
87
+ ///
88
+ /// @return {String} -
89
+ /// Escaped string value of color
90
+ @function _susy-svg-color(
91
+ $color
92
+ ) {
93
+ $color: inspect($color); // convert to string
94
+
95
+ @if (str-index($color, '#') == 1) {
96
+ $color: '%23' + str-slice($color, 2);
97
+ }
98
+
99
+ @return $color;
100
+ }
101
+
102
+
103
+
104
+ // SVG Gradient
105
+ // ------------
106
+ /// Create a multi-color svg gradient
107
+ ///
108
+ /// @access private
109
+ ///
110
+ /// @param {List} $colors -
111
+ /// List of colors to be equally spaced from `0%` to `100%`
112
+ /// in each column rectangle
113
+ ///
114
+ /// @return {String} -
115
+ /// Escaped string representing one svg gradient
116
+ /// (`id="susy-svg-gradient"`)
117
+ @function _susy-svg-gradient(
118
+ $colors
119
+ ) {
120
+ $gradient: '%3Cdefs%3E%3ClinearGradient spreadMethod="pad"';
121
+ $gradient: '#{$gradient} id="susy-svg-gradient"';
122
+ $gradient: '#{$gradient} x1="0%" y1="0%" x2="100%" y2="0%"%3E';
123
+
124
+ @for $i from 1 through length($colors) {
125
+ $color: _susy-svg-color(nth($colors, $i));
126
+ $offset: percentage(($i - 1) / (length($colors) - 1));
127
+ $stop: '%3Cstop offset="#{$offset}" style="stop-color:#{$color};" /%3E';
128
+
129
+ $gradient: $gradient + $stop;
130
+ }
131
+
132
+ @return $gradient + '%3C/linearGradient%3E%3C/defs%3E';
133
+ }
@@ -1,318 +1,318 @@
1
- /// Susy3 API Functions
2
- /// ===================
3
- /// These three functions form the core of Susy's
4
- /// layout-building grid API.
5
- ///
6
- /// - Use `span()` and `gutter()` to return any grid-width,
7
- /// and apply the results wherever you need them:
8
- /// CSS `width`, `margin`, `padding`, `flex-basis`, `transform`, etc.
9
- /// - For asymmetrical-fluid grids,
10
- /// `slice()` can help manage your nesting context.
11
- ///
12
- /// All three functions come with an unprefixed alias by default,
13
- /// using the `susy` import.
14
- /// Import the `susy-prefix` partial instead,
15
- /// if you only only want prefixed versions of the API.
16
- ///
17
- /// This is a thin syntax-sugar shell around
18
- /// the "Su" core-math functions: `su-span`, `su-gutter`, and `su-slice`.
19
- /// If you prefer the more constrained syntax of the math engine,
20
- /// you are welcome to use those functions instead.
21
- ///
22
- /// @group b-api
23
- /// @see susy-span
24
- /// @see susy-gutter
25
- /// @see susy-slice
26
- /// @see su-span
27
- /// @see su-gutter
28
- /// @see su-slice
29
-
30
-
31
-
32
- /// ## Shorthand
33
- ///
34
- /// All functions draw on the same shorthand syntax in two parts,
35
- /// seperated by the word `of`.
36
- ///
37
- /// ### Span Syntax: `<width>` [`<location>` `<spread>`]
38
- /// The first part describes the
39
- /// **span** width, location, and spread in any order.
40
- /// Only the width is required:
41
- ///
42
- /// - `span(2)` will return the width of 2 columns.
43
- /// - `span(3 wide)` will return 3-columns, with an additional gutter.
44
- /// - location is only needed with asymmetrical grids,
45
- /// where `span(3 at 2)` will return the width of
46
- /// specific columns on the grid.
47
- /// Since these are functions, they will not handle placement for you.
48
- ///
49
- /// ### Context Syntax: `[of <columns> <container-spread> <gutters>]`
50
- /// The second half of Susy's shorthand
51
- /// describes the grid-**context** –
52
- /// available columns, container-spread, and optional gutter override –
53
- /// in any order.
54
- /// All of these settings have globally-defined defaults:
55
- ///
56
- /// - `span(2 of 6)` will set the context to
57
- /// a slice of 6 columns from the global grid.
58
- /// More details below.
59
- /// - `span(2 of 12 wide)` changes the container-spread
60
- /// as well as the column-context.
61
- /// - `span(2 of 12 set-gutters 0.5em)`
62
- /// will override the global gutters setting
63
- /// for this one calculation.
64
- ///
65
- /// A single unitless number for `columns`
66
- /// will be treated as a slice of the parent grid.
67
- /// On a grid with `columns: susy-repeat(12, 120px)`,
68
- /// the shorthand `of 4` will use the parent `120px` column-width.
69
- /// You can also be more explicit,
70
- /// and say `of susy-repeat(4, 100px)`.
71
- /// If you are using asymmetrical grids,
72
- /// like `columns: (1 1 2 3 5 8)`,
73
- /// Susy can't slice it for you without knowing which columns you want.
74
- /// The `slice` function accepts exactly the same syntax as `span`,
75
- /// but returns a list of columns rather than a width.
76
- /// Use it in your context like `of slice(first 3)`.
77
- ///
78
- /// @group b-api
79
-
80
-
81
-
82
- // Susy Span
83
- // ---------
84
- /// This is the primary function in Susy —
85
- /// used to return the width of a span across one or more columns,
86
- /// and any relevant gutters along the way.
87
- /// With the default settings,
88
- /// `span(3)` will return the width of 3 columns,
89
- /// and the 2 intermediate gutters.
90
- /// This can be used to set the `width` property of grid elements,
91
- /// or `margin` and `padding`
92
- /// to push, pull, and pad your elements.
93
- ///
94
- /// - This is a thin syntax-sugar shell around
95
- /// the core-math `su-span()` function.
96
- /// - The un-prefixed alias `span()` is available by default.
97
- ///
98
- /// @group b-api
99
- /// @see su-span
100
- /// @see $susy
101
- ///
102
- /// @param {list} $span -
103
- /// Shorthand expression to define the width of the span,
104
- /// optionally containing:
105
- /// - a count, length, or column-list span.
106
- /// - `at $n`, `first`, or `last` location on asymmetrical grids,
107
- /// where `at 1 == first`,
108
- /// and `last` will calculate the proper location
109
- /// based on columns and span.
110
- /// - `narrow`, `wide`, or `wider` for optionally spreading
111
- /// across adjacent gutters.
112
- /// - `of $n <spread>` for available grid columns
113
- /// and spread of the container.
114
- /// Span counts like `of 6` are valid
115
- /// in the context of symmetrical grids,
116
- /// where Susy can safely infer a slice of the parent columns.
117
- /// - and `set-gutters $n` to override global gutter settings.
118
- ///
119
- /// @param {map} $config [()] -
120
- /// Optional map of Susy grid configuration settings.
121
- /// See `$susy` documentation for details.
122
- ///
123
- /// @return {length} -
124
- /// Calculated length value, using the units given,
125
- /// or converting to `%` for fraction-based grids,
126
- /// or a full `calc` function when units/fractions
127
- /// are not comparable outside the browser.
128
- ///
129
- /// @example scss - span half the grid
130
- /// .foo {
131
- /// // the result is a bit under 50% to account for gutters
132
- /// width: susy-span(6 of 12);
133
- /// }
134
- ///
135
- /// @example scss - span a specific segment of asymmetrical grid
136
- /// .foo {
137
- /// width: susy-span(3 at 3 of (1 2 3 5 8));
138
- /// }
139
- @function susy-span(
140
- $span,
141
- $config: ()
142
- ) {
143
- $output: susy-compile($span, $config);
144
-
145
- @if map-get($output, 'span') {
146
- @return su-call('su-span', $output);
147
- }
148
-
149
- $actual: '[#{type-of($span)}] `#{inspect($span)}`';
150
- @return _susy-error(
151
- 'Unable to determine span value from #{$actual}.',
152
- 'susy-span');
153
- }
154
-
155
-
156
-
157
- // Susy Gutter
158
- // -----------
159
- /// The gutter function returns
160
- /// the width of a single gutter on your grid,
161
- /// to be applied where you see fit –
162
- /// on `margins`, `padding`, `transform`, or element `width`.
163
- ///
164
- /// - This is a thin syntax-sugar shell around
165
- /// the core-math `su-gutter()` function.
166
- /// - The un-prefixed alias `gutter()` is available by default.
167
- ///
168
- /// @group b-api
169
- /// @see su-gutter
170
- /// @see $susy
171
- ///
172
- /// @param {list | number} $context [null] -
173
- /// Optional context for nested gutters,
174
- /// including shorthand for
175
- /// `columns`, `gutters`, and `container-spread`
176
- /// (additional shorthand will be ignored)
177
- ///
178
- /// @param {map} $config [()] -
179
- /// Optional map of Susy grid configuration settings.
180
- /// See `$susy` documentation for details.
181
- ///
182
- /// @return {length} -
183
- /// Width of a gutter as `%` of current context,
184
- /// or in the units defined by `column-width` when available
185
- ///
186
- /// @example scss - add gutters before or after an element
187
- /// .floats {
188
- /// float: left;
189
- /// width: span(3 of 6);
190
- /// margin-left: gutter(of 6);
191
- /// }
192
- ///
193
- /// @example scss - add gutters to padding
194
- /// .flexbox {
195
- /// flex: 1 1 span(3 wide of 6 wide);
196
- /// padding: gutter(of 6) / 2;
197
- /// }
198
- ///
199
- @function susy-gutter(
200
- $context: susy-get('columns'),
201
- $config: ()
202
- ) {
203
- $context: susy-compile($context, $config, 'context-only');
204
-
205
- @return su-call('su-gutter', $context);
206
- }
207
-
208
-
209
-
210
- // Susy Slice
211
- // ----------
212
- /// Working with asymmetrical grids (un-equal column widths)
213
- /// can be challenging – 
214
- /// expecially when they involve fluid/fractional elements.
215
- /// Describing a context `of (15em 6em 6em 6em 15em)` is a lot
216
- /// to put inside the span or gutter function shorthand.
217
- /// This slice function returns a sub-slice of asymmetrical columns to use
218
- /// for a nested context.
219
- /// `slice(3 at 2)` will give you a subset of the global grid,
220
- /// spanning 3 columns, starting with the second.
221
- ///
222
- /// - This is a thin syntax-sugar shell around
223
- /// the core-math `su-slice()` function.
224
- /// - The un-prefixed alias `slice()` is available by default.
225
- ///
226
- /// @group b-api
227
- /// @see su-slice
228
- /// @see $susy
229
- ///
230
- /// @param {list} $span -
231
- /// Shorthand expression to define the subset span, optionally containing:
232
- /// - `at $n`, `first`, or `last` location on asymmetrical grids;
233
- /// - `of $n <spread>` for available grid columns
234
- /// and spread of the container
235
- /// - Span-counts like `of 6` are only valid
236
- /// in the context of symmetrical grids
237
- /// - Valid spreads include `narrow`, `wide`, or `wider`
238
- ///
239
- /// @param {map} $config [()] -
240
- /// Optional map of Susy grid configuration settings.
241
- /// See `$susy` documentation for details.
242
- ///
243
- /// @return {list} -
244
- /// Subset list of columns for use for a nested context
245
- ///
246
- /// @example scss - Return a nested segment of asymmetrical grid
247
- /// $context: susy-slice(3 at 3 of (1 2 3 5 8));
248
- /// /* $context: #{$context}; */
249
- @function susy-slice(
250
- $span,
251
- $config: ()
252
- ) {
253
- $span: susy-compile($span, $config);
254
-
255
- @return su-call('su-slice', $span);
256
- }
257
-
258
-
259
-
260
- /// ## Building Grids
261
- /// The web has come a long way
262
- /// since the days of double-margin-hacks
263
- /// and inconsistent subpixel rounding.
264
- /// In addition to floats and tables,
265
- /// we can now use much more powerful tools,
266
- /// like flexbox and CSS grid,
267
- /// to build more interesting and responsive layouts.
268
- ///
269
- /// With Susy3, we hope you'll start moving in that direction.
270
- /// You can still build classic 12-column Grid Systems,
271
- /// and we'll help you get there,
272
- /// but Susy3 is primarily designed for a grid-math-on-demand
273
- /// approach to layout:
274
- /// applying our functions only where you really need grid math.
275
- /// Read the [intro article by OddBird][welcome] for more details.
276
- ///
277
- /// [welcome]: http://oddbird.net/2017/06/28/susy3/
278
- ///
279
- /// @group b-api
280
- /// @link http://oddbird.net/2017/06/28/susy3/ Article: Welcome to Susy3
281
- ///
282
- /// @example scss - floats
283
- /// .float {
284
- /// width: span(3);
285
- /// margin-right: gutter();
286
- /// }
287
- ///
288
- /// @example scss - flexbox
289
- /// .flexbox {
290
- /// flex: 1 1 span(3);
291
- /// // half a gutter on either side…
292
- /// padding: 0 gutter() / 2;
293
- /// }
294
- ///
295
- /// @example scss - pushing and pulling
296
- /// .push-3 {
297
- /// margin-left: span(3 wide);
298
- /// }
299
- ///
300
- /// .pull-3 {
301
- /// margin-left: 0 - span(3 wide);
302
- /// }
303
- ///
304
- /// @example scss - building an attribute system
305
- /// // markup example: <div data-span="last 3"></div>
306
- /// [data-span] {
307
- /// float: left;
308
- ///
309
- /// &:not([data-span*='last']) {
310
- /// margin-right: gutter();
311
- /// }
312
- /// }
313
- ///
314
- /// @for $span from 1 through length(susy-get('columns')) {
315
- /// [data-span*='#{$span}'] {
316
- /// width: span($span);
317
- /// }
318
- /// }
1
+ /// Susy3 API Functions
2
+ /// ===================
3
+ /// These three functions form the core of Susy's
4
+ /// layout-building grid API.
5
+ ///
6
+ /// - Use `span()` and `gutter()` to return any grid-width,
7
+ /// and apply the results wherever you need them:
8
+ /// CSS `width`, `margin`, `padding`, `flex-basis`, `transform`, etc.
9
+ /// - For asymmetrical-fluid grids,
10
+ /// `slice()` can help manage your nesting context.
11
+ ///
12
+ /// All three functions come with an unprefixed alias by default,
13
+ /// using the `susy` import.
14
+ /// Import the `susy-prefix` partial instead,
15
+ /// if you only only want prefixed versions of the API.
16
+ ///
17
+ /// This is a thin syntax-sugar shell around
18
+ /// the "Su" core-math functions: `su-span`, `su-gutter`, and `su-slice`.
19
+ /// If you prefer the more constrained syntax of the math engine,
20
+ /// you are welcome to use those functions instead.
21
+ ///
22
+ /// @group b-api
23
+ /// @see susy-span
24
+ /// @see susy-gutter
25
+ /// @see susy-slice
26
+ /// @see su-span
27
+ /// @see su-gutter
28
+ /// @see su-slice
29
+
30
+
31
+
32
+ /// ## Shorthand
33
+ ///
34
+ /// All functions draw on the same shorthand syntax in two parts,
35
+ /// seperated by the word `of`.
36
+ ///
37
+ /// ### Span Syntax: `<width>` [`<location>` `<spread>`]
38
+ /// The first part describes the
39
+ /// **span** width, location, and spread in any order.
40
+ /// Only the width is required:
41
+ ///
42
+ /// - `span(2)` will return the width of 2 columns.
43
+ /// - `span(3 wide)` will return 3-columns, with an additional gutter.
44
+ /// - location is only needed with asymmetrical grids,
45
+ /// where `span(3 at 2)` will return the width of
46
+ /// specific columns on the grid.
47
+ /// Since these are functions, they will not handle placement for you.
48
+ ///
49
+ /// ### Context Syntax: `[of <columns> <container-spread> <gutters>]`
50
+ /// The second half of Susy's shorthand
51
+ /// describes the grid-**context** –
52
+ /// available columns, container-spread, and optional gutter override –
53
+ /// in any order.
54
+ /// All of these settings have globally-defined defaults:
55
+ ///
56
+ /// - `span(2 of 6)` will set the context to
57
+ /// a slice of 6 columns from the global grid.
58
+ /// More details below.
59
+ /// - `span(2 of 12 wide)` changes the container-spread
60
+ /// as well as the column-context.
61
+ /// - `span(2 of 12 set-gutters 0.5em)`
62
+ /// will override the global gutters setting
63
+ /// for this one calculation.
64
+ ///
65
+ /// A single unitless number for `columns`
66
+ /// will be treated as a slice of the parent grid.
67
+ /// On a grid with `columns: susy-repeat(12, 120px)`,
68
+ /// the shorthand `of 4` will use the parent `120px` column-width.
69
+ /// You can also be more explicit,
70
+ /// and say `of susy-repeat(4, 100px)`.
71
+ /// If you are using asymmetrical grids,
72
+ /// like `columns: (1 1 2 3 5 8)`,
73
+ /// Susy can't slice it for you without knowing which columns you want.
74
+ /// The `slice` function accepts exactly the same syntax as `span`,
75
+ /// but returns a list of columns rather than a width.
76
+ /// Use it in your context like `of slice(first 3)`.
77
+ ///
78
+ /// @group b-api
79
+
80
+
81
+
82
+ // Susy Span
83
+ // ---------
84
+ /// This is the primary function in Susy —
85
+ /// used to return the width of a span across one or more columns,
86
+ /// and any relevant gutters along the way.
87
+ /// With the default settings,
88
+ /// `span(3)` will return the width of 3 columns,
89
+ /// and the 2 intermediate gutters.
90
+ /// This can be used to set the `width` property of grid elements,
91
+ /// or `margin` and `padding`
92
+ /// to push, pull, and pad your elements.
93
+ ///
94
+ /// - This is a thin syntax-sugar shell around
95
+ /// the core-math `su-span()` function.
96
+ /// - The un-prefixed alias `span()` is available by default.
97
+ ///
98
+ /// @group b-api
99
+ /// @see su-span
100
+ /// @see $susy
101
+ ///
102
+ /// @param {list} $span -
103
+ /// Shorthand expression to define the width of the span,
104
+ /// optionally containing:
105
+ /// - a count, length, or column-list span.
106
+ /// - `at $n`, `first`, or `last` location on asymmetrical grids,
107
+ /// where `at 1 == first`,
108
+ /// and `last` will calculate the proper location
109
+ /// based on columns and span.
110
+ /// - `narrow`, `wide`, or `wider` for optionally spreading
111
+ /// across adjacent gutters.
112
+ /// - `of $n <spread>` for available grid columns
113
+ /// and spread of the container.
114
+ /// Span counts like `of 6` are valid
115
+ /// in the context of symmetrical grids,
116
+ /// where Susy can safely infer a slice of the parent columns.
117
+ /// - and `set-gutters $n` to override global gutter settings.
118
+ ///
119
+ /// @param {map} $config [()] -
120
+ /// Optional map of Susy grid configuration settings.
121
+ /// See `$susy` documentation for details.
122
+ ///
123
+ /// @return {length} -
124
+ /// Calculated length value, using the units given,
125
+ /// or converting to `%` for fraction-based grids,
126
+ /// or a full `calc` function when units/fractions
127
+ /// are not comparable outside the browser.
128
+ ///
129
+ /// @example scss - span half the grid
130
+ /// .foo {
131
+ /// // the result is a bit under 50% to account for gutters
132
+ /// width: susy-span(6 of 12);
133
+ /// }
134
+ ///
135
+ /// @example scss - span a specific segment of asymmetrical grid
136
+ /// .foo {
137
+ /// width: susy-span(3 at 3 of (1 2 3 5 8));
138
+ /// }
139
+ @function susy-span(
140
+ $span,
141
+ $config: ()
142
+ ) {
143
+ $output: susy-compile($span, $config);
144
+
145
+ @if map-get($output, 'span') {
146
+ @return su-call('su-span', $output);
147
+ }
148
+
149
+ $actual: '[#{type-of($span)}] `#{inspect($span)}`';
150
+ @return _susy-error(
151
+ 'Unable to determine span value from #{$actual}.',
152
+ 'susy-span');
153
+ }
154
+
155
+
156
+
157
+ // Susy Gutter
158
+ // -----------
159
+ /// The gutter function returns
160
+ /// the width of a single gutter on your grid,
161
+ /// to be applied where you see fit –
162
+ /// on `margins`, `padding`, `transform`, or element `width`.
163
+ ///
164
+ /// - This is a thin syntax-sugar shell around
165
+ /// the core-math `su-gutter()` function.
166
+ /// - The un-prefixed alias `gutter()` is available by default.
167
+ ///
168
+ /// @group b-api
169
+ /// @see su-gutter
170
+ /// @see $susy
171
+ ///
172
+ /// @param {list | number} $context [null] -
173
+ /// Optional context for nested gutters,
174
+ /// including shorthand for
175
+ /// `columns`, `gutters`, and `container-spread`
176
+ /// (additional shorthand will be ignored)
177
+ ///
178
+ /// @param {map} $config [()] -
179
+ /// Optional map of Susy grid configuration settings.
180
+ /// See `$susy` documentation for details.
181
+ ///
182
+ /// @return {length} -
183
+ /// Width of a gutter as `%` of current context,
184
+ /// or in the units defined by `column-width` when available
185
+ ///
186
+ /// @example scss - add gutters before or after an element
187
+ /// .floats {
188
+ /// float: left;
189
+ /// width: span(3 of 6);
190
+ /// margin-left: gutter(of 6);
191
+ /// }
192
+ ///
193
+ /// @example scss - add gutters to padding
194
+ /// .flexbox {
195
+ /// flex: 1 1 span(3 wide of 6 wide);
196
+ /// padding: gutter(of 6) / 2;
197
+ /// }
198
+ ///
199
+ @function susy-gutter(
200
+ $context: susy-get('columns'),
201
+ $config: ()
202
+ ) {
203
+ $context: susy-compile($context, $config, 'context-only');
204
+
205
+ @return su-call('su-gutter', $context);
206
+ }
207
+
208
+
209
+
210
+ // Susy Slice
211
+ // ----------
212
+ /// Working with asymmetrical grids (un-equal column widths)
213
+ /// can be challenging – 
214
+ /// expecially when they involve fluid/fractional elements.
215
+ /// Describing a context `of (15em 6em 6em 6em 15em)` is a lot
216
+ /// to put inside the span or gutter function shorthand.
217
+ /// This slice function returns a sub-slice of asymmetrical columns to use
218
+ /// for a nested context.
219
+ /// `slice(3 at 2)` will give you a subset of the global grid,
220
+ /// spanning 3 columns, starting with the second.
221
+ ///
222
+ /// - This is a thin syntax-sugar shell around
223
+ /// the core-math `su-slice()` function.
224
+ /// - The un-prefixed alias `slice()` is available by default.
225
+ ///
226
+ /// @group b-api
227
+ /// @see su-slice
228
+ /// @see $susy
229
+ ///
230
+ /// @param {list} $span -
231
+ /// Shorthand expression to define the subset span, optionally containing:
232
+ /// - `at $n`, `first`, or `last` location on asymmetrical grids;
233
+ /// - `of $n <spread>` for available grid columns
234
+ /// and spread of the container
235
+ /// - Span-counts like `of 6` are only valid
236
+ /// in the context of symmetrical grids
237
+ /// - Valid spreads include `narrow`, `wide`, or `wider`
238
+ ///
239
+ /// @param {map} $config [()] -
240
+ /// Optional map of Susy grid configuration settings.
241
+ /// See `$susy` documentation for details.
242
+ ///
243
+ /// @return {list} -
244
+ /// Subset list of columns for use for a nested context
245
+ ///
246
+ /// @example scss - Return a nested segment of asymmetrical grid
247
+ /// $context: susy-slice(3 at 3 of (1 2 3 5 8));
248
+ /// /* $context: #{$context}; */
249
+ @function susy-slice(
250
+ $span,
251
+ $config: ()
252
+ ) {
253
+ $span: susy-compile($span, $config);
254
+
255
+ @return su-call('su-slice', $span);
256
+ }
257
+
258
+
259
+
260
+ /// ## Building Grids
261
+ /// The web has come a long way
262
+ /// since the days of double-margin-hacks
263
+ /// and inconsistent subpixel rounding.
264
+ /// In addition to floats and tables,
265
+ /// we can now use much more powerful tools,
266
+ /// like flexbox and CSS grid,
267
+ /// to build more interesting and responsive layouts.
268
+ ///
269
+ /// With Susy3, we hope you'll start moving in that direction.
270
+ /// You can still build classic 12-column Grid Systems,
271
+ /// and we'll help you get there,
272
+ /// but Susy3 is primarily designed for a grid-math-on-demand
273
+ /// approach to layout:
274
+ /// applying our functions only where you really need grid math.
275
+ /// Read the [intro article by OddBird][welcome] for more details.
276
+ ///
277
+ /// [welcome]: http://oddbird.net/2017/06/28/susy3/
278
+ ///
279
+ /// @group b-api
280
+ /// @link http://oddbird.net/2017/06/28/susy3/ Article: Welcome to Susy3
281
+ ///
282
+ /// @example scss - floats
283
+ /// .float {
284
+ /// width: span(3);
285
+ /// margin-right: gutter();
286
+ /// }
287
+ ///
288
+ /// @example scss - flexbox
289
+ /// .flexbox {
290
+ /// flex: 1 1 span(3);
291
+ /// // half a gutter on either side…
292
+ /// padding: 0 gutter() / 2;
293
+ /// }
294
+ ///
295
+ /// @example scss - pushing and pulling
296
+ /// .push-3 {
297
+ /// margin-left: span(3 wide);
298
+ /// }
299
+ ///
300
+ /// .pull-3 {
301
+ /// margin-left: 0 - span(3 wide);
302
+ /// }
303
+ ///
304
+ /// @example scss - building an attribute system
305
+ /// // markup example: <div data-span="last 3"></div>
306
+ /// [data-span] {
307
+ /// float: left;
308
+ ///
309
+ /// &:not([data-span*='last']) {
310
+ /// margin-right: gutter();
311
+ /// }
312
+ /// }
313
+ ///
314
+ /// @for $span from 1 through length(susy-get('columns')) {
315
+ /// [data-span*='#{$span}'] {
316
+ /// width: span($span);
317
+ /// }
318
+ /// }