jekyll-theme-basically-basic 1.3.1 → 1.4.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (160) hide show
  1. checksums.yaml +4 -4
  2. data/CHANGELOG.md +18 -0
  3. data/README.md +150 -42
  4. data/_includes/author +30 -30
  5. data/_includes/contact-list.html +27 -27
  6. data/_includes/cv/awards.html +23 -23
  7. data/_includes/cv/basics.html +68 -68
  8. data/_includes/cv/education.html +36 -36
  9. data/_includes/cv/interests.html +19 -19
  10. data/_includes/cv/intro.html +18 -18
  11. data/_includes/cv/languages.html +19 -19
  12. data/_includes/cv/publications.html +29 -29
  13. data/_includes/cv/references.html +23 -23
  14. data/_includes/cv/volunteer.html +46 -46
  15. data/_includes/cv/work.html +46 -46
  16. data/_includes/disqus_comments.html +16 -16
  17. data/_includes/documents-collection.html +19 -0
  18. data/_includes/entry.html +37 -29
  19. data/_includes/footer.html +11 -9
  20. data/_includes/google-analytics.html +8 -8
  21. data/_includes/head.html +35 -35
  22. data/_includes/icon-bitbucket.html +4 -4
  23. data/_includes/icon-codepen.html +4 -4
  24. data/_includes/icon-dribbble.html +4 -4
  25. data/_includes/icon-facebook.html +4 -4
  26. data/_includes/icon-flickr.html +4 -4
  27. data/_includes/icon-github.html +4 -4
  28. data/_includes/icon-gitlab.html +4 -4
  29. data/_includes/icon-googleplus.html +4 -4
  30. data/_includes/icon-instagram.html +4 -4
  31. data/_includes/icon-lastfm.html +4 -4
  32. data/_includes/icon-linkedin.html +4 -4
  33. data/_includes/icon-pinterest.html +4 -4
  34. data/_includes/icon-soundcloud.html +4 -4
  35. data/_includes/icon-stackoverflow.html +4 -4
  36. data/_includes/icon-tumblr.html +4 -4
  37. data/_includes/icon-twitter.html +4 -4
  38. data/_includes/icon-xing.html +4 -4
  39. data/_includes/icon-youtube.html +4 -4
  40. data/_includes/masthead.html +27 -27
  41. data/_includes/navigation.html +25 -25
  42. data/_includes/page-intro.html +42 -42
  43. data/_includes/page-tags.html +14 -0
  44. data/_includes/posts-all.html +2 -2
  45. data/_includes/posts-category.html +3 -0
  46. data/_includes/posts-paginated.html +15 -15
  47. data/_includes/posts-tag.html +3 -0
  48. data/_includes/read-time.html +13 -13
  49. data/_includes/search-form.html +14 -13
  50. data/_includes/search/algolia-search-scripts.html +52 -52
  51. data/_includes/search/lunr-search-scripts.html +1 -1
  52. data/_includes/skip-links.html +8 -8
  53. data/_layouts/about.html +0 -2
  54. data/_layouts/categories.html +48 -0
  55. data/_layouts/category.html +9 -0
  56. data/_layouts/collection.html +9 -0
  57. data/_layouts/cv.html +28 -28
  58. data/_layouts/default.html +2 -1
  59. data/_layouts/home.html +28 -30
  60. data/_layouts/page.html +15 -17
  61. data/_layouts/post.html +18 -20
  62. data/_layouts/posts.html +29 -0
  63. data/_layouts/tag.html +9 -0
  64. data/_layouts/tags.html +48 -0
  65. data/_sass/basically-basic.scss +1 -1
  66. data/_sass/basically-basic/_base.scss +116 -118
  67. data/_sass/basically-basic/_contact-lists.scss +11 -11
  68. data/_sass/basically-basic/_entries.scss +230 -152
  69. data/_sass/basically-basic/_footer.scss +37 -13
  70. data/_sass/basically-basic/_functions.scss +2 -2
  71. data/_sass/basically-basic/_global.scss +116 -42
  72. data/_sass/basically-basic/_icons.scss +43 -43
  73. data/_sass/basically-basic/_intro.scss +3 -1
  74. data/_sass/basically-basic/_layout.scss +188 -188
  75. data/_sass/basically-basic/_mixins.scss +5 -5
  76. data/_sass/basically-basic/_navicons.scss +148 -148
  77. data/_sass/basically-basic/_navigation.scss +66 -66
  78. data/_sass/basically-basic/_print.scss +252 -252
  79. data/_sass/basically-basic/_reset.scss +522 -522
  80. data/_sass/basically-basic/_responsive-embed.scss +70 -70
  81. data/_sass/basically-basic/_search.scss +101 -101
  82. data/_sass/basically-basic/_sidebar.scss +166 -166
  83. data/_sass/basically-basic/_tables.scss +34 -34
  84. data/_sass/basically-basic/_utilities.scss +6 -6
  85. data/_sass/basically-basic/_variables.scss +3 -0
  86. data/_sass/basically-basic/functions/_color.scss +21 -21
  87. data/_sass/basically-basic/functions/_fluid-type.scss +33 -33
  88. data/_sass/basically-basic/mixins/_clearfix.scss +11 -11
  89. data/_sass/basically-basic/mixins/_float.scss +15 -15
  90. data/_sass/basically-basic/mixins/_image.scss +38 -38
  91. data/_sass/basically-basic/mixins/_lists.scss +9 -9
  92. data/_sass/basically-basic/mixins/_text-truncate.scss +10 -10
  93. data/_sass/basically-basic/themes/_default.scss +5 -5
  94. data/_sass/basically-basic/themes/_night.scss +12 -12
  95. data/_sass/basically-basic/themes/_plum.scss +12 -12
  96. data/_sass/basically-basic/themes/_sea.scss +12 -12
  97. data/_sass/basically-basic/utilities/_accessibility.scss +43 -43
  98. data/_sass/basically-basic/utilities/_align.scss +62 -62
  99. data/_sass/basically-basic/utilities/_clearfix.scss +7 -7
  100. data/_sass/basically-basic/utilities/_float.scss +7 -7
  101. data/_sass/basically-basic/utilities/_text.scss +28 -28
  102. data/_sass/basically-basic/utilities/_visibility.scss +32 -32
  103. data/_sass/basically-basic/vendor/breakpoint/_breakpoint.scss +114 -114
  104. data/_sass/basically-basic/vendor/breakpoint/_context.scss +94 -94
  105. data/_sass/basically-basic/vendor/breakpoint/_helpers.scss +151 -151
  106. data/_sass/basically-basic/vendor/breakpoint/_legacy-settings.scss +49 -49
  107. data/_sass/basically-basic/vendor/breakpoint/_no-query.scss +15 -15
  108. data/_sass/basically-basic/vendor/breakpoint/_parsers.scss +215 -215
  109. data/_sass/basically-basic/vendor/breakpoint/_respond-to.scss +82 -82
  110. data/_sass/basically-basic/vendor/breakpoint/_settings.scss +70 -70
  111. data/_sass/basically-basic/vendor/breakpoint/parsers/_double.scss +33 -33
  112. data/_sass/basically-basic/vendor/breakpoint/parsers/_query.scss +82 -82
  113. data/_sass/basically-basic/vendor/breakpoint/parsers/_resolution.scss +31 -31
  114. data/_sass/basically-basic/vendor/breakpoint/parsers/_single.scss +26 -26
  115. data/_sass/basically-basic/vendor/breakpoint/parsers/_triple.scss +36 -36
  116. data/_sass/basically-basic/vendor/breakpoint/parsers/double/_default-pair.scss +21 -21
  117. data/_sass/basically-basic/vendor/breakpoint/parsers/double/_default.scss +22 -22
  118. data/_sass/basically-basic/vendor/breakpoint/parsers/double/_double-string.scss +21 -21
  119. data/_sass/basically-basic/vendor/breakpoint/parsers/resolution/_resolution.scss +60 -60
  120. data/_sass/basically-basic/vendor/breakpoint/parsers/single/_default.scss +13 -13
  121. data/_sass/basically-basic/vendor/breakpoint/parsers/triple/_default.scss +18 -18
  122. data/_sass/basically-basic/vendor/susy/_su.scss +4 -4
  123. data/_sass/basically-basic/vendor/susy/_susy-prefix.scss +13 -13
  124. data/_sass/basically-basic/vendor/susy/_susy.scss +5 -5
  125. data/_sass/basically-basic/vendor/susy/plugins/_svg-grid.scss +5 -5
  126. data/_sass/basically-basic/vendor/susy/plugins/svg-grid/_prefix.scss +7 -7
  127. data/_sass/basically-basic/vendor/susy/plugins/svg-grid/_svg-api.scss +114 -114
  128. data/_sass/basically-basic/vendor/susy/plugins/svg-grid/_svg-grid-math.scss +67 -67
  129. data/_sass/basically-basic/vendor/susy/plugins/svg-grid/_svg-settings.scss +14 -14
  130. data/_sass/basically-basic/vendor/susy/plugins/svg-grid/_svg-unprefix.scss +18 -18
  131. data/_sass/basically-basic/vendor/susy/plugins/svg-grid/_svg-utilities.scss +133 -133
  132. data/_sass/basically-basic/vendor/susy/susy/_api.scss +318 -318
  133. data/_sass/basically-basic/vendor/susy/susy/_normalize.scss +261 -261
  134. data/_sass/basically-basic/vendor/susy/susy/_parse.scss +163 -163
  135. data/_sass/basically-basic/vendor/susy/susy/_settings.scss +329 -329
  136. data/_sass/basically-basic/vendor/susy/susy/_su-math.scss +441 -441
  137. data/_sass/basically-basic/vendor/susy/susy/_su-validate.scss +213 -213
  138. data/_sass/basically-basic/vendor/susy/susy/_syntax-helpers.scss +191 -191
  139. data/_sass/basically-basic/vendor/susy/susy/_unprefix.scss +56 -56
  140. data/_sass/basically-basic/vendor/susy/susy/_utilities.scss +167 -167
  141. data/assets/javascripts/lunr/lunr.da.min.js +17 -17
  142. data/assets/javascripts/lunr/lunr.de.min.js +17 -17
  143. data/assets/javascripts/lunr/lunr.du.min.js +17 -17
  144. data/assets/javascripts/lunr/lunr.es.min.js +17 -17
  145. data/assets/javascripts/lunr/lunr.fi.min.js +17 -17
  146. data/assets/javascripts/lunr/lunr.fr.min.js +17 -17
  147. data/assets/javascripts/lunr/lunr.hu.min.js +17 -17
  148. data/assets/javascripts/lunr/lunr.it.min.js +17 -17
  149. data/assets/javascripts/lunr/lunr.jp.min.js +1 -1
  150. data/assets/javascripts/lunr/lunr.min.js +6 -6
  151. data/assets/javascripts/lunr/lunr.no.min.js +17 -17
  152. data/assets/javascripts/lunr/lunr.pt.min.js +17 -17
  153. data/assets/javascripts/lunr/lunr.ro.min.js +17 -17
  154. data/assets/javascripts/lunr/lunr.ru.min.js +17 -17
  155. data/assets/javascripts/lunr/lunr.sv.min.js +17 -17
  156. data/assets/javascripts/lunr/lunr.tr.min.js +17 -17
  157. data/assets/javascripts/main.js +12 -12
  158. data/assets/javascripts/search-data.json +43 -27
  159. data/assets/stylesheets/main.scss +9 -9
  160. metadata +21 -5
@@ -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
+ /// }