sempli-website-lib 4.1.4 → 5.0.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (111) hide show
  1. package/README.md +25 -25
  2. package/assets/fonts/Lato/Lato-Black.ttf +0 -0
  3. package/assets/fonts/Lato/Lato-BlackItalic.ttf +0 -0
  4. package/assets/fonts/Lato/Lato-Bold.ttf +0 -0
  5. package/assets/fonts/Lato/Lato-BoldItalic.ttf +0 -0
  6. package/assets/fonts/Lato/Lato-Hairline.ttf +0 -0
  7. package/assets/fonts/Lato/Lato-HairlineItalic.ttf +0 -0
  8. package/assets/fonts/Lato/Lato-Italic.ttf +0 -0
  9. package/assets/fonts/Lato/Lato-Light.ttf +0 -0
  10. package/assets/fonts/Lato/Lato-LightItalic.ttf +0 -0
  11. package/assets/fonts/Lato/Lato-Regular.ttf +0 -0
  12. package/assets/fonts/Lato/OFL.txt +0 -0
  13. package/assets/interface/documents.svg +136 -136
  14. package/assets/interface/icons/alert-success.svg +17 -17
  15. package/assets/interface/icons/arrow-left.svg +8 -8
  16. package/assets/interface/icons/arrow-right-02.svg +10 -10
  17. package/assets/interface/icons/arrow-right.svg +8 -8
  18. package/assets/interface/icons/basic-check-magenta.svg +1 -1
  19. package/assets/interface/icons/bulb-example.svg +20 -20
  20. package/assets/interface/icons/bulb-tip.svg +32 -32
  21. package/assets/interface/icons/check-green-circle-large.svg +23 -23
  22. package/assets/interface/icons/check-green.svg +16 -16
  23. package/assets/interface/icons/check-purple.svg +20 -20
  24. package/assets/interface/icons/cloud-download.svg +20 -20
  25. package/assets/interface/icons/document-pdf.svg +13 -13
  26. package/assets/interface/icons/document-review.svg +20 -20
  27. package/assets/interface/icons/document-status-approved.svg +21 -21
  28. package/assets/interface/icons/document-status-empty.svg +18 -18
  29. package/assets/interface/icons/document-status-error.svg +23 -23
  30. package/assets/interface/icons/document-status-success.svg +19 -19
  31. package/assets/interface/icons/eye-action.svg +1 -1
  32. package/assets/interface/icons/hand-stop.svg +19 -19
  33. package/assets/interface/icons/happy-01.svg +0 -0
  34. package/assets/interface/icons/happy-02.svg +0 -0
  35. package/assets/interface/icons/happy-03.svg +0 -0
  36. package/assets/interface/icons/happy-04.svg +0 -0
  37. package/assets/interface/icons/happy-05.svg +0 -0
  38. package/assets/interface/icons/heart.svg +13 -13
  39. package/assets/interface/icons/intercom-messenger-icon.svg +1 -1
  40. package/assets/interface/icons/lock-icon.svg +1 -1
  41. package/assets/interface/icons/mail-circle.svg +32 -32
  42. package/assets/interface/icons/mail-edit.svg +20 -20
  43. package/assets/interface/icons/pen-edit.svg +22 -22
  44. package/assets/interface/icons/plus-circle.svg +22 -22
  45. package/assets/interface/icons/question-sign.svg +10 -10
  46. package/assets/interface/icons/shield.svg +31 -31
  47. package/assets/interface/icons/signature-modal-approved.svg +17 -17
  48. package/assets/interface/icons/signature-modal-waiting.svg +23 -23
  49. package/assets/interface/icons/signature-pending.svg +25 -25
  50. package/assets/interface/icons/signature-step-active.svg +19 -19
  51. package/assets/interface/icons/signature-step-completed.svg +19 -19
  52. package/assets/interface/icons/signature-step-default.svg +19 -19
  53. package/assets/interface/icons/skull.svg +23 -23
  54. package/assets/interface/icons/step-incomplete.svg +18 -18
  55. package/assets/interface/icons/trash-delete.svg +20 -20
  56. package/assets/interface/icons/warning-sign.svg +22 -22
  57. package/assets/interface/icons/x-circle.svg +14 -14
  58. package/esm2020/lib/sempli-website-lib.module.mjs +16 -0
  59. package/esm2020/public-api.mjs +5 -0
  60. package/esm2020/sempli-website-lib.mjs +5 -0
  61. package/fesm2015/sempli-website-lib.mjs +27 -0
  62. package/fesm2015/sempli-website-lib.mjs.map +1 -0
  63. package/fesm2020/sempli-website-lib.mjs +27 -0
  64. package/fesm2020/sempli-website-lib.mjs.map +1 -0
  65. package/lib/sempli-website-lib.module.d.ts +6 -2
  66. package/package.json +23 -11
  67. package/public-api.d.ts +1 -1
  68. package/sempli-website-lib.d.ts +5 -4
  69. package/styles/_main.scss +2 -2
  70. package/styles/master-app.scss +11962 -9802
  71. package/styles/master-landing.scss +12821 -10661
  72. package/styles/modules/_functions.scss +37 -37
  73. package/styles/modules/_mixins.scss +66 -66
  74. package/styles/modules/_variables.scss +54 -54
  75. package/styles/partials/_base.scss +281 -281
  76. package/styles/partials/_buttons.scss +401 -402
  77. package/styles/partials/_fonts.scss +83 -83
  78. package/styles/partials/_forms.scss +837 -837
  79. package/styles/partials/_icons.scss +12 -12
  80. package/styles/partials/_layout.scss +148 -148
  81. package/styles/partials/_modals.scss +256 -256
  82. package/styles/partials/_panels.scss +51 -51
  83. package/styles/partials/_progress-bars.scss +60 -60
  84. package/styles/partials/_tooltips.scss +128 -128
  85. package/styles/partials/_videos.scss +32 -32
  86. package/styles/partials/animations.scss +122 -122
  87. package/styles/partials/app/_blocks.scss +101 -101
  88. package/styles/partials/app/_cards.scss +155 -155
  89. package/styles/partials/app/_general.scss +1199 -1199
  90. package/styles/partials/app/_header.scss +723 -723
  91. package/styles/partials/app/_layout.scss +227 -227
  92. package/styles/partials/app/_my-account.scss +203 -203
  93. package/styles/partials/app/_my-loan-applications.scss +165 -165
  94. package/styles/partials/app/_my-products.scss +1039 -1039
  95. package/styles/partials/app/_signatures.scss +16 -16
  96. package/styles/partials/landing/_footer.scss +70 -70
  97. package/styles/partials/landing/_general.scss +1375 -1375
  98. package/styles/partials/landing/_header.scss +478 -478
  99. package/styles/partials/landing/_hero-wrappers.scss +616 -616
  100. package/styles/vendor/_modules_export.scss +3252 -1091
  101. package/styles/vendor/_normalize.scss +341 -341
  102. package/bundles/sempli-website-lib.umd.js +0 -33
  103. package/bundles/sempli-website-lib.umd.js.map +0 -1
  104. package/bundles/sempli-website-lib.umd.min.js +0 -2
  105. package/bundles/sempli-website-lib.umd.min.js.map +0 -1
  106. package/esm2015/lib/sempli-website-lib.module.js +0 -11
  107. package/esm2015/public-api.js +0 -5
  108. package/esm2015/sempli-website-lib.js +0 -5
  109. package/fesm2015/sempli-website-lib.js +0 -22
  110. package/fesm2015/sempli-website-lib.js.map +0 -1
  111. package/sempli-website-lib.metadata.json +0 -1
@@ -1,4 +1,4 @@
1
- // NOTE Exporting individual modules for external use of classes and functions
1
+ // NOTE Exporting individual modules for external use of classes and functions
2
2
  //
3
3
  // A partial implementation of the Ruby list functions from Compass:
4
4
  // https://github.com/Compass/compass/blob/stable/lib/compass/sass_extensions/functions/lists.rb
@@ -90,10 +90,10 @@
90
90
  @return $list;
91
91
  }
92
92
 
93
- //
93
+ //
94
94
  // A partial implementation of the Ruby cross browser support functions from Compass:
95
95
  // https://github.com/Compass/compass/blob/stable/lib/compass/sass_extensions/functions/cross_browser_support.rb
96
- //
96
+ //
97
97
 
98
98
  @function prefixed($prefix, $property1, $property2:null, $property3:null, $property4:null, $property5:null, $property6:null, $property7:null, $property8:null, $property9:null) {
99
99
  $properties: $property1, $property2, $property3, $property4, $property5, $property6, $property7, $property8, $property9;
@@ -272,6 +272,102 @@
272
272
  }
273
273
 
274
274
 
275
+ //
276
+ // A partial implementation of the Ruby fonts functions from Compass:
277
+ // https://github.com/Compass/compass/blob/stable/core/lib/compass/core/sass_extensions/functions/font_files.rb
278
+ //
279
+ // and several functions from the file:
280
+ // https://github.com/Compass/compass/blob/stable/core/lib/compass/core/sass_extensions/functions/urls.rb
281
+ // -----------------------------------------------------------------------------
282
+ // Helper functions font-files and font-url for font-face mixins.
283
+ // -----------------------------------------------------------------------------
284
+ // use mixin this way:
285
+ //
286
+ // $font-path: "/public/fonts/roboto";
287
+ // @include font-face(
288
+ // 'Roboto',
289
+ // font_files("roboto.ttf", "truetype", "roboto.woff", "roboto.woff2"), // or
290
+ // font_files("roboto.ttf", "roboto.woff", "roboto.woff2"),
291
+ // "roboto.eot", // [$eot]
292
+ // normal, // [$weight]
293
+ // normal // [$style]
294
+ // );
295
+ // -----------------------------------------------------------------------------
296
+
297
+
298
+ @function font-url($path) {
299
+ $font-path: 'fonts' !default;
300
+ @return url("#{$font-path}/#{$path}");
301
+ }
302
+
303
+
304
+ // -----------------------------------------------------------------------------
305
+ // helper function to create a list of font files for the src attribute in @font-face.
306
+ // In the global variable $font-path, you can specify the path to the folder
307
+ // with fonts relative to style files, by default the path to the fonts is "fonts".
308
+ //
309
+ // Usage: font-files ('file-name-w-ext'[, 'format'][,'file-name-w-ext'[, 'format']]...).
310
+ // If the font format is not specified, the function will add the format corresponding to the file extension.
311
+ //
312
+ // for best results use this order: woff, opentype / truetype, svg.
313
+ // -----------------------------------------------------------------------------
314
+ // function ported from Ruby.
315
+ // -----------------------------------------------------------------------------
316
+ @function font-files($font-files...) {
317
+ $font-path: 'fonts' !default;
318
+ // types of font formats from module Compass::Core::SassExtensions::Functions::FontFiles.
319
+ $font-types: (
320
+ 'woff': "woff",
321
+ 'woff2': "woff2",
322
+ 'opentype': "otf",
323
+ // 'opentype': "opentype",
324
+ 'truetype': "ttf",
325
+ // 'truetype': "truetype",
326
+ 'svg': "svg",
327
+ 'embedded-opentype': "eot"
328
+ );
329
+
330
+ $full: '';
331
+ // if the font format is specified after the font file name, skip the next iteration.
332
+ $skip-next: false;
333
+ // number of font files including font format.
334
+ $font-file-length: length($font-files);
335
+
336
+ @for $i from 1 through $font-file-length {
337
+ @if(not $skip-next) {
338
+ $font-file: nth($font-files, $i);
339
+ $font-file-next: if($i < $font-file-length, nth($font-files, $i + 1), false);
340
+
341
+ // add font url.
342
+ $full: $full + 'url("#{$font-path}/#{$font-file}")';
343
+
344
+ // add the font format if it is specified after the font file name.
345
+ @if $font-file-next and map-has-key($font-types, $font-file-next) {
346
+ $full: $full + ' format("#{$font-file-next}")';
347
+ $skip-next: true;
348
+ } @else {
349
+ // add a font format based on the font file name extension.
350
+ @each $type, $extension in $font-types {
351
+ $pos: str-index($font-file, '.' + $extension);
352
+
353
+ @if($font-file-next == $extension) {
354
+ $full: $full + ' format("#{$type}")';
355
+ $skip-next: true;
356
+ } @else if ($pos and (to-lower-case(str-slice($font-file, $pos + 1)) == $extension)) {
357
+ $full: $full + ' format("#{$type}")';
358
+ }
359
+ }
360
+ }
361
+ } @else {
362
+ $skip-next: false;
363
+ }
364
+
365
+ @if (not $skip-next and $i != $font-file-length) { $full: $full + ', ';}
366
+ }
367
+
368
+ @return unquote($full);
369
+ }
370
+
275
371
 
276
372
  $contrasted-dark-default: #000 !default;
277
373
  $contrasted-light-default: #fff !default;
@@ -3943,10 +4039,10 @@ $default-has-layout-approach: zoom !default;
3943
4039
  @return $list;
3944
4040
  }
3945
4041
 
3946
- //
4042
+ //
3947
4043
  // A partial implementation of the Ruby cross browser support functions from Compass:
3948
4044
  // https://github.com/Compass/compass/blob/stable/lib/compass/sass_extensions/functions/cross_browser_support.rb
3949
- //
4045
+ //
3950
4046
 
3951
4047
  @function prefixed($prefix, $property1, $property2:null, $property3:null, $property4:null, $property5:null, $property6:null, $property7:null, $property8:null, $property9:null) {
3952
4048
  $properties: $property1, $property2, $property3, $property4, $property5, $property6, $property7, $property8, $property9;
@@ -4125,6 +4221,102 @@ $default-has-layout-approach: zoom !default;
4125
4221
  }
4126
4222
 
4127
4223
 
4224
+ //
4225
+ // A partial implementation of the Ruby fonts functions from Compass:
4226
+ // https://github.com/Compass/compass/blob/stable/core/lib/compass/core/sass_extensions/functions/font_files.rb
4227
+ //
4228
+ // and several functions from the file:
4229
+ // https://github.com/Compass/compass/blob/stable/core/lib/compass/core/sass_extensions/functions/urls.rb
4230
+ // -----------------------------------------------------------------------------
4231
+ // Helper functions font-files and font-url for font-face mixins.
4232
+ // -----------------------------------------------------------------------------
4233
+ // use mixin this way:
4234
+ //
4235
+ // $font-path: "/public/fonts/roboto";
4236
+ // @include font-face(
4237
+ // 'Roboto',
4238
+ // font_files("roboto.ttf", "truetype", "roboto.woff", "roboto.woff2"), // or
4239
+ // font_files("roboto.ttf", "roboto.woff", "roboto.woff2"),
4240
+ // "roboto.eot", // [$eot]
4241
+ // normal, // [$weight]
4242
+ // normal // [$style]
4243
+ // );
4244
+ // -----------------------------------------------------------------------------
4245
+
4246
+
4247
+ @function font-url($path) {
4248
+ $font-path: 'fonts' !default;
4249
+ @return url("#{$font-path}/#{$path}");
4250
+ }
4251
+
4252
+
4253
+ // -----------------------------------------------------------------------------
4254
+ // helper function to create a list of font files for the src attribute in @font-face.
4255
+ // In the global variable $font-path, you can specify the path to the folder
4256
+ // with fonts relative to style files, by default the path to the fonts is "fonts".
4257
+ //
4258
+ // Usage: font-files ('file-name-w-ext'[, 'format'][,'file-name-w-ext'[, 'format']]...).
4259
+ // If the font format is not specified, the function will add the format corresponding to the file extension.
4260
+ //
4261
+ // for best results use this order: woff, opentype / truetype, svg.
4262
+ // -----------------------------------------------------------------------------
4263
+ // function ported from Ruby.
4264
+ // -----------------------------------------------------------------------------
4265
+ @function font-files($font-files...) {
4266
+ $font-path: 'fonts' !default;
4267
+ // types of font formats from module Compass::Core::SassExtensions::Functions::FontFiles.
4268
+ $font-types: (
4269
+ 'woff': "woff",
4270
+ 'woff2': "woff2",
4271
+ 'opentype': "otf",
4272
+ // 'opentype': "opentype",
4273
+ 'truetype': "ttf",
4274
+ // 'truetype': "truetype",
4275
+ 'svg': "svg",
4276
+ 'embedded-opentype': "eot"
4277
+ );
4278
+
4279
+ $full: '';
4280
+ // if the font format is specified after the font file name, skip the next iteration.
4281
+ $skip-next: false;
4282
+ // number of font files including font format.
4283
+ $font-file-length: length($font-files);
4284
+
4285
+ @for $i from 1 through $font-file-length {
4286
+ @if(not $skip-next) {
4287
+ $font-file: nth($font-files, $i);
4288
+ $font-file-next: if($i < $font-file-length, nth($font-files, $i + 1), false);
4289
+
4290
+ // add font url.
4291
+ $full: $full + 'url("#{$font-path}/#{$font-file}")';
4292
+
4293
+ // add the font format if it is specified after the font file name.
4294
+ @if $font-file-next and map-has-key($font-types, $font-file-next) {
4295
+ $full: $full + ' format("#{$font-file-next}")';
4296
+ $skip-next: true;
4297
+ } @else {
4298
+ // add a font format based on the font file name extension.
4299
+ @each $type, $extension in $font-types {
4300
+ $pos: str-index($font-file, '.' + $extension);
4301
+
4302
+ @if($font-file-next == $extension) {
4303
+ $full: $full + ' format("#{$type}")';
4304
+ $skip-next: true;
4305
+ } @else if ($pos and (to-lower-case(str-slice($font-file, $pos + 1)) == $extension)) {
4306
+ $full: $full + ' format("#{$type}")';
4307
+ }
4308
+ }
4309
+ }
4310
+ } @else {
4311
+ $skip-next: false;
4312
+ }
4313
+
4314
+ @if (not $skip-next and $i != $font-file-length) { $full: $full + ', ';}
4315
+ }
4316
+
4317
+ @return unquote($full);
4318
+ }
4319
+
4128
4320
 
4129
4321
 
4130
4322
  // Background property support for vendor prefixing within values.
@@ -4149,7 +4341,7 @@ $default-has-layout-approach: zoom !default;
4149
4341
  @if $experimental-support-for-webkit and prefixed(-webkit, $backgrounds) { background: -webkit($backgrounds); }
4150
4342
  @if $experimental-support-for-mozilla and prefixed(-moz, $backgrounds) { background: -moz($backgrounds); }
4151
4343
  @if $experimental-support-for-opera and prefixed(-o, $backgrounds) { background: -o($backgrounds); }
4152
- @if $experimental-support-for-pie and $add-pie-bg { -pie-background: -pie($backgrounds); }
4344
+ @if $experimental-support-for-pie and $add-pie-bg { -pie-background: $backgrounds ; }
4153
4345
  background: $backgrounds ;
4154
4346
  }
4155
4347
 
@@ -4758,6 +4950,16 @@ $base-half-leader: $base-leader / 2;
4758
4950
  @include horizontal-borders($width, $lines, $font-size, $border-style);
4759
4951
  }
4760
4952
 
4953
+ // Shorthand mixin to apply whitespace for top and bottom margins.
4954
+ @mixin rhythm-margins(
4955
+ $leader: 1,
4956
+ $trailer: $leader,
4957
+ $font-size: $base-font-size
4958
+ ) {
4959
+ @include leader($leader, $font-size);
4960
+ @include trailer($trailer, $font-size);
4961
+ }
4962
+
4761
4963
 
4762
4964
  // Usually compass hacks apply to both ie6 & 7 -- set this to false to disable support for both.
4763
4965
  $legacy-support-for-ie: true !default;
@@ -5251,123 +5453,492 @@ $experimental-support-for-pie : false !default;
5251
5453
  @if $official { #{$property} : #{$value}; }
5252
5454
  }
5253
5455
 
5456
+ //
5457
+ // A partial implementation of the Ruby list functions from Compass:
5458
+ // https://github.com/Compass/compass/blob/stable/lib/compass/sass_extensions/functions/lists.rb
5459
+ //
5254
5460
 
5255
5461
 
5256
- // The default color for box shadows
5257
- $default-box-shadow-color: #333333 !default;
5462
+ // compact is part of libsass
5258
5463
 
5259
- // The default horizontal offset. Positive is to the right.
5260
- $default-box-shadow-h-offset: 0px !default;
5464
+ @function -compass-nth($list, $place) {
5465
+ // Yep, Sass-lists are 1-indexed.
5466
+ @if $place == "first" {
5467
+ $place: 1;
5468
+ }
5469
+ @if $place == "last" {
5470
+ $place: length($list);
5471
+ }
5472
+ @return nth($list, $place);
5473
+ }
5261
5474
 
5262
- // The default vertical offset. Positive is down.
5263
- $default-box-shadow-v-offset: 0px !default;
5475
+ // compass_list can't be implemented in sass script
5264
5476
 
5265
- // The default blur length.
5266
- $default-box-shadow-blur: 5px !default;
5477
+ @function -compass-space-list($item1, $item2:null, $item3:null, $item4:null, $item5:null, $item6:null, $item7:null, $item8:null, $item9:null) {
5478
+ $items: ();
5479
+ // Support for polymorphism.
5480
+ @if type-of($item1) == 'list' {
5481
+ // Passing a single array of properties.
5482
+ $items: $item1;
5483
+ } @else {
5484
+ $items: $item1 $item2 $item3 $item4 $item5 $item6 $item7 $item8 $item9;
5485
+ }
5267
5486
 
5268
- // The default spread length.
5269
- $default-box-shadow-spread : false !default;
5487
+ $full: first-value-of($items);
5270
5488
 
5271
- // The default shadow inset: inset or false (for standard shadow).
5272
- $default-box-shadow-inset : false !default;
5489
+ @for $i from 2 through length($items) {
5490
+ $item: nth($items, $i);
5491
+ @if $item != null {
5492
+ $full: $full $item;
5493
+ }
5494
+ }
5273
5495
 
5274
- // Provides cross-browser for Webkit, Gecko, and CSS3 box shadows when one or more box
5275
- // shadows are needed.
5276
- // Each shadow argument should adhere to the standard css3 syntax for the
5277
- // box-shadow property.
5278
- @mixin box-shadow(
5279
- $shadow-1 : default,
5280
- $shadow-2 : false,
5281
- $shadow-3 : false,
5282
- $shadow-4 : false,
5283
- $shadow-5 : false,
5284
- $shadow-6 : false,
5285
- $shadow-7 : false,
5286
- $shadow-8 : false,
5287
- $shadow-9 : false,
5288
- $shadow-10: false
5289
- ) {
5290
- @if $shadow-1 == default {
5291
- $shadow-1 : -compass-space-list(compact(if($default-box-shadow-inset, inset, false), $default-box-shadow-h-offset, $default-box-shadow-v-offset, $default-box-shadow-blur, $default-box-shadow-spread, $default-box-shadow-color));
5496
+ @return $full;
5497
+ }
5498
+
5499
+ @function -compass-list-size($list) {
5500
+ @return length($list);
5501
+ }
5502
+
5503
+ @function -compass-slice($list, $start, $end: false) {
5504
+ @if $end == false {
5505
+ $end: length($list);
5292
5506
  }
5293
- $shadow : compact($shadow-1, $shadow-2, $shadow-3, $shadow-4, $shadow-5, $shadow-6, $shadow-7, $shadow-8, $shadow-9, $shadow-10);
5294
- @include experimental(box-shadow, $shadow,
5295
- -moz, -webkit, not(-o), not(-ms), not(-khtml), official
5296
- );
5507
+ $full: nth($list, $start);
5508
+ @for $i from $start + 1 through $end {
5509
+ $full: $full, nth($list, $i);
5510
+ }
5511
+ @return $full;
5297
5512
  }
5298
5513
 
5299
- // Provides a single cross-browser CSS box shadow for Webkit, Gecko, and CSS3.
5300
- // Includes default arguments for horizontal offset, vertical offset, blur length, spread length, color and inset.
5301
- @mixin single-box-shadow(
5302
- $hoff : $default-box-shadow-h-offset,
5303
- $voff : $default-box-shadow-v-offset,
5304
- $blur : $default-box-shadow-blur,
5305
- $spread : $default-box-shadow-spread,
5306
- $color : $default-box-shadow-color,
5307
- $inset : $default-box-shadow-inset
5308
- ) {
5309
- @if not ($inset == true or $inset == false or $inset == inset) {
5310
- @warn "$inset expected to be true or the inset keyword. Got #{$inset} instead. Using: inset";
5514
+ @function reject($list, $reject1, $reject2:null, $reject3:null, $reject4:null, $reject5:null, $reject6:null, $reject7:null, $reject8:null, $reject9:null) {
5515
+ $rejects: $reject1, $reject2, $reject3, $reject4, $reject5, $reject6, $reject7, $reject8, $reject9;
5516
+
5517
+ $full: false;
5518
+ @each $item in $list {
5519
+ @if index($rejects, $item) {}
5520
+ @else {
5521
+ @if $full {
5522
+ $full: $full, $item;
5523
+ }
5524
+ @else {
5525
+ $full: $item;
5526
+ }
5527
+ }
5311
5528
  }
5529
+ @return $full;
5530
+ }
5312
5531
 
5313
- @if $color == none {
5314
- @include box-shadow(none);
5315
- } @else {
5316
- $full : $hoff $voff;
5317
- @if $blur { $full: $full $blur; }
5318
- @if $spread { $full: $full $spread; }
5319
- @if $color { $full: $full $color; }
5320
- @if $inset { $full: inset $full; }
5321
- @include box-shadow($full);
5532
+ @function first-value-of($list) {
5533
+ @return nth($list, 1);
5534
+ }
5535
+
5536
+ @function compact($vars...) {
5537
+ $separator: list-separator($vars);
5538
+ $list: ();
5539
+ @each $var in $vars {
5540
+ @if $var {
5541
+ $list: append($list, $var, $separator);
5542
+ }
5322
5543
  }
5544
+ @return $list;
5323
5545
  }
5324
5546
 
5325
- // Usually compass hacks apply to both ie6 & 7 -- set this to false to disable support for both.
5326
- $legacy-support-for-ie: true !default;
5547
+ //
5548
+ // A partial implementation of the Ruby cross browser support functions from Compass:
5549
+ // https://github.com/Compass/compass/blob/stable/lib/compass/sass_extensions/functions/cross_browser_support.rb
5550
+ //
5327
5551
 
5328
- // Setting this to false will result in smaller output, but no support for ie6 hacks
5329
- $legacy-support-for-ie6: $legacy-support-for-ie !default;
5552
+ @function prefixed($prefix, $property1, $property2:null, $property3:null, $property4:null, $property5:null, $property6:null, $property7:null, $property8:null, $property9:null) {
5553
+ $properties: $property1, $property2, $property3, $property4, $property5, $property6, $property7, $property8, $property9;
5554
+ $prefixed: false;
5555
+ @each $item in $properties {
5556
+ @if type-of($item) == 'string' {
5557
+ $prefixed: $prefixed or str-index($item, 'url') != 1 and str-index($item, 'rgb') != 1 and str-index($item, '#') != 1;
5558
+ } @else if type-of($item) == 'color' {
5559
+ } @else if $item != null {
5560
+ $prefixed: true;
5561
+ }
5562
+ }
5563
+ @return $prefixed;
5564
+ }
5330
5565
 
5331
- // Setting this to false will result in smaller output, but no support for ie7 hacks
5332
- $legacy-support-for-ie7: $legacy-support-for-ie !default;
5566
+ @function prefix($prefix, $property1, $property2:null, $property3:null, $property4:null, $property5:null, $property6:null, $property7:null, $property8:null, $property9:null) {
5567
+ $properties: "";
5333
5568
 
5334
- // Setting this to false will result in smaller output, but no support for legacy ie8 hacks
5335
- $legacy-support-for-ie8: $legacy-support-for-ie !default;
5569
+ // Support for polymorphism.
5570
+ @if type-of($property1) == 'list' {
5571
+ // Passing a single array of properties.
5572
+ $properties: $property1;
5573
+ } @else {
5574
+ // Passing multiple properties.
5575
+ $properties: $property1, $property2, $property3, $property4, $property5, $property6, $property7, $property8, $property9;
5576
+ }
5336
5577
 
5337
- // @private
5338
- // The user can simply set $legacy-support-for-ie and 6, 7, and 8 will be set accordingly,
5339
- // But in case the user set each of those explicitly, we need to sync the value of
5340
- // this combined variable.
5341
- $legacy-support-for-ie: $legacy-support-for-ie6 or $legacy-support-for-ie7 or $legacy-support-for-ie8;
5578
+ $props: false;
5579
+ @each $item in $properties {
5580
+ @if $item == null {}
5581
+ @else {
5582
+ @if prefixed($prefix, $item) {
5583
+ $item: #{$prefix}-#{$item};
5584
+ }
5585
+ @if $props {
5586
+ $props: $props, $item;
5587
+ }
5588
+ @else {
5589
+ $props: $item;
5590
+ }
5591
+ }
5592
+ }
5593
+ @return $props;
5594
+ }
5342
5595
 
5343
- // Whether to output legacy support for mozilla.
5344
- // Usually this means hacks to support Firefox 3.6 or earlier.
5345
- $legacy-support-for-mozilla: true;
5596
+ @function -svg($property1, $property2:null, $property3:null, $property4:null, $property5:null, $property6:null, $property7:null, $property8:null, $property9:null) {
5597
+ @return prefix('-svg', $property1, $property2, $property3, $property4, $property5, $property6, $property7, $property8, $property9);
5598
+ }
5346
5599
 
5347
- // Support for mozilla in experimental css3 properties (-moz).
5348
- $experimental-support-for-mozilla : true !default;
5349
- // Support for webkit in experimental css3 properties (-webkit).
5350
- $experimental-support-for-webkit : true !default;
5351
- // Support for webkit's original (non-standard) gradient syntax.
5352
- $support-for-original-webkit-gradients : true !default;
5353
- // Support for opera in experimental css3 properties (-o).
5354
- $experimental-support-for-opera : true !default;
5355
- // Support for microsoft in experimental css3 properties (-ms).
5356
- $experimental-support-for-microsoft : true !default;
5357
- // Support for khtml in experimental css3 properties (-khtml).
5358
- $experimental-support-for-khtml : false !default;
5359
- // Support for svg in experimental css3 properties.
5360
- // Setting this to true might add significant size to your
5361
- // generated stylesheets.
5362
- $experimental-support-for-svg : false !default;
5363
- // Support for CSS PIE in experimental css3 properties (-pie).
5364
- $experimental-support-for-pie : false !default;
5600
+ @function -owg($property1, $property2:null, $property3:null, $property4:null, $property5:null, $property6:null, $property7:null, $property8:null, $property9:null) {
5601
+ @return prefix('-owg', $property1, $property2, $property3, $property4, $property5, $property6, $property7, $property8, $property9);
5602
+ }
5365
5603
 
5604
+ @function -webkit($property1, $property2:null, $property3:null, $property4:null, $property5:null, $property6:null, $property7:null, $property8:null, $property9:null) {
5605
+ @return prefix('-webkit', $property1, $property2, $property3, $property4, $property5, $property6, $property7, $property8, $property9);
5606
+ }
5366
5607
 
5367
- // This mixin provides basic support for CSS3 properties and
5368
- // their corresponding experimental CSS2 properties when
5369
- // the implementations are identical except for the property
5370
- // prefix.
5608
+ @function -moz($property1, $property2:null, $property3:null, $property4:null, $property5:null, $property6:null, $property7:null, $property8:null, $property9:null) {
5609
+ @return prefix('-moz', $property1, $property2, $property3, $property4, $property5, $property6, $property7, $property8, $property9);
5610
+ }
5611
+
5612
+ @function -o($property1, $property2:null, $property3:null, $property4:null, $property5:null, $property6:null, $property7:null, $property8:null, $property9:null) {
5613
+ @return prefix('-o', $property1, $property2, $property3, $property4, $property5, $property6, $property7, $property8, $property9);
5614
+ }
5615
+
5616
+ @function -pie($property1, $property2:null, $property3:null, $property4:null, $property5:null, $property6:null, $property7:null, $property8:null, $property9:null) {
5617
+ @return prefix('-pie', $property1, $property2, $property3, $property4, $property5, $property6, $property7, $property8, $property9);
5618
+ }
5619
+
5620
+ //
5621
+ // A partial implementation of the Ruby gradient support functions from Compass:
5622
+ // https://github.com/Compass/compass/blob/v0.12.2/lib/compass/sass_extensions/functions/gradient_support.rb
5623
+ //
5624
+
5625
+ @function color-stops($item1, $item2:null, $item3:null, $item4:null, $item5:null, $item6:null, $item7:null, $item8:null, $item9:null) {
5626
+ $items: $item2, $item3, $item4, $item5, $item6, $item7, $item8, $item9;
5627
+ $full: $item1;
5628
+ @each $item in $items {
5629
+ @if $item != null {
5630
+ $full: $full, $item;
5631
+ }
5632
+ }
5633
+ @return $full;
5634
+ }
5635
+ //
5636
+ // A partial implementation of the Ruby constants functions from Compass:
5637
+ // https://github.com/Compass/compass/blob/stable/lib/compass/sass_extensions/functions/constants.rb
5638
+ //
5639
+
5640
+ @function opposite-position($from) {
5641
+ @if ($from == top) {
5642
+ @return bottom;
5643
+ } @else if ($from == bottom) {
5644
+ @return top;
5645
+ } @else if ($from == left) {
5646
+ @return right;
5647
+ } @else if ($from == right) {
5648
+ @return left;
5649
+ } @else if ($from == center) {
5650
+ @return center;
5651
+ }
5652
+ }
5653
+
5654
+ //
5655
+ // A partial implementation of the Ruby display functions from Compass:
5656
+ // https://github.com/Compass/compass/blob/stable/core/lib/compass/core/sass_extensions/functions/display.rb
5657
+ //
5658
+
5659
+ @function elements-of-type($type){
5660
+ @if ($type == block){
5661
+ @return address, article, aside, blockquote, center, dir, div, dd, details, dl, dt, fieldset, figcaption, figure, form, footer, frameset, h1, h2, h3, h4, h5, h6, hr, header, hgroup, isindex, main, menu, nav, noframes, noscript, ol, p, pre, section, summary, ul;
5662
+ } @else if ($type == inline){
5663
+ @return a, abbr, acronym, audio, b, basefont, bdo, big, br, canvas, cite, code, command, datalist, dfn, em, embed, font, i, img, input, keygen, kbd, label, mark, meter, output, progress, q, rp, rt, ruby, s, samp, select, small, span, strike, strong, sub, sup, textarea, time, tt, u, var, video, wbr;
5664
+ } @else if ($type == inline-block){
5665
+ @return img;
5666
+ } @else if ($type == table){
5667
+ @return table;
5668
+ } @else if ($type == list-item){
5669
+ @return li;
5670
+ } @else if ($type == table-row-group){
5671
+ @return tbody;
5672
+ } @else if ($type == table-header-group){
5673
+ @return thead;
5674
+ } @else if ($type == table-footer-group){
5675
+ @return tfoot;
5676
+ } @else if ($type == table-row){
5677
+ @return tr;
5678
+ } @else if ($type == table-cell){
5679
+ @return th, td;
5680
+ } @else if ($type == html5-block){
5681
+ @return article, aside, details, figcaption, figure, footer, header, hgroup, main, menu, nav, section, summary;
5682
+ } @else if ($type == html5-inline){
5683
+ @return audio, canvas, command, datalist, embed, keygen, mark, meter, output, progress, rp, rt, ruby, time, video, wbr;
5684
+ } @else if ($type == html5){
5685
+ @return article, aside, audio, canvas, command, datalist, details, embed, figcaption, figure, footer, header, hgroup, keygen, main, mark, menu, meter, nav, output, progress, rp, rt, ruby, section, summary, time, video, wbr;
5686
+ } @else if ($type == text-input){
5687
+ @return input, textarea;
5688
+ }
5689
+ }
5690
+
5691
+ //
5692
+ // A partial implementation of the Ruby colors functions from Compass:
5693
+ // https://github.com/Compass/compass/blob/stable/core/lib/compass/core/sass_extensions/functions/colors.rb
5694
+ //
5695
+
5696
+ // a genericized version of lighten/darken so that negative values can be used.
5697
+ @function adjust-lightness($color, $amount) {
5698
+ @return adjust-color($color, $lightness: $amount);
5699
+ }
5700
+
5701
+ // Scales a color's lightness by some percentage.
5702
+ // If the amount is negative, the color is scaled darker, if positive, it is scaled lighter.
5703
+ // This will never return a pure light or dark color unless the amount is 100%.
5704
+ @function scale-lightness($color, $amount) {
5705
+ @return scale-color($color, $lightness: $amount);
5706
+ }
5707
+
5708
+ // a genericized version of saturate/desaturate so that negative values can be used.
5709
+ @function adjust-saturation($color, $amount) {
5710
+ @return adjust-color($color, $saturation: $amount);
5711
+ }
5712
+
5713
+ // Scales a color's saturation by some percentage.
5714
+ // If the amount is negative, the color is desaturated, if positive, it is saturated.
5715
+ // This will never return a pure saturated or desaturated color unless the amount is 100%.
5716
+ @function scale-saturation($color, $amount) {
5717
+ @return scale-color($color, $saturation: $amount);
5718
+ }
5719
+
5720
+ @function shade($color, $percentage) {
5721
+ @return mix(#000000, $color, $percentage);
5722
+ }
5723
+
5724
+ @function tint($color, $percentage) {
5725
+ @return mix(#ffffff, $color, $percentage);
5726
+ }
5727
+
5728
+
5729
+ //
5730
+ // A partial implementation of the Ruby fonts functions from Compass:
5731
+ // https://github.com/Compass/compass/blob/stable/core/lib/compass/core/sass_extensions/functions/font_files.rb
5732
+ //
5733
+ // and several functions from the file:
5734
+ // https://github.com/Compass/compass/blob/stable/core/lib/compass/core/sass_extensions/functions/urls.rb
5735
+ // -----------------------------------------------------------------------------
5736
+ // Helper functions font-files and font-url for font-face mixins.
5737
+ // -----------------------------------------------------------------------------
5738
+ // use mixin this way:
5739
+ //
5740
+ // $font-path: "/public/fonts/roboto";
5741
+ // @include font-face(
5742
+ // 'Roboto',
5743
+ // font_files("roboto.ttf", "truetype", "roboto.woff", "roboto.woff2"), // or
5744
+ // font_files("roboto.ttf", "roboto.woff", "roboto.woff2"),
5745
+ // "roboto.eot", // [$eot]
5746
+ // normal, // [$weight]
5747
+ // normal // [$style]
5748
+ // );
5749
+ // -----------------------------------------------------------------------------
5750
+
5751
+
5752
+ @function font-url($path) {
5753
+ $font-path: 'fonts' !default;
5754
+ @return url("#{$font-path}/#{$path}");
5755
+ }
5756
+
5757
+
5758
+ // -----------------------------------------------------------------------------
5759
+ // helper function to create a list of font files for the src attribute in @font-face.
5760
+ // In the global variable $font-path, you can specify the path to the folder
5761
+ // with fonts relative to style files, by default the path to the fonts is "fonts".
5762
+ //
5763
+ // Usage: font-files ('file-name-w-ext'[, 'format'][,'file-name-w-ext'[, 'format']]...).
5764
+ // If the font format is not specified, the function will add the format corresponding to the file extension.
5765
+ //
5766
+ // for best results use this order: woff, opentype / truetype, svg.
5767
+ // -----------------------------------------------------------------------------
5768
+ // function ported from Ruby.
5769
+ // -----------------------------------------------------------------------------
5770
+ @function font-files($font-files...) {
5771
+ $font-path: 'fonts' !default;
5772
+ // types of font formats from module Compass::Core::SassExtensions::Functions::FontFiles.
5773
+ $font-types: (
5774
+ 'woff': "woff",
5775
+ 'woff2': "woff2",
5776
+ 'opentype': "otf",
5777
+ // 'opentype': "opentype",
5778
+ 'truetype': "ttf",
5779
+ // 'truetype': "truetype",
5780
+ 'svg': "svg",
5781
+ 'embedded-opentype': "eot"
5782
+ );
5783
+
5784
+ $full: '';
5785
+ // if the font format is specified after the font file name, skip the next iteration.
5786
+ $skip-next: false;
5787
+ // number of font files including font format.
5788
+ $font-file-length: length($font-files);
5789
+
5790
+ @for $i from 1 through $font-file-length {
5791
+ @if(not $skip-next) {
5792
+ $font-file: nth($font-files, $i);
5793
+ $font-file-next: if($i < $font-file-length, nth($font-files, $i + 1), false);
5794
+
5795
+ // add font url.
5796
+ $full: $full + 'url("#{$font-path}/#{$font-file}")';
5797
+
5798
+ // add the font format if it is specified after the font file name.
5799
+ @if $font-file-next and map-has-key($font-types, $font-file-next) {
5800
+ $full: $full + ' format("#{$font-file-next}")';
5801
+ $skip-next: true;
5802
+ } @else {
5803
+ // add a font format based on the font file name extension.
5804
+ @each $type, $extension in $font-types {
5805
+ $pos: str-index($font-file, '.' + $extension);
5806
+
5807
+ @if($font-file-next == $extension) {
5808
+ $full: $full + ' format("#{$type}")';
5809
+ $skip-next: true;
5810
+ } @else if ($pos and (to-lower-case(str-slice($font-file, $pos + 1)) == $extension)) {
5811
+ $full: $full + ' format("#{$type}")';
5812
+ }
5813
+ }
5814
+ }
5815
+ } @else {
5816
+ $skip-next: false;
5817
+ }
5818
+
5819
+ @if (not $skip-next and $i != $font-file-length) { $full: $full + ', ';}
5820
+ }
5821
+
5822
+ @return unquote($full);
5823
+ }
5824
+
5825
+
5826
+
5827
+ // The default color for box shadows
5828
+ $default-box-shadow-color: #333333 !default;
5829
+
5830
+ // The default horizontal offset. Positive is to the right.
5831
+ $default-box-shadow-h-offset: 0px !default;
5832
+
5833
+ // The default vertical offset. Positive is down.
5834
+ $default-box-shadow-v-offset: 0px !default;
5835
+
5836
+ // The default blur length.
5837
+ $default-box-shadow-blur: 5px !default;
5838
+
5839
+ // The default spread length.
5840
+ $default-box-shadow-spread : false !default;
5841
+
5842
+ // The default shadow inset: inset or false (for standard shadow).
5843
+ $default-box-shadow-inset : false !default;
5844
+
5845
+ // Provides cross-browser for Webkit, Gecko, and CSS3 box shadows when one or more box
5846
+ // shadows are needed.
5847
+ // Each shadow argument should adhere to the standard css3 syntax for the
5848
+ // box-shadow property.
5849
+ @mixin box-shadow(
5850
+ $shadow-1 : default,
5851
+ $shadow-2 : false,
5852
+ $shadow-3 : false,
5853
+ $shadow-4 : false,
5854
+ $shadow-5 : false,
5855
+ $shadow-6 : false,
5856
+ $shadow-7 : false,
5857
+ $shadow-8 : false,
5858
+ $shadow-9 : false,
5859
+ $shadow-10: false
5860
+ ) {
5861
+ @if $shadow-1 == default {
5862
+ $shadow-1 : -compass-space-list(compact(if($default-box-shadow-inset, inset, false), $default-box-shadow-h-offset, $default-box-shadow-v-offset, $default-box-shadow-blur, $default-box-shadow-spread, $default-box-shadow-color));
5863
+ }
5864
+ $shadow : compact($shadow-1, $shadow-2, $shadow-3, $shadow-4, $shadow-5, $shadow-6, $shadow-7, $shadow-8, $shadow-9, $shadow-10);
5865
+ @include experimental(box-shadow, $shadow,
5866
+ -moz, -webkit, not(-o), not(-ms), not(-khtml), official
5867
+ );
5868
+ }
5869
+
5870
+ // Provides a single cross-browser CSS box shadow for Webkit, Gecko, and CSS3.
5871
+ // Includes default arguments for horizontal offset, vertical offset, blur length, spread length, color and inset.
5872
+ @mixin single-box-shadow(
5873
+ $hoff : $default-box-shadow-h-offset,
5874
+ $voff : $default-box-shadow-v-offset,
5875
+ $blur : $default-box-shadow-blur,
5876
+ $spread : $default-box-shadow-spread,
5877
+ $color : $default-box-shadow-color,
5878
+ $inset : $default-box-shadow-inset
5879
+ ) {
5880
+ @if not ($inset == true or $inset == false or $inset == inset) {
5881
+ @warn "$inset expected to be true or the inset keyword. Got #{$inset} instead. Using: inset";
5882
+ }
5883
+
5884
+ @if $color == none {
5885
+ @include box-shadow(none);
5886
+ } @else {
5887
+ $full : $hoff $voff;
5888
+ @if $blur { $full: $full $blur; }
5889
+ @if $spread { $full: $full $spread; }
5890
+ @if $color { $full: $full $color; }
5891
+ @if $inset { $full: inset $full; }
5892
+ @include box-shadow($full);
5893
+ }
5894
+ }
5895
+
5896
+ // Usually compass hacks apply to both ie6 & 7 -- set this to false to disable support for both.
5897
+ $legacy-support-for-ie: true !default;
5898
+
5899
+ // Setting this to false will result in smaller output, but no support for ie6 hacks
5900
+ $legacy-support-for-ie6: $legacy-support-for-ie !default;
5901
+
5902
+ // Setting this to false will result in smaller output, but no support for ie7 hacks
5903
+ $legacy-support-for-ie7: $legacy-support-for-ie !default;
5904
+
5905
+ // Setting this to false will result in smaller output, but no support for legacy ie8 hacks
5906
+ $legacy-support-for-ie8: $legacy-support-for-ie !default;
5907
+
5908
+ // @private
5909
+ // The user can simply set $legacy-support-for-ie and 6, 7, and 8 will be set accordingly,
5910
+ // But in case the user set each of those explicitly, we need to sync the value of
5911
+ // this combined variable.
5912
+ $legacy-support-for-ie: $legacy-support-for-ie6 or $legacy-support-for-ie7 or $legacy-support-for-ie8;
5913
+
5914
+ // Whether to output legacy support for mozilla.
5915
+ // Usually this means hacks to support Firefox 3.6 or earlier.
5916
+ $legacy-support-for-mozilla: true;
5917
+
5918
+ // Support for mozilla in experimental css3 properties (-moz).
5919
+ $experimental-support-for-mozilla : true !default;
5920
+ // Support for webkit in experimental css3 properties (-webkit).
5921
+ $experimental-support-for-webkit : true !default;
5922
+ // Support for webkit's original (non-standard) gradient syntax.
5923
+ $support-for-original-webkit-gradients : true !default;
5924
+ // Support for opera in experimental css3 properties (-o).
5925
+ $experimental-support-for-opera : true !default;
5926
+ // Support for microsoft in experimental css3 properties (-ms).
5927
+ $experimental-support-for-microsoft : true !default;
5928
+ // Support for khtml in experimental css3 properties (-khtml).
5929
+ $experimental-support-for-khtml : false !default;
5930
+ // Support for svg in experimental css3 properties.
5931
+ // Setting this to true might add significant size to your
5932
+ // generated stylesheets.
5933
+ $experimental-support-for-svg : false !default;
5934
+ // Support for CSS PIE in experimental css3 properties (-pie).
5935
+ $experimental-support-for-pie : false !default;
5936
+
5937
+
5938
+ // This mixin provides basic support for CSS3 properties and
5939
+ // their corresponding experimental CSS2 properties when
5940
+ // the implementations are identical except for the property
5941
+ // prefix.
5371
5942
  @mixin experimental($property, $value,
5372
5943
  $moz : $experimental-support-for-mozilla,
5373
5944
  $webkit : $experimental-support-for-webkit,
@@ -5401,213 +5972,961 @@ $experimental-support-for-pie : false !default;
5401
5972
  @if $official { #{$property} : #{$value}; }
5402
5973
  }
5403
5974
 
5975
+ //
5976
+ // A partial implementation of the Ruby list functions from Compass:
5977
+ // https://github.com/Compass/compass/blob/stable/lib/compass/sass_extensions/functions/lists.rb
5978
+ //
5404
5979
 
5405
- // These defaults make the arguments optional for this mixin
5406
- // If you like, set different defaults in your project
5407
5980
 
5408
- $default-text-shadow-color: #aaa !default;
5409
- $default-text-shadow-h-offset: 0px !default;
5410
- $default-text-shadow-v-offset: 0px !default;
5411
- $default-text-shadow-blur: 1px !default;
5412
- $default-text-shadow-spread: false !default;
5981
+ // compact is part of libsass
5413
5982
 
5414
- // Provides cross-browser text shadows when one or more shadows are needed.
5415
- // Each shadow argument should adhere to the standard css3 syntax for the
5416
- // text-shadow property.
5417
- //
5418
- // Note: if any shadow has a spread parameter, this will cause the mixin
5419
- // to emit the shadow declaration twice, first without the spread,
5420
- // then with the spread included. This allows you to progressively
5421
- // enhance the browsers that do support the spread parameter.
5422
- @mixin text-shadow(
5423
- $shadow-1 : default,
5424
- $shadow-2 : false,
5425
- $shadow-3 : false,
5426
- $shadow-4 : false,
5427
- $shadow-5 : false,
5428
- $shadow-6 : false,
5429
- $shadow-7 : false,
5430
- $shadow-8 : false,
5431
- $shadow-9 : false,
5432
- $shadow-10: false
5433
- ) {
5434
- @if $shadow-1 == default {
5435
- $shadow-1: compact($default-text-shadow-h-offset $default-text-shadow-v-offset $default-text-shadow-blur $default-text-shadow-spread $default-text-shadow-color);
5436
- }
5437
- $shadows-without-spread: join((),(),comma);
5438
- $shadows: join((),(),comma);
5439
- $has-spread: false;
5440
- @each $shadow in compact($shadow-1, $shadow-2, $shadow-3, $shadow-4, $shadow-5,
5441
- $shadow-6, $shadow-7, $shadow-8, $shadow-9, $shadow-10) {
5442
- @if length($shadow) > 4 {
5443
- $has-spread: true;
5444
- $shadows-without-spread: append($shadows-without-spread, nth($shadow,1) nth($shadow,2) nth($shadow,3) nth($shadow,5));
5445
- $shadows: append($shadows, $shadow);
5446
- } else {
5447
- $shadows-without-spread: append($shadows-without-spread, $shadow);
5448
- $shadows: append($shadows, $shadow);
5449
- }
5983
+ @function -compass-nth($list, $place) {
5984
+ // Yep, Sass-lists are 1-indexed.
5985
+ @if $place == "first" {
5986
+ $place: 1;
5450
5987
  }
5451
- @if $has-spread {
5452
- text-shadow: $shadows-without-spread;
5988
+ @if $place == "last" {
5989
+ $place: length($list);
5453
5990
  }
5454
- text-shadow: $shadows;
5991
+ @return nth($list, $place);
5455
5992
  }
5456
5993
 
5457
- // Provides a single cross-browser CSS text shadow.
5458
- //
5459
- // Provides sensible defaults for the color, horizontal offset, vertical offset, blur, and spread
5460
- // according to the configuration defaults above.
5461
- @mixin single-text-shadow(
5462
- $hoff: false,
5463
- $voff: false,
5464
- $blur: false,
5465
- $spread: false,
5466
- $color: false
5467
- ) {
5468
- // A lot of people think the color comes first. It doesn't.
5469
- @if type-of($hoff) == color {
5470
- $temp-color: $hoff;
5471
- $hoff: $voff;
5472
- $voff: $blur;
5473
- $blur: $spread;
5474
- $spread: $color;
5475
- $color: $temp-color;
5476
- }
5477
- // Can't rely on default assignment with multiple supported argument orders.
5478
- $hoff: if($hoff, $hoff, $default-text-shadow-h-offset);
5479
- $voff: if($voff, $voff, $default-text-shadow-v-offset);
5480
- $blur: if($blur, $blur, $default-text-shadow-blur );
5481
- $spread: if($spread, $spread, $default-text-shadow-spread );
5482
- $color: if($color, $color, $default-text-shadow-color );
5483
- // We don't need experimental support for this property.
5484
- @if $color == none or $hoff == none {
5485
- @include text-shadow(none);
5994
+ // compass_list can't be implemented in sass script
5995
+
5996
+ @function -compass-space-list($item1, $item2:null, $item3:null, $item4:null, $item5:null, $item6:null, $item7:null, $item8:null, $item9:null) {
5997
+ $items: ();
5998
+ // Support for polymorphism.
5999
+ @if type-of($item1) == 'list' {
6000
+ // Passing a single array of properties.
6001
+ $items: $item1;
5486
6002
  } @else {
5487
- @include text-shadow(compact($hoff $voff $blur $spread $color));
6003
+ $items: $item1 $item2 $item3 $item4 $item5 $item6 $item7 $item8 $item9;
5488
6004
  }
5489
- }
5490
-
5491
- // Usually compass hacks apply to both ie6 & 7 -- set this to false to disable support for both.
5492
- $legacy-support-for-ie: true !default;
5493
-
5494
- // Setting this to false will result in smaller output, but no support for ie6 hacks
5495
- $legacy-support-for-ie6: $legacy-support-for-ie !default;
5496
-
5497
- // Setting this to false will result in smaller output, but no support for ie7 hacks
5498
- $legacy-support-for-ie7: $legacy-support-for-ie !default;
5499
-
5500
- // Setting this to false will result in smaller output, but no support for legacy ie8 hacks
5501
- $legacy-support-for-ie8: $legacy-support-for-ie !default;
5502
-
5503
- // @private
5504
- // The user can simply set $legacy-support-for-ie and 6, 7, and 8 will be set accordingly,
5505
- // But in case the user set each of those explicitly, we need to sync the value of
5506
- // this combined variable.
5507
- $legacy-support-for-ie: $legacy-support-for-ie6 or $legacy-support-for-ie7 or $legacy-support-for-ie8;
5508
6005
 
5509
- // Whether to output legacy support for mozilla.
5510
- // Usually this means hacks to support Firefox 3.6 or earlier.
5511
- $legacy-support-for-mozilla: true;
6006
+ $full: first-value-of($items);
5512
6007
 
5513
- // Support for mozilla in experimental css3 properties (-moz).
5514
- $experimental-support-for-mozilla : true !default;
5515
- // Support for webkit in experimental css3 properties (-webkit).
5516
- $experimental-support-for-webkit : true !default;
5517
- // Support for webkit's original (non-standard) gradient syntax.
5518
- $support-for-original-webkit-gradients : true !default;
5519
- // Support for opera in experimental css3 properties (-o).
5520
- $experimental-support-for-opera : true !default;
5521
- // Support for microsoft in experimental css3 properties (-ms).
5522
- $experimental-support-for-microsoft : true !default;
5523
- // Support for khtml in experimental css3 properties (-khtml).
5524
- $experimental-support-for-khtml : false !default;
5525
- // Support for svg in experimental css3 properties.
5526
- // Setting this to true might add significant size to your
5527
- // generated stylesheets.
5528
- $experimental-support-for-svg : false !default;
5529
- // Support for CSS PIE in experimental css3 properties (-pie).
5530
- $experimental-support-for-pie : false !default;
6008
+ @for $i from 2 through length($items) {
6009
+ $item: nth($items, $i);
6010
+ @if $item != null {
6011
+ $full: $full $item;
6012
+ }
6013
+ }
5531
6014
 
6015
+ @return $full;
6016
+ }
5532
6017
 
5533
- // This mixin provides basic support for CSS3 properties and
5534
- // their corresponding experimental CSS2 properties when
5535
- // the implementations are identical except for the property
5536
- // prefix.
5537
- @mixin experimental($property, $value,
5538
- $moz : $experimental-support-for-mozilla,
5539
- $webkit : $experimental-support-for-webkit,
5540
- $o : $experimental-support-for-opera,
5541
- $ms : $experimental-support-for-microsoft,
5542
- $khtml : $experimental-support-for-khtml,
5543
- $official : true
5544
- ) {
5545
- @if $webkit and $experimental-support-for-webkit { -webkit-#{$property} : $value; }
5546
- @if $khtml and $experimental-support-for-khtml { -khtml-#{$property} : $value; }
5547
- @if $moz and $experimental-support-for-mozilla { -moz-#{$property} : $value; }
5548
- @if $ms and $experimental-support-for-microsoft { -ms-#{$property} : $value; }
5549
- @if $o and $experimental-support-for-opera { -o-#{$property} : $value; }
5550
- @if $official { #{$property} : $value; }
6018
+ @function -compass-list-size($list) {
6019
+ @return length($list);
5551
6020
  }
5552
6021
 
5553
- // Same as experimental(), but for cases when the property is the same and the value is vendorized
5554
- @mixin experimental-value($property, $value,
5555
- $moz : $experimental-support-for-mozilla,
5556
- $webkit : $experimental-support-for-webkit,
5557
- $o : $experimental-support-for-opera,
5558
- $ms : $experimental-support-for-microsoft,
5559
- $khtml : $experimental-support-for-khtml,
5560
- $official : true
5561
- ) {
5562
- @if $webkit and $experimental-support-for-webkit { #{$property} : -webkit-#{$value}; }
5563
- @if $khtml and $experimental-support-for-khtml { #{$property} : -khtml-#{$value}; }
5564
- @if $moz and $experimental-support-for-mozilla { #{$property} : -moz-#{$value}; }
5565
- @if $ms and $experimental-support-for-microsoft { #{$property} : -ms-#{$value}; }
5566
- @if $o and $experimental-support-for-opera { #{$property} : -o-#{$value}; }
5567
- @if $official { #{$property} : #{$value}; }
6022
+ @function -compass-slice($list, $start, $end: false) {
6023
+ @if $end == false {
6024
+ $end: length($list);
6025
+ }
6026
+ $full: nth($list, $start);
6027
+ @for $i from $start + 1 through $end {
6028
+ $full: $full, nth($list, $i);
6029
+ }
6030
+ @return $full;
5568
6031
  }
5569
6032
 
6033
+ @function reject($list, $reject1, $reject2:null, $reject3:null, $reject4:null, $reject5:null, $reject6:null, $reject7:null, $reject8:null, $reject9:null) {
6034
+ $rejects: $reject1, $reject2, $reject3, $reject4, $reject5, $reject6, $reject7, $reject8, $reject9;
5570
6035
 
5571
- // Specify the shorthand `columns` property.
5572
- //
5573
- // Example:
5574
- //
5575
- // @include columns(20em 2)
5576
- @mixin columns($width-and-count) {
5577
- @include experimental(columns, $width-and-count,
5578
- -moz, -webkit, -o, -ms, not(-khtml), official
5579
- );
6036
+ $full: false;
6037
+ @each $item in $list {
6038
+ @if index($rejects, $item) {}
6039
+ @else {
6040
+ @if $full {
6041
+ $full: $full, $item;
6042
+ }
6043
+ @else {
6044
+ $full: $item;
6045
+ }
6046
+ }
6047
+ }
6048
+ @return $full;
5580
6049
  }
5581
6050
 
5582
- // Specify the number of columns
5583
- @mixin column-count($count) {
5584
- @include experimental(column-count, $count,
5585
- -moz, -webkit, -o, -ms, not(-khtml), official
5586
- );
6051
+ @function first-value-of($list) {
6052
+ @return nth($list, 1);
5587
6053
  }
5588
6054
 
5589
- // Specify the gap between columns e.g. `20px`
5590
- @mixin column-gap($width) {
5591
- @include experimental(column-gap, $width,
5592
- -moz, -webkit, -o, -ms, not(-khtml), official
5593
- );
6055
+ @function compact($vars...) {
6056
+ $separator: list-separator($vars);
6057
+ $list: ();
6058
+ @each $var in $vars {
6059
+ @if $var {
6060
+ $list: append($list, $var, $separator);
6061
+ }
6062
+ }
6063
+ @return $list;
5594
6064
  }
5595
6065
 
5596
- // Specify the width of columns e.g. `100px`
5597
- @mixin column-width($width) {
5598
- @include experimental(column-width, $width,
5599
- -moz, -webkit, -o, -ms, not(-khtml), official
5600
- );
5601
- }
6066
+ //
6067
+ // A partial implementation of the Ruby cross browser support functions from Compass:
6068
+ // https://github.com/Compass/compass/blob/stable/lib/compass/sass_extensions/functions/cross_browser_support.rb
6069
+ //
5602
6070
 
5603
- // Specify the width of the rule between columns e.g. `1px`
5604
- @mixin column-rule-width($width) {
5605
- @include experimental(column-rule-width, $width,
5606
- -moz, -webkit, -o, -ms, not(-khtml), official
5607
- );
6071
+ @function prefixed($prefix, $property1, $property2:null, $property3:null, $property4:null, $property5:null, $property6:null, $property7:null, $property8:null, $property9:null) {
6072
+ $properties: $property1, $property2, $property3, $property4, $property5, $property6, $property7, $property8, $property9;
6073
+ $prefixed: false;
6074
+ @each $item in $properties {
6075
+ @if type-of($item) == 'string' {
6076
+ $prefixed: $prefixed or str-index($item, 'url') != 1 and str-index($item, 'rgb') != 1 and str-index($item, '#') != 1;
6077
+ } @else if type-of($item) == 'color' {
6078
+ } @else if $item != null {
6079
+ $prefixed: true;
6080
+ }
6081
+ }
6082
+ @return $prefixed;
5608
6083
  }
5609
6084
 
5610
- // Specify the style of the rule between columns e.g. `dotted`.
6085
+ @function prefix($prefix, $property1, $property2:null, $property3:null, $property4:null, $property5:null, $property6:null, $property7:null, $property8:null, $property9:null) {
6086
+ $properties: "";
6087
+
6088
+ // Support for polymorphism.
6089
+ @if type-of($property1) == 'list' {
6090
+ // Passing a single array of properties.
6091
+ $properties: $property1;
6092
+ } @else {
6093
+ // Passing multiple properties.
6094
+ $properties: $property1, $property2, $property3, $property4, $property5, $property6, $property7, $property8, $property9;
6095
+ }
6096
+
6097
+ $props: false;
6098
+ @each $item in $properties {
6099
+ @if $item == null {}
6100
+ @else {
6101
+ @if prefixed($prefix, $item) {
6102
+ $item: #{$prefix}-#{$item};
6103
+ }
6104
+ @if $props {
6105
+ $props: $props, $item;
6106
+ }
6107
+ @else {
6108
+ $props: $item;
6109
+ }
6110
+ }
6111
+ }
6112
+ @return $props;
6113
+ }
6114
+
6115
+ @function -svg($property1, $property2:null, $property3:null, $property4:null, $property5:null, $property6:null, $property7:null, $property8:null, $property9:null) {
6116
+ @return prefix('-svg', $property1, $property2, $property3, $property4, $property5, $property6, $property7, $property8, $property9);
6117
+ }
6118
+
6119
+ @function -owg($property1, $property2:null, $property3:null, $property4:null, $property5:null, $property6:null, $property7:null, $property8:null, $property9:null) {
6120
+ @return prefix('-owg', $property1, $property2, $property3, $property4, $property5, $property6, $property7, $property8, $property9);
6121
+ }
6122
+
6123
+ @function -webkit($property1, $property2:null, $property3:null, $property4:null, $property5:null, $property6:null, $property7:null, $property8:null, $property9:null) {
6124
+ @return prefix('-webkit', $property1, $property2, $property3, $property4, $property5, $property6, $property7, $property8, $property9);
6125
+ }
6126
+
6127
+ @function -moz($property1, $property2:null, $property3:null, $property4:null, $property5:null, $property6:null, $property7:null, $property8:null, $property9:null) {
6128
+ @return prefix('-moz', $property1, $property2, $property3, $property4, $property5, $property6, $property7, $property8, $property9);
6129
+ }
6130
+
6131
+ @function -o($property1, $property2:null, $property3:null, $property4:null, $property5:null, $property6:null, $property7:null, $property8:null, $property9:null) {
6132
+ @return prefix('-o', $property1, $property2, $property3, $property4, $property5, $property6, $property7, $property8, $property9);
6133
+ }
6134
+
6135
+ @function -pie($property1, $property2:null, $property3:null, $property4:null, $property5:null, $property6:null, $property7:null, $property8:null, $property9:null) {
6136
+ @return prefix('-pie', $property1, $property2, $property3, $property4, $property5, $property6, $property7, $property8, $property9);
6137
+ }
6138
+
6139
+ //
6140
+ // A partial implementation of the Ruby gradient support functions from Compass:
6141
+ // https://github.com/Compass/compass/blob/v0.12.2/lib/compass/sass_extensions/functions/gradient_support.rb
6142
+ //
6143
+
6144
+ @function color-stops($item1, $item2:null, $item3:null, $item4:null, $item5:null, $item6:null, $item7:null, $item8:null, $item9:null) {
6145
+ $items: $item2, $item3, $item4, $item5, $item6, $item7, $item8, $item9;
6146
+ $full: $item1;
6147
+ @each $item in $items {
6148
+ @if $item != null {
6149
+ $full: $full, $item;
6150
+ }
6151
+ }
6152
+ @return $full;
6153
+ }
6154
+ //
6155
+ // A partial implementation of the Ruby constants functions from Compass:
6156
+ // https://github.com/Compass/compass/blob/stable/lib/compass/sass_extensions/functions/constants.rb
6157
+ //
6158
+
6159
+ @function opposite-position($from) {
6160
+ @if ($from == top) {
6161
+ @return bottom;
6162
+ } @else if ($from == bottom) {
6163
+ @return top;
6164
+ } @else if ($from == left) {
6165
+ @return right;
6166
+ } @else if ($from == right) {
6167
+ @return left;
6168
+ } @else if ($from == center) {
6169
+ @return center;
6170
+ }
6171
+ }
6172
+
6173
+ //
6174
+ // A partial implementation of the Ruby display functions from Compass:
6175
+ // https://github.com/Compass/compass/blob/stable/core/lib/compass/core/sass_extensions/functions/display.rb
6176
+ //
6177
+
6178
+ @function elements-of-type($type){
6179
+ @if ($type == block){
6180
+ @return address, article, aside, blockquote, center, dir, div, dd, details, dl, dt, fieldset, figcaption, figure, form, footer, frameset, h1, h2, h3, h4, h5, h6, hr, header, hgroup, isindex, main, menu, nav, noframes, noscript, ol, p, pre, section, summary, ul;
6181
+ } @else if ($type == inline){
6182
+ @return a, abbr, acronym, audio, b, basefont, bdo, big, br, canvas, cite, code, command, datalist, dfn, em, embed, font, i, img, input, keygen, kbd, label, mark, meter, output, progress, q, rp, rt, ruby, s, samp, select, small, span, strike, strong, sub, sup, textarea, time, tt, u, var, video, wbr;
6183
+ } @else if ($type == inline-block){
6184
+ @return img;
6185
+ } @else if ($type == table){
6186
+ @return table;
6187
+ } @else if ($type == list-item){
6188
+ @return li;
6189
+ } @else if ($type == table-row-group){
6190
+ @return tbody;
6191
+ } @else if ($type == table-header-group){
6192
+ @return thead;
6193
+ } @else if ($type == table-footer-group){
6194
+ @return tfoot;
6195
+ } @else if ($type == table-row){
6196
+ @return tr;
6197
+ } @else if ($type == table-cell){
6198
+ @return th, td;
6199
+ } @else if ($type == html5-block){
6200
+ @return article, aside, details, figcaption, figure, footer, header, hgroup, main, menu, nav, section, summary;
6201
+ } @else if ($type == html5-inline){
6202
+ @return audio, canvas, command, datalist, embed, keygen, mark, meter, output, progress, rp, rt, ruby, time, video, wbr;
6203
+ } @else if ($type == html5){
6204
+ @return article, aside, audio, canvas, command, datalist, details, embed, figcaption, figure, footer, header, hgroup, keygen, main, mark, menu, meter, nav, output, progress, rp, rt, ruby, section, summary, time, video, wbr;
6205
+ } @else if ($type == text-input){
6206
+ @return input, textarea;
6207
+ }
6208
+ }
6209
+
6210
+ //
6211
+ // A partial implementation of the Ruby colors functions from Compass:
6212
+ // https://github.com/Compass/compass/blob/stable/core/lib/compass/core/sass_extensions/functions/colors.rb
6213
+ //
6214
+
6215
+ // a genericized version of lighten/darken so that negative values can be used.
6216
+ @function adjust-lightness($color, $amount) {
6217
+ @return adjust-color($color, $lightness: $amount);
6218
+ }
6219
+
6220
+ // Scales a color's lightness by some percentage.
6221
+ // If the amount is negative, the color is scaled darker, if positive, it is scaled lighter.
6222
+ // This will never return a pure light or dark color unless the amount is 100%.
6223
+ @function scale-lightness($color, $amount) {
6224
+ @return scale-color($color, $lightness: $amount);
6225
+ }
6226
+
6227
+ // a genericized version of saturate/desaturate so that negative values can be used.
6228
+ @function adjust-saturation($color, $amount) {
6229
+ @return adjust-color($color, $saturation: $amount);
6230
+ }
6231
+
6232
+ // Scales a color's saturation by some percentage.
6233
+ // If the amount is negative, the color is desaturated, if positive, it is saturated.
6234
+ // This will never return a pure saturated or desaturated color unless the amount is 100%.
6235
+ @function scale-saturation($color, $amount) {
6236
+ @return scale-color($color, $saturation: $amount);
6237
+ }
6238
+
6239
+ @function shade($color, $percentage) {
6240
+ @return mix(#000000, $color, $percentage);
6241
+ }
6242
+
6243
+ @function tint($color, $percentage) {
6244
+ @return mix(#ffffff, $color, $percentage);
6245
+ }
6246
+
6247
+
6248
+ //
6249
+ // A partial implementation of the Ruby fonts functions from Compass:
6250
+ // https://github.com/Compass/compass/blob/stable/core/lib/compass/core/sass_extensions/functions/font_files.rb
6251
+ //
6252
+ // and several functions from the file:
6253
+ // https://github.com/Compass/compass/blob/stable/core/lib/compass/core/sass_extensions/functions/urls.rb
6254
+ // -----------------------------------------------------------------------------
6255
+ // Helper functions font-files and font-url for font-face mixins.
6256
+ // -----------------------------------------------------------------------------
6257
+ // use mixin this way:
6258
+ //
6259
+ // $font-path: "/public/fonts/roboto";
6260
+ // @include font-face(
6261
+ // 'Roboto',
6262
+ // font_files("roboto.ttf", "truetype", "roboto.woff", "roboto.woff2"), // or
6263
+ // font_files("roboto.ttf", "roboto.woff", "roboto.woff2"),
6264
+ // "roboto.eot", // [$eot]
6265
+ // normal, // [$weight]
6266
+ // normal // [$style]
6267
+ // );
6268
+ // -----------------------------------------------------------------------------
6269
+
6270
+
6271
+ @function font-url($path) {
6272
+ $font-path: 'fonts' !default;
6273
+ @return url("#{$font-path}/#{$path}");
6274
+ }
6275
+
6276
+
6277
+ // -----------------------------------------------------------------------------
6278
+ // helper function to create a list of font files for the src attribute in @font-face.
6279
+ // In the global variable $font-path, you can specify the path to the folder
6280
+ // with fonts relative to style files, by default the path to the fonts is "fonts".
6281
+ //
6282
+ // Usage: font-files ('file-name-w-ext'[, 'format'][,'file-name-w-ext'[, 'format']]...).
6283
+ // If the font format is not specified, the function will add the format corresponding to the file extension.
6284
+ //
6285
+ // for best results use this order: woff, opentype / truetype, svg.
6286
+ // -----------------------------------------------------------------------------
6287
+ // function ported from Ruby.
6288
+ // -----------------------------------------------------------------------------
6289
+ @function font-files($font-files...) {
6290
+ $font-path: 'fonts' !default;
6291
+ // types of font formats from module Compass::Core::SassExtensions::Functions::FontFiles.
6292
+ $font-types: (
6293
+ 'woff': "woff",
6294
+ 'woff2': "woff2",
6295
+ 'opentype': "otf",
6296
+ // 'opentype': "opentype",
6297
+ 'truetype': "ttf",
6298
+ // 'truetype': "truetype",
6299
+ 'svg': "svg",
6300
+ 'embedded-opentype': "eot"
6301
+ );
6302
+
6303
+ $full: '';
6304
+ // if the font format is specified after the font file name, skip the next iteration.
6305
+ $skip-next: false;
6306
+ // number of font files including font format.
6307
+ $font-file-length: length($font-files);
6308
+
6309
+ @for $i from 1 through $font-file-length {
6310
+ @if(not $skip-next) {
6311
+ $font-file: nth($font-files, $i);
6312
+ $font-file-next: if($i < $font-file-length, nth($font-files, $i + 1), false);
6313
+
6314
+ // add font url.
6315
+ $full: $full + 'url("#{$font-path}/#{$font-file}")';
6316
+
6317
+ // add the font format if it is specified after the font file name.
6318
+ @if $font-file-next and map-has-key($font-types, $font-file-next) {
6319
+ $full: $full + ' format("#{$font-file-next}")';
6320
+ $skip-next: true;
6321
+ } @else {
6322
+ // add a font format based on the font file name extension.
6323
+ @each $type, $extension in $font-types {
6324
+ $pos: str-index($font-file, '.' + $extension);
6325
+
6326
+ @if($font-file-next == $extension) {
6327
+ $full: $full + ' format("#{$type}")';
6328
+ $skip-next: true;
6329
+ } @else if ($pos and (to-lower-case(str-slice($font-file, $pos + 1)) == $extension)) {
6330
+ $full: $full + ' format("#{$type}")';
6331
+ }
6332
+ }
6333
+ }
6334
+ } @else {
6335
+ $skip-next: false;
6336
+ }
6337
+
6338
+ @if (not $skip-next and $i != $font-file-length) { $full: $full + ', ';}
6339
+ }
6340
+
6341
+ @return unquote($full);
6342
+ }
6343
+
6344
+
6345
+
6346
+ // These defaults make the arguments optional for this mixin
6347
+ // If you like, set different defaults in your project
6348
+
6349
+ $default-text-shadow-color: #aaa !default;
6350
+ $default-text-shadow-h-offset: 0px !default;
6351
+ $default-text-shadow-v-offset: 0px !default;
6352
+ $default-text-shadow-blur: 1px !default;
6353
+ $default-text-shadow-spread: false !default;
6354
+
6355
+ // Provides cross-browser text shadows when one or more shadows are needed.
6356
+ // Each shadow argument should adhere to the standard css3 syntax for the
6357
+ // text-shadow property.
6358
+ //
6359
+ // Note: if any shadow has a spread parameter, this will cause the mixin
6360
+ // to emit the shadow declaration twice, first without the spread,
6361
+ // then with the spread included. This allows you to progressively
6362
+ // enhance the browsers that do support the spread parameter.
6363
+ @mixin text-shadow(
6364
+ $shadow-1 : default,
6365
+ $shadow-2 : false,
6366
+ $shadow-3 : false,
6367
+ $shadow-4 : false,
6368
+ $shadow-5 : false,
6369
+ $shadow-6 : false,
6370
+ $shadow-7 : false,
6371
+ $shadow-8 : false,
6372
+ $shadow-9 : false,
6373
+ $shadow-10: false
6374
+ ) {
6375
+ @if $shadow-1 == default {
6376
+ $shadow-1: compact($default-text-shadow-h-offset $default-text-shadow-v-offset $default-text-shadow-blur $default-text-shadow-spread $default-text-shadow-color);
6377
+ }
6378
+ $shadows-without-spread: join((),(),comma);
6379
+ $shadows: join((),(),comma);
6380
+ $has-spread: false;
6381
+ @each $shadow in compact($shadow-1, $shadow-2, $shadow-3, $shadow-4, $shadow-5,
6382
+ $shadow-6, $shadow-7, $shadow-8, $shadow-9, $shadow-10) {
6383
+ @if length($shadow) > 4 {
6384
+ $has-spread: true;
6385
+ $shadows-without-spread: append($shadows-without-spread, nth($shadow,1) nth($shadow,2) nth($shadow,3) nth($shadow,5));
6386
+ $shadows: append($shadows, $shadow);
6387
+ } else {
6388
+ $shadows-without-spread: append($shadows-without-spread, $shadow);
6389
+ $shadows: append($shadows, $shadow);
6390
+ }
6391
+ }
6392
+ @if $has-spread {
6393
+ text-shadow: $shadows-without-spread;
6394
+ }
6395
+ text-shadow: $shadows;
6396
+ }
6397
+
6398
+ // Provides a single cross-browser CSS text shadow.
6399
+ //
6400
+ // Provides sensible defaults for the color, horizontal offset, vertical offset, blur, and spread
6401
+ // according to the configuration defaults above.
6402
+ @mixin single-text-shadow(
6403
+ $hoff: false,
6404
+ $voff: false,
6405
+ $blur: false,
6406
+ $spread: false,
6407
+ $color: false
6408
+ ) {
6409
+ // A lot of people think the color comes first. It doesn't.
6410
+ @if type-of($hoff) == color {
6411
+ $temp-color: $hoff;
6412
+ $hoff: $voff;
6413
+ $voff: $blur;
6414
+ $blur: $spread;
6415
+ $spread: $color;
6416
+ $color: $temp-color;
6417
+ }
6418
+ // Can't rely on default assignment with multiple supported argument orders.
6419
+ $hoff: if($hoff, $hoff, $default-text-shadow-h-offset);
6420
+ $voff: if($voff, $voff, $default-text-shadow-v-offset);
6421
+ $blur: if($blur, $blur, $default-text-shadow-blur );
6422
+ $spread: if($spread, $spread, $default-text-shadow-spread );
6423
+ $color: if($color, $color, $default-text-shadow-color );
6424
+ // We don't need experimental support for this property.
6425
+ @if $color == none or $hoff == none {
6426
+ @include text-shadow(none);
6427
+ } @else {
6428
+ @include text-shadow(compact($hoff $voff $blur $spread $color));
6429
+ }
6430
+ }
6431
+
6432
+ // Usually compass hacks apply to both ie6 & 7 -- set this to false to disable support for both.
6433
+ $legacy-support-for-ie: true !default;
6434
+
6435
+ // Setting this to false will result in smaller output, but no support for ie6 hacks
6436
+ $legacy-support-for-ie6: $legacy-support-for-ie !default;
6437
+
6438
+ // Setting this to false will result in smaller output, but no support for ie7 hacks
6439
+ $legacy-support-for-ie7: $legacy-support-for-ie !default;
6440
+
6441
+ // Setting this to false will result in smaller output, but no support for legacy ie8 hacks
6442
+ $legacy-support-for-ie8: $legacy-support-for-ie !default;
6443
+
6444
+ // @private
6445
+ // The user can simply set $legacy-support-for-ie and 6, 7, and 8 will be set accordingly,
6446
+ // But in case the user set each of those explicitly, we need to sync the value of
6447
+ // this combined variable.
6448
+ $legacy-support-for-ie: $legacy-support-for-ie6 or $legacy-support-for-ie7 or $legacy-support-for-ie8;
6449
+
6450
+ // Whether to output legacy support for mozilla.
6451
+ // Usually this means hacks to support Firefox 3.6 or earlier.
6452
+ $legacy-support-for-mozilla: true;
6453
+
6454
+ // Support for mozilla in experimental css3 properties (-moz).
6455
+ $experimental-support-for-mozilla : true !default;
6456
+ // Support for webkit in experimental css3 properties (-webkit).
6457
+ $experimental-support-for-webkit : true !default;
6458
+ // Support for webkit's original (non-standard) gradient syntax.
6459
+ $support-for-original-webkit-gradients : true !default;
6460
+ // Support for opera in experimental css3 properties (-o).
6461
+ $experimental-support-for-opera : true !default;
6462
+ // Support for microsoft in experimental css3 properties (-ms).
6463
+ $experimental-support-for-microsoft : true !default;
6464
+ // Support for khtml in experimental css3 properties (-khtml).
6465
+ $experimental-support-for-khtml : false !default;
6466
+ // Support for svg in experimental css3 properties.
6467
+ // Setting this to true might add significant size to your
6468
+ // generated stylesheets.
6469
+ $experimental-support-for-svg : false !default;
6470
+ // Support for CSS PIE in experimental css3 properties (-pie).
6471
+ $experimental-support-for-pie : false !default;
6472
+
6473
+
6474
+ // This mixin provides basic support for CSS3 properties and
6475
+ // their corresponding experimental CSS2 properties when
6476
+ // the implementations are identical except for the property
6477
+ // prefix.
6478
+ @mixin experimental($property, $value,
6479
+ $moz : $experimental-support-for-mozilla,
6480
+ $webkit : $experimental-support-for-webkit,
6481
+ $o : $experimental-support-for-opera,
6482
+ $ms : $experimental-support-for-microsoft,
6483
+ $khtml : $experimental-support-for-khtml,
6484
+ $official : true
6485
+ ) {
6486
+ @if $webkit and $experimental-support-for-webkit { -webkit-#{$property} : $value; }
6487
+ @if $khtml and $experimental-support-for-khtml { -khtml-#{$property} : $value; }
6488
+ @if $moz and $experimental-support-for-mozilla { -moz-#{$property} : $value; }
6489
+ @if $ms and $experimental-support-for-microsoft { -ms-#{$property} : $value; }
6490
+ @if $o and $experimental-support-for-opera { -o-#{$property} : $value; }
6491
+ @if $official { #{$property} : $value; }
6492
+ }
6493
+
6494
+ // Same as experimental(), but for cases when the property is the same and the value is vendorized
6495
+ @mixin experimental-value($property, $value,
6496
+ $moz : $experimental-support-for-mozilla,
6497
+ $webkit : $experimental-support-for-webkit,
6498
+ $o : $experimental-support-for-opera,
6499
+ $ms : $experimental-support-for-microsoft,
6500
+ $khtml : $experimental-support-for-khtml,
6501
+ $official : true
6502
+ ) {
6503
+ @if $webkit and $experimental-support-for-webkit { #{$property} : -webkit-#{$value}; }
6504
+ @if $khtml and $experimental-support-for-khtml { #{$property} : -khtml-#{$value}; }
6505
+ @if $moz and $experimental-support-for-mozilla { #{$property} : -moz-#{$value}; }
6506
+ @if $ms and $experimental-support-for-microsoft { #{$property} : -ms-#{$value}; }
6507
+ @if $o and $experimental-support-for-opera { #{$property} : -o-#{$value}; }
6508
+ @if $official { #{$property} : #{$value}; }
6509
+ }
6510
+
6511
+ //
6512
+ // A partial implementation of the Ruby list functions from Compass:
6513
+ // https://github.com/Compass/compass/blob/stable/lib/compass/sass_extensions/functions/lists.rb
6514
+ //
6515
+
6516
+
6517
+ // compact is part of libsass
6518
+
6519
+ @function -compass-nth($list, $place) {
6520
+ // Yep, Sass-lists are 1-indexed.
6521
+ @if $place == "first" {
6522
+ $place: 1;
6523
+ }
6524
+ @if $place == "last" {
6525
+ $place: length($list);
6526
+ }
6527
+ @return nth($list, $place);
6528
+ }
6529
+
6530
+ // compass_list can't be implemented in sass script
6531
+
6532
+ @function -compass-space-list($item1, $item2:null, $item3:null, $item4:null, $item5:null, $item6:null, $item7:null, $item8:null, $item9:null) {
6533
+ $items: ();
6534
+ // Support for polymorphism.
6535
+ @if type-of($item1) == 'list' {
6536
+ // Passing a single array of properties.
6537
+ $items: $item1;
6538
+ } @else {
6539
+ $items: $item1 $item2 $item3 $item4 $item5 $item6 $item7 $item8 $item9;
6540
+ }
6541
+
6542
+ $full: first-value-of($items);
6543
+
6544
+ @for $i from 2 through length($items) {
6545
+ $item: nth($items, $i);
6546
+ @if $item != null {
6547
+ $full: $full $item;
6548
+ }
6549
+ }
6550
+
6551
+ @return $full;
6552
+ }
6553
+
6554
+ @function -compass-list-size($list) {
6555
+ @return length($list);
6556
+ }
6557
+
6558
+ @function -compass-slice($list, $start, $end: false) {
6559
+ @if $end == false {
6560
+ $end: length($list);
6561
+ }
6562
+ $full: nth($list, $start);
6563
+ @for $i from $start + 1 through $end {
6564
+ $full: $full, nth($list, $i);
6565
+ }
6566
+ @return $full;
6567
+ }
6568
+
6569
+ @function reject($list, $reject1, $reject2:null, $reject3:null, $reject4:null, $reject5:null, $reject6:null, $reject7:null, $reject8:null, $reject9:null) {
6570
+ $rejects: $reject1, $reject2, $reject3, $reject4, $reject5, $reject6, $reject7, $reject8, $reject9;
6571
+
6572
+ $full: false;
6573
+ @each $item in $list {
6574
+ @if index($rejects, $item) {}
6575
+ @else {
6576
+ @if $full {
6577
+ $full: $full, $item;
6578
+ }
6579
+ @else {
6580
+ $full: $item;
6581
+ }
6582
+ }
6583
+ }
6584
+ @return $full;
6585
+ }
6586
+
6587
+ @function first-value-of($list) {
6588
+ @return nth($list, 1);
6589
+ }
6590
+
6591
+ @function compact($vars...) {
6592
+ $separator: list-separator($vars);
6593
+ $list: ();
6594
+ @each $var in $vars {
6595
+ @if $var {
6596
+ $list: append($list, $var, $separator);
6597
+ }
6598
+ }
6599
+ @return $list;
6600
+ }
6601
+
6602
+ //
6603
+ // A partial implementation of the Ruby cross browser support functions from Compass:
6604
+ // https://github.com/Compass/compass/blob/stable/lib/compass/sass_extensions/functions/cross_browser_support.rb
6605
+ //
6606
+
6607
+ @function prefixed($prefix, $property1, $property2:null, $property3:null, $property4:null, $property5:null, $property6:null, $property7:null, $property8:null, $property9:null) {
6608
+ $properties: $property1, $property2, $property3, $property4, $property5, $property6, $property7, $property8, $property9;
6609
+ $prefixed: false;
6610
+ @each $item in $properties {
6611
+ @if type-of($item) == 'string' {
6612
+ $prefixed: $prefixed or str-index($item, 'url') != 1 and str-index($item, 'rgb') != 1 and str-index($item, '#') != 1;
6613
+ } @else if type-of($item) == 'color' {
6614
+ } @else if $item != null {
6615
+ $prefixed: true;
6616
+ }
6617
+ }
6618
+ @return $prefixed;
6619
+ }
6620
+
6621
+ @function prefix($prefix, $property1, $property2:null, $property3:null, $property4:null, $property5:null, $property6:null, $property7:null, $property8:null, $property9:null) {
6622
+ $properties: "";
6623
+
6624
+ // Support for polymorphism.
6625
+ @if type-of($property1) == 'list' {
6626
+ // Passing a single array of properties.
6627
+ $properties: $property1;
6628
+ } @else {
6629
+ // Passing multiple properties.
6630
+ $properties: $property1, $property2, $property3, $property4, $property5, $property6, $property7, $property8, $property9;
6631
+ }
6632
+
6633
+ $props: false;
6634
+ @each $item in $properties {
6635
+ @if $item == null {}
6636
+ @else {
6637
+ @if prefixed($prefix, $item) {
6638
+ $item: #{$prefix}-#{$item};
6639
+ }
6640
+ @if $props {
6641
+ $props: $props, $item;
6642
+ }
6643
+ @else {
6644
+ $props: $item;
6645
+ }
6646
+ }
6647
+ }
6648
+ @return $props;
6649
+ }
6650
+
6651
+ @function -svg($property1, $property2:null, $property3:null, $property4:null, $property5:null, $property6:null, $property7:null, $property8:null, $property9:null) {
6652
+ @return prefix('-svg', $property1, $property2, $property3, $property4, $property5, $property6, $property7, $property8, $property9);
6653
+ }
6654
+
6655
+ @function -owg($property1, $property2:null, $property3:null, $property4:null, $property5:null, $property6:null, $property7:null, $property8:null, $property9:null) {
6656
+ @return prefix('-owg', $property1, $property2, $property3, $property4, $property5, $property6, $property7, $property8, $property9);
6657
+ }
6658
+
6659
+ @function -webkit($property1, $property2:null, $property3:null, $property4:null, $property5:null, $property6:null, $property7:null, $property8:null, $property9:null) {
6660
+ @return prefix('-webkit', $property1, $property2, $property3, $property4, $property5, $property6, $property7, $property8, $property9);
6661
+ }
6662
+
6663
+ @function -moz($property1, $property2:null, $property3:null, $property4:null, $property5:null, $property6:null, $property7:null, $property8:null, $property9:null) {
6664
+ @return prefix('-moz', $property1, $property2, $property3, $property4, $property5, $property6, $property7, $property8, $property9);
6665
+ }
6666
+
6667
+ @function -o($property1, $property2:null, $property3:null, $property4:null, $property5:null, $property6:null, $property7:null, $property8:null, $property9:null) {
6668
+ @return prefix('-o', $property1, $property2, $property3, $property4, $property5, $property6, $property7, $property8, $property9);
6669
+ }
6670
+
6671
+ @function -pie($property1, $property2:null, $property3:null, $property4:null, $property5:null, $property6:null, $property7:null, $property8:null, $property9:null) {
6672
+ @return prefix('-pie', $property1, $property2, $property3, $property4, $property5, $property6, $property7, $property8, $property9);
6673
+ }
6674
+
6675
+ //
6676
+ // A partial implementation of the Ruby gradient support functions from Compass:
6677
+ // https://github.com/Compass/compass/blob/v0.12.2/lib/compass/sass_extensions/functions/gradient_support.rb
6678
+ //
6679
+
6680
+ @function color-stops($item1, $item2:null, $item3:null, $item4:null, $item5:null, $item6:null, $item7:null, $item8:null, $item9:null) {
6681
+ $items: $item2, $item3, $item4, $item5, $item6, $item7, $item8, $item9;
6682
+ $full: $item1;
6683
+ @each $item in $items {
6684
+ @if $item != null {
6685
+ $full: $full, $item;
6686
+ }
6687
+ }
6688
+ @return $full;
6689
+ }
6690
+ //
6691
+ // A partial implementation of the Ruby constants functions from Compass:
6692
+ // https://github.com/Compass/compass/blob/stable/lib/compass/sass_extensions/functions/constants.rb
6693
+ //
6694
+
6695
+ @function opposite-position($from) {
6696
+ @if ($from == top) {
6697
+ @return bottom;
6698
+ } @else if ($from == bottom) {
6699
+ @return top;
6700
+ } @else if ($from == left) {
6701
+ @return right;
6702
+ } @else if ($from == right) {
6703
+ @return left;
6704
+ } @else if ($from == center) {
6705
+ @return center;
6706
+ }
6707
+ }
6708
+
6709
+ //
6710
+ // A partial implementation of the Ruby display functions from Compass:
6711
+ // https://github.com/Compass/compass/blob/stable/core/lib/compass/core/sass_extensions/functions/display.rb
6712
+ //
6713
+
6714
+ @function elements-of-type($type){
6715
+ @if ($type == block){
6716
+ @return address, article, aside, blockquote, center, dir, div, dd, details, dl, dt, fieldset, figcaption, figure, form, footer, frameset, h1, h2, h3, h4, h5, h6, hr, header, hgroup, isindex, main, menu, nav, noframes, noscript, ol, p, pre, section, summary, ul;
6717
+ } @else if ($type == inline){
6718
+ @return a, abbr, acronym, audio, b, basefont, bdo, big, br, canvas, cite, code, command, datalist, dfn, em, embed, font, i, img, input, keygen, kbd, label, mark, meter, output, progress, q, rp, rt, ruby, s, samp, select, small, span, strike, strong, sub, sup, textarea, time, tt, u, var, video, wbr;
6719
+ } @else if ($type == inline-block){
6720
+ @return img;
6721
+ } @else if ($type == table){
6722
+ @return table;
6723
+ } @else if ($type == list-item){
6724
+ @return li;
6725
+ } @else if ($type == table-row-group){
6726
+ @return tbody;
6727
+ } @else if ($type == table-header-group){
6728
+ @return thead;
6729
+ } @else if ($type == table-footer-group){
6730
+ @return tfoot;
6731
+ } @else if ($type == table-row){
6732
+ @return tr;
6733
+ } @else if ($type == table-cell){
6734
+ @return th, td;
6735
+ } @else if ($type == html5-block){
6736
+ @return article, aside, details, figcaption, figure, footer, header, hgroup, main, menu, nav, section, summary;
6737
+ } @else if ($type == html5-inline){
6738
+ @return audio, canvas, command, datalist, embed, keygen, mark, meter, output, progress, rp, rt, ruby, time, video, wbr;
6739
+ } @else if ($type == html5){
6740
+ @return article, aside, audio, canvas, command, datalist, details, embed, figcaption, figure, footer, header, hgroup, keygen, main, mark, menu, meter, nav, output, progress, rp, rt, ruby, section, summary, time, video, wbr;
6741
+ } @else if ($type == text-input){
6742
+ @return input, textarea;
6743
+ }
6744
+ }
6745
+
6746
+ //
6747
+ // A partial implementation of the Ruby colors functions from Compass:
6748
+ // https://github.com/Compass/compass/blob/stable/core/lib/compass/core/sass_extensions/functions/colors.rb
6749
+ //
6750
+
6751
+ // a genericized version of lighten/darken so that negative values can be used.
6752
+ @function adjust-lightness($color, $amount) {
6753
+ @return adjust-color($color, $lightness: $amount);
6754
+ }
6755
+
6756
+ // Scales a color's lightness by some percentage.
6757
+ // If the amount is negative, the color is scaled darker, if positive, it is scaled lighter.
6758
+ // This will never return a pure light or dark color unless the amount is 100%.
6759
+ @function scale-lightness($color, $amount) {
6760
+ @return scale-color($color, $lightness: $amount);
6761
+ }
6762
+
6763
+ // a genericized version of saturate/desaturate so that negative values can be used.
6764
+ @function adjust-saturation($color, $amount) {
6765
+ @return adjust-color($color, $saturation: $amount);
6766
+ }
6767
+
6768
+ // Scales a color's saturation by some percentage.
6769
+ // If the amount is negative, the color is desaturated, if positive, it is saturated.
6770
+ // This will never return a pure saturated or desaturated color unless the amount is 100%.
6771
+ @function scale-saturation($color, $amount) {
6772
+ @return scale-color($color, $saturation: $amount);
6773
+ }
6774
+
6775
+ @function shade($color, $percentage) {
6776
+ @return mix(#000000, $color, $percentage);
6777
+ }
6778
+
6779
+ @function tint($color, $percentage) {
6780
+ @return mix(#ffffff, $color, $percentage);
6781
+ }
6782
+
6783
+
6784
+ //
6785
+ // A partial implementation of the Ruby fonts functions from Compass:
6786
+ // https://github.com/Compass/compass/blob/stable/core/lib/compass/core/sass_extensions/functions/font_files.rb
6787
+ //
6788
+ // and several functions from the file:
6789
+ // https://github.com/Compass/compass/blob/stable/core/lib/compass/core/sass_extensions/functions/urls.rb
6790
+ // -----------------------------------------------------------------------------
6791
+ // Helper functions font-files and font-url for font-face mixins.
6792
+ // -----------------------------------------------------------------------------
6793
+ // use mixin this way:
6794
+ //
6795
+ // $font-path: "/public/fonts/roboto";
6796
+ // @include font-face(
6797
+ // 'Roboto',
6798
+ // font_files("roboto.ttf", "truetype", "roboto.woff", "roboto.woff2"), // or
6799
+ // font_files("roboto.ttf", "roboto.woff", "roboto.woff2"),
6800
+ // "roboto.eot", // [$eot]
6801
+ // normal, // [$weight]
6802
+ // normal // [$style]
6803
+ // );
6804
+ // -----------------------------------------------------------------------------
6805
+
6806
+
6807
+ @function font-url($path) {
6808
+ $font-path: 'fonts' !default;
6809
+ @return url("#{$font-path}/#{$path}");
6810
+ }
6811
+
6812
+
6813
+ // -----------------------------------------------------------------------------
6814
+ // helper function to create a list of font files for the src attribute in @font-face.
6815
+ // In the global variable $font-path, you can specify the path to the folder
6816
+ // with fonts relative to style files, by default the path to the fonts is "fonts".
6817
+ //
6818
+ // Usage: font-files ('file-name-w-ext'[, 'format'][,'file-name-w-ext'[, 'format']]...).
6819
+ // If the font format is not specified, the function will add the format corresponding to the file extension.
6820
+ //
6821
+ // for best results use this order: woff, opentype / truetype, svg.
6822
+ // -----------------------------------------------------------------------------
6823
+ // function ported from Ruby.
6824
+ // -----------------------------------------------------------------------------
6825
+ @function font-files($font-files...) {
6826
+ $font-path: 'fonts' !default;
6827
+ // types of font formats from module Compass::Core::SassExtensions::Functions::FontFiles.
6828
+ $font-types: (
6829
+ 'woff': "woff",
6830
+ 'woff2': "woff2",
6831
+ 'opentype': "otf",
6832
+ // 'opentype': "opentype",
6833
+ 'truetype': "ttf",
6834
+ // 'truetype': "truetype",
6835
+ 'svg': "svg",
6836
+ 'embedded-opentype': "eot"
6837
+ );
6838
+
6839
+ $full: '';
6840
+ // if the font format is specified after the font file name, skip the next iteration.
6841
+ $skip-next: false;
6842
+ // number of font files including font format.
6843
+ $font-file-length: length($font-files);
6844
+
6845
+ @for $i from 1 through $font-file-length {
6846
+ @if(not $skip-next) {
6847
+ $font-file: nth($font-files, $i);
6848
+ $font-file-next: if($i < $font-file-length, nth($font-files, $i + 1), false);
6849
+
6850
+ // add font url.
6851
+ $full: $full + 'url("#{$font-path}/#{$font-file}")';
6852
+
6853
+ // add the font format if it is specified after the font file name.
6854
+ @if $font-file-next and map-has-key($font-types, $font-file-next) {
6855
+ $full: $full + ' format("#{$font-file-next}")';
6856
+ $skip-next: true;
6857
+ } @else {
6858
+ // add a font format based on the font file name extension.
6859
+ @each $type, $extension in $font-types {
6860
+ $pos: str-index($font-file, '.' + $extension);
6861
+
6862
+ @if($font-file-next == $extension) {
6863
+ $full: $full + ' format("#{$type}")';
6864
+ $skip-next: true;
6865
+ } @else if ($pos and (to-lower-case(str-slice($font-file, $pos + 1)) == $extension)) {
6866
+ $full: $full + ' format("#{$type}")';
6867
+ }
6868
+ }
6869
+ }
6870
+ } @else {
6871
+ $skip-next: false;
6872
+ }
6873
+
6874
+ @if (not $skip-next and $i != $font-file-length) { $full: $full + ', ';}
6875
+ }
6876
+
6877
+ @return unquote($full);
6878
+ }
6879
+
6880
+
6881
+
6882
+ // Specify the shorthand `columns` property.
6883
+ //
6884
+ // Example:
6885
+ //
6886
+ // @include columns(20em 2)
6887
+ @mixin columns($width-and-count) {
6888
+ @include experimental(columns, $width-and-count,
6889
+ -moz, -webkit, -o, -ms, not(-khtml), official
6890
+ );
6891
+ }
6892
+
6893
+ // Specify the number of columns
6894
+ @mixin column-count($count) {
6895
+ @include experimental(column-count, $count,
6896
+ -moz, -webkit, -o, -ms, not(-khtml), official
6897
+ );
6898
+ }
6899
+
6900
+ // Specify the gap between columns e.g. `20px`
6901
+ @mixin column-gap($width) {
6902
+ @include experimental(column-gap, $width,
6903
+ -moz, -webkit, -o, -ms, not(-khtml), official
6904
+ );
6905
+ }
6906
+
6907
+ // Specify the width of columns e.g. `100px`
6908
+ @mixin column-width($width) {
6909
+ @include experimental(column-width, $width,
6910
+ -moz, -webkit, -o, -ms, not(-khtml), official
6911
+ );
6912
+ }
6913
+
6914
+ // Specify how many columns an element should span across.
6915
+ // * legal values are none, all
6916
+ @mixin column-span($columns) {
6917
+ @include experimental(column-span, $columns,
6918
+ -moz, -webkit, -o, -ms, not(-khtml), official
6919
+ );
6920
+ }
6921
+
6922
+ // Specify the width of the rule between columns e.g. `1px`
6923
+ @mixin column-rule-width($width) {
6924
+ @include experimental(column-rule-width, $width,
6925
+ -moz, -webkit, -o, -ms, not(-khtml), official
6926
+ );
6927
+ }
6928
+
6929
+ // Specify the style of the rule between columns e.g. `dotted`.
5611
6930
  // This works like border-style.
5612
6931
  @mixin column-rule-style($style) {
5613
6932
  @include experimental(column-rule-style, unquote($style),
@@ -5714,6 +7033,7 @@ $experimental-support-for-pie : false !default;
5714
7033
  @mixin column-break($type: before, $value: auto){
5715
7034
  @include experimental("column-break-#{$type}", $value, not(-moz), -webkit, not(-o), not(-ms), not(-khtml), official );
5716
7035
  }
7036
+
5717
7037
  // Usually compass hacks apply to both ie6 & 7 -- set this to false to disable support for both.
5718
7038
  $legacy-support-for-ie: true !default;
5719
7039
 
@@ -5794,12 +7114,17 @@ $experimental-support-for-pie : false !default;
5794
7114
  }
5795
7115
 
5796
7116
 
7117
+ // The default box-sizing model when no argument is provided to the box-sizing mixin: [ content-box | border-box | padding-box ]
7118
+ //
7119
+ // The browser default is content-box, compass defaults to border-box.
7120
+ $default-box-sizing: border-box !default;
7121
+
5797
7122
  // Change the box model for Mozilla, Webkit, IE8 and the future
5798
7123
  //
5799
7124
  // @param $bs
5800
7125
  // [ content-box | border-box ]
5801
7126
 
5802
- @mixin box-sizing($bs) {
7127
+ @mixin box-sizing($bs: $default-box-sizing) {
5803
7128
  $bs: unquote($bs);
5804
7129
  @include experimental(box-sizing, $bs,
5805
7130
  -moz, -webkit, not(-o), not(-ms), not(-khtml), official
@@ -6252,10 +7577,10 @@ $default-has-layout-approach: zoom !default;
6252
7577
  @return $list;
6253
7578
  }
6254
7579
 
6255
- //
7580
+ //
6256
7581
  // A partial implementation of the Ruby cross browser support functions from Compass:
6257
7582
  // https://github.com/Compass/compass/blob/stable/lib/compass/sass_extensions/functions/cross_browser_support.rb
6258
- //
7583
+ //
6259
7584
 
6260
7585
  @function prefixed($prefix, $property1, $property2:null, $property3:null, $property4:null, $property5:null, $property6:null, $property7:null, $property8:null, $property9:null) {
6261
7586
  $properties: $property1, $property2, $property3, $property4, $property5, $property6, $property7, $property8, $property9;
@@ -6434,6 +7759,102 @@ $default-has-layout-approach: zoom !default;
6434
7759
  }
6435
7760
 
6436
7761
 
7762
+ //
7763
+ // A partial implementation of the Ruby fonts functions from Compass:
7764
+ // https://github.com/Compass/compass/blob/stable/core/lib/compass/core/sass_extensions/functions/font_files.rb
7765
+ //
7766
+ // and several functions from the file:
7767
+ // https://github.com/Compass/compass/blob/stable/core/lib/compass/core/sass_extensions/functions/urls.rb
7768
+ // -----------------------------------------------------------------------------
7769
+ // Helper functions font-files and font-url for font-face mixins.
7770
+ // -----------------------------------------------------------------------------
7771
+ // use mixin this way:
7772
+ //
7773
+ // $font-path: "/public/fonts/roboto";
7774
+ // @include font-face(
7775
+ // 'Roboto',
7776
+ // font_files("roboto.ttf", "truetype", "roboto.woff", "roboto.woff2"), // or
7777
+ // font_files("roboto.ttf", "roboto.woff", "roboto.woff2"),
7778
+ // "roboto.eot", // [$eot]
7779
+ // normal, // [$weight]
7780
+ // normal // [$style]
7781
+ // );
7782
+ // -----------------------------------------------------------------------------
7783
+
7784
+
7785
+ @function font-url($path) {
7786
+ $font-path: 'fonts' !default;
7787
+ @return url("#{$font-path}/#{$path}");
7788
+ }
7789
+
7790
+
7791
+ // -----------------------------------------------------------------------------
7792
+ // helper function to create a list of font files for the src attribute in @font-face.
7793
+ // In the global variable $font-path, you can specify the path to the folder
7794
+ // with fonts relative to style files, by default the path to the fonts is "fonts".
7795
+ //
7796
+ // Usage: font-files ('file-name-w-ext'[, 'format'][,'file-name-w-ext'[, 'format']]...).
7797
+ // If the font format is not specified, the function will add the format corresponding to the file extension.
7798
+ //
7799
+ // for best results use this order: woff, opentype / truetype, svg.
7800
+ // -----------------------------------------------------------------------------
7801
+ // function ported from Ruby.
7802
+ // -----------------------------------------------------------------------------
7803
+ @function font-files($font-files...) {
7804
+ $font-path: 'fonts' !default;
7805
+ // types of font formats from module Compass::Core::SassExtensions::Functions::FontFiles.
7806
+ $font-types: (
7807
+ 'woff': "woff",
7808
+ 'woff2': "woff2",
7809
+ 'opentype': "otf",
7810
+ // 'opentype': "opentype",
7811
+ 'truetype': "ttf",
7812
+ // 'truetype': "truetype",
7813
+ 'svg': "svg",
7814
+ 'embedded-opentype': "eot"
7815
+ );
7816
+
7817
+ $full: '';
7818
+ // if the font format is specified after the font file name, skip the next iteration.
7819
+ $skip-next: false;
7820
+ // number of font files including font format.
7821
+ $font-file-length: length($font-files);
7822
+
7823
+ @for $i from 1 through $font-file-length {
7824
+ @if(not $skip-next) {
7825
+ $font-file: nth($font-files, $i);
7826
+ $font-file-next: if($i < $font-file-length, nth($font-files, $i + 1), false);
7827
+
7828
+ // add font url.
7829
+ $full: $full + 'url("#{$font-path}/#{$font-file}")';
7830
+
7831
+ // add the font format if it is specified after the font file name.
7832
+ @if $font-file-next and map-has-key($font-types, $font-file-next) {
7833
+ $full: $full + ' format("#{$font-file-next}")';
7834
+ $skip-next: true;
7835
+ } @else {
7836
+ // add a font format based on the font file name extension.
7837
+ @each $type, $extension in $font-types {
7838
+ $pos: str-index($font-file, '.' + $extension);
7839
+
7840
+ @if($font-file-next == $extension) {
7841
+ $full: $full + ' format("#{$type}")';
7842
+ $skip-next: true;
7843
+ } @else if ($pos and (to-lower-case(str-slice($font-file, $pos + 1)) == $extension)) {
7844
+ $full: $full + ' format("#{$type}")';
7845
+ }
7846
+ }
7847
+ }
7848
+ } @else {
7849
+ $skip-next: false;
7850
+ }
7851
+
7852
+ @if (not $skip-next and $i != $font-file-length) { $full: $full + ', ';}
7853
+ }
7854
+
7855
+ @return unquote($full);
7856
+ }
7857
+
6437
7858
 
6438
7859
 
6439
7860
  // Background property support for vendor prefixing within values.
@@ -6458,7 +7879,7 @@ $default-has-layout-approach: zoom !default;
6458
7879
  @if $experimental-support-for-webkit and prefixed(-webkit, $backgrounds) { background: -webkit($backgrounds); }
6459
7880
  @if $experimental-support-for-mozilla and prefixed(-moz, $backgrounds) { background: -moz($backgrounds); }
6460
7881
  @if $experimental-support-for-opera and prefixed(-o, $backgrounds) { background: -o($backgrounds); }
6461
- @if $experimental-support-for-pie and $add-pie-bg { -pie-background: -pie($backgrounds); }
7882
+ @if $experimental-support-for-pie and $add-pie-bg { -pie-background: $backgrounds ; }
6462
7883
  background: $backgrounds ;
6463
7884
  }
6464
7885
 
@@ -7184,620 +8605,990 @@ $default-scale-y : $default-scale-x !default;
7184
8605
  $default-scale-z : $default-scale-x !default;
7185
8606
 
7186
8607
 
7187
- // The default angle for rotations
7188
- $default-rotate : 45deg !default;
8608
+ // The default angle for rotations
8609
+ $default-rotate : 45deg !default;
8610
+
8611
+
8612
+ // The default x-vector for the axis of 3d rotations
8613
+ $default-vector-x : 1 !default;
8614
+ // The default y-vector for the axis of 3d rotations
8615
+ $default-vector-y : 1 !default;
8616
+ // The default z-vector for the axis of 3d rotations
8617
+ $default-vector-z : 1 !default;
8618
+
8619
+
8620
+ // The default x-length for translations
8621
+ $default-translate-x : 1em !default;
8622
+ // The default y-length for translations
8623
+ $default-translate-y : $default-translate-x !default;
8624
+ // The default z-length for translations
8625
+ $default-translate-z : $default-translate-x !default;
8626
+
8627
+
8628
+ // The default x-angle for skewing
8629
+ $default-skew-x : 5deg !default;
8630
+ // The default y-angle for skewing
8631
+ $default-skew-y : 5deg !default;
8632
+
8633
+
8634
+ // **Transform-origin**
8635
+ // Transform-origin sent as a complete string
8636
+ //
8637
+ // @include apply-origin( origin [, 3D-only ] )
8638
+ //
8639
+ // where 'origin' is a space separated list containing 1-3 (x/y/z) coordinates
8640
+ // in percentages, absolute (px, cm, in, em etc..) or relative
8641
+ // (left, top, right, bottom, center) units
8642
+ //
8643
+ // @param only3d Set this to true to only apply this
8644
+ // mixin where browsers have 3D support.
8645
+ @mixin apply-origin($origin, $only3d) {
8646
+ $only3d: $only3d or -compass-list-size(-compass-list($origin)) > 2;
8647
+ @if $only3d {
8648
+ @include experimental(transform-origin, $origin,
8649
+ -moz, -webkit, -o, -ms, not(-khtml), official
8650
+ );
8651
+ } @else {
8652
+ @include experimental(transform-origin, $origin,
8653
+ -moz, -webkit, -o, -ms, not(-khtml), official
8654
+ );
8655
+ }
8656
+ }
8657
+
8658
+ // Transform-origin sent as individual arguments:
8659
+ //
8660
+ // @include transform-origin( [ origin-x, origin-y, origin-z, 3D-only ] )
8661
+ //
8662
+ // where the 3 'origin-' arguments represent x/y/z coordinates.
8663
+ //
8664
+ // **NOTE:** setting z coordinates triggers 3D support list, leave false for 2D support
8665
+ @mixin transform-origin(
8666
+ $origin-x: $default-origin-x,
8667
+ $origin-y: $default-origin-y,
8668
+ $origin-z: false,
8669
+ $only3d: if($origin-z, true, false)
8670
+ ) {
8671
+ $origin: unquote('');
8672
+ @if $origin-x or $origin-y or $origin-z {
8673
+ @if $origin-x { $origin: $origin-x; } @else { $origin: 50%; }
8674
+ @if $origin-y { $origin: $origin $origin-y; } @else { @if $origin-z { $origin: $origin 50%; }}
8675
+ @if $origin-z { $origin: $origin $origin-z; }
8676
+ @include apply-origin($origin, $only3d);
8677
+ }
8678
+ }
8679
+
8680
+
8681
+ // Transform sent as a complete string:
8682
+ //
8683
+ // @include transform( transforms [, 3D-only ] )
8684
+ //
8685
+ // where 'transforms' is a space separated list of all the transforms to be applied.
8686
+ @mixin transform(
8687
+ $transform,
8688
+ $only3d: false
8689
+ ) {
8690
+ @if $only3d {
8691
+ @include experimental(transform, $transform,
8692
+ -moz, -webkit, -o, -ms, not(-khtml), official
8693
+ );
8694
+ } @else {
8695
+ @include experimental(transform, $transform,
8696
+ -moz, -webkit, -o, -ms, not(-khtml), official
8697
+ );
8698
+ }
8699
+ }
8700
+
8701
+ // Shortcut to target all browsers with 2D transform support
8702
+ @mixin transform2d($trans) {
8703
+ @include transform($trans, false);
8704
+ }
8705
+
8706
+ // Shortcut to target only browsers with 3D transform support
8707
+ @mixin transform3d($trans) {
8708
+ @include transform($trans, true);
8709
+ }
8710
+
8711
+ // @doc off
8712
+ // 3D Parameters -------------------------------------------------------------
8713
+ // @doc on
8714
+
8715
+ // Set the perspective of 3D transforms on the children of an element:
8716
+ //
8717
+ // @include perspective( perspective )
8718
+ //
8719
+ // where 'perspective' is a unitless number representing the depth of the
8720
+ // z-axis. The higher the perspective, the more exaggerated the foreshortening.
8721
+ // values from 500 to 1000 are more-or-less "normal" - a good starting-point.
8722
+ @mixin perspective($p) {
8723
+ @include experimental(perspective, $p,
8724
+ -moz, -webkit, -o, -ms, not(-khtml), official
8725
+ );
8726
+ }
8727
+
8728
+ // Set the origin position for the perspective
8729
+ //
8730
+ // @include perspective-origin(origin-x [origin-y])
8731
+ //
8732
+ // where the two arguments represent x/y coordinates
8733
+ @mixin perspective-origin($origin: 50%) {
8734
+ @include experimental(perspective-origin, $origin,
8735
+ -moz, -webkit, -o, -ms, not(-khtml), official
8736
+ );
8737
+ }
8738
+
8739
+ // Determine whether a 3D objects children also live in the given 3D space
8740
+ //
8741
+ // @include transform-style( [ style ] )
8742
+ //
8743
+ // where `style` can be either `flat` or `preserve-3d`.
8744
+ // Browsers default to `flat`, mixin defaults to `preserve-3d`.
8745
+ @mixin transform-style($style: preserve-3d) {
8746
+ @include experimental(transform-style, $style,
8747
+ -moz, -webkit, -o, -ms, not(-khtml), official
8748
+ );
8749
+ }
8750
+
8751
+ // Determine the visibility of an element when it's back is turned
8752
+ //
8753
+ // @include backface-visibility( [ visibility ] )
8754
+ //
8755
+ // where `visibility` can be either `visible` or `hidden`.
8756
+ // Browsers default to visible, mixin defaults to hidden
8757
+ @mixin backface-visibility($visibility: hidden) {
8758
+ @include experimental(backface-visibility, $visibility,
8759
+ -moz, -webkit, -o, -ms, not(-khtml), official
8760
+ );
8761
+ }
7189
8762
 
8763
+ // @doc off
8764
+ // Transform Partials --------------------------------------------------------
8765
+ // These work well on their own, but they don't add to each other, they override.
8766
+ // Use along with transform parameter mixins to adjust origin, perspective and style
8767
+ // ---------------------------------------------------------------------------
7190
8768
 
7191
- // The default x-vector for the axis of 3d rotations
7192
- $default-vector-x : 1 !default;
7193
- // The default y-vector for the axis of 3d rotations
7194
- $default-vector-y : 1 !default;
7195
- // The default z-vector for the axis of 3d rotations
7196
- $default-vector-z : 1 !default;
7197
8769
 
8770
+ // Scale ---------------------------------------------------------------------
8771
+ // @doc on
7198
8772
 
7199
- // The default x-length for translations
7200
- $default-translate-x : 1em !default;
7201
- // The default y-length for translations
7202
- $default-translate-y : $default-translate-x !default;
7203
- // The default z-length for translations
7204
- $default-translate-z : $default-translate-x !default;
8773
+ // Scale an object along the x and y axis:
8774
+ //
8775
+ // @include scale( [ scale-x, scale-y, perspective, 3D-only ] )
8776
+ //
8777
+ // where the 'scale-' arguments are unitless multipliers of the x and y dimensions
8778
+ // and perspective, which works the same as the stand-alone perspective property/mixin
8779
+ // but applies to the individual element (multiplied with any parent perspective)
8780
+ //
8781
+ // **Note** This mixin cannot be combined with other transform mixins.
8782
+ @mixin scale(
8783
+ $scale-x: $default-scale-x,
8784
+ $scale-y: $scale-x,
8785
+ $perspective: false,
8786
+ $only3d: false
8787
+ ) {
8788
+ $trans: scale($scale-x, $scale-y);
8789
+ @if $perspective { $trans: perspective($perspective) $trans; }
8790
+ @include transform($trans, $only3d);
8791
+ }
7205
8792
 
8793
+ // Scale an object along the x axis
8794
+ // @include scaleX( [ scale-x, perspective, 3D-only ] )
8795
+ //
8796
+ // **Note** This mixin cannot be combined with other transform mixins.
8797
+ @mixin scaleX(
8798
+ $scale: $default-scale-x,
8799
+ $perspective: false,
8800
+ $only3d: false
8801
+ ) {
8802
+ $trans: scaleX($scale);
8803
+ @if $perspective { $trans: perspective($perspective) $trans; }
8804
+ @include transform($trans, $only3d);
8805
+ }
7206
8806
 
7207
- // The default x-angle for skewing
7208
- $default-skew-x : 5deg !default;
7209
- // The default y-angle for skewing
7210
- $default-skew-y : 5deg !default;
8807
+ // Scale an object along the y axis
8808
+ // @include scaleY( [ scale-y, perspective, 3D-only ] )
8809
+ //
8810
+ // **Note** This mixin cannot be combined with other transform mixins.
8811
+ @mixin scaleY(
8812
+ $scale: $default-scale-y,
8813
+ $perspective: false,
8814
+ $only3d: false
8815
+ ) {
8816
+ $trans: scaleY($scale);
8817
+ @if $perspective { $trans: perspective($perspective) $trans; }
8818
+ @include transform($trans, $only3d);
8819
+ }
7211
8820
 
8821
+ // Scale an object along the z axis
8822
+ // @include scaleZ( [ scale-z, perspective ] )
8823
+ //
8824
+ // **Note** This mixin cannot be combined with other transform mixins.
8825
+ @mixin scaleZ(
8826
+ $scale: $default-scale-z,
8827
+ $perspective: false
8828
+ ) {
8829
+ $trans: scaleZ($scale);
8830
+ @if $perspective { $trans: perspective($perspective) $trans; }
8831
+ @include transform3d($trans);
8832
+ }
7212
8833
 
7213
- // **Transform-origin**
7214
- // Transform-origin sent as a complete string
8834
+ // Scale and object along all three axis
8835
+ // @include scale3d( [ scale-x, scale-y, scale-z, perspective ] )
7215
8836
  //
7216
- // @include apply-origin( origin [, 3D-only ] )
8837
+ // **Note** This mixin cannot be combined with other transform mixins.
8838
+ @mixin scale3d(
8839
+ $scale-x: $default-scale-x,
8840
+ $scale-y: $default-scale-y,
8841
+ $scale-z: $default-scale-z,
8842
+ $perspective: false
8843
+ ) {
8844
+ $trans: scale3d($scale-x, $scale-y, $scale-z);
8845
+ @if $perspective { $trans: perspective($perspective) $trans; }
8846
+ @include transform3d($trans);
8847
+ }
8848
+
8849
+ // @doc off
8850
+ // Rotate --------------------------------------------------------------------
8851
+ // @doc on
8852
+
8853
+ // Rotate an object around the z axis (2D)
8854
+ // @include rotate( [ rotation, perspective, 3D-only ] )
8855
+ // where 'rotation' is an angle set in degrees (deg) or radian (rad) units
7217
8856
  //
7218
- // where 'origin' is a space separated list containing 1-3 (x/y/z) coordinates
7219
- // in percentages, absolute (px, cm, in, em etc..) or relative
7220
- // (left, top, right, bottom, center) units
8857
+ // **Note** This mixin cannot be combined with other transform mixins.
8858
+ @mixin rotate(
8859
+ $rotate: $default-rotate,
8860
+ $perspective: false,
8861
+ $only3d: false
8862
+ ) {
8863
+ $trans: rotate($rotate);
8864
+ @if $perspective { $trans: perspective($perspective) $trans; }
8865
+ @include transform($trans, $only3d);
8866
+ }
8867
+
8868
+ // A longcut for 'rotate' in case you forget that 'z' is implied
7221
8869
  //
7222
- // @param only3d Set this to true to only apply this
7223
- // mixin where browsers have 3D support.
7224
- @mixin apply-origin($origin, $only3d) {
7225
- $only3d: $only3d or -compass-list-size(-compass-list($origin)) > 2;
7226
- @if $only3d {
7227
- @include experimental(transform-origin, $origin,
7228
- -moz, -webkit, -o, -ms, not(-khtml), official
7229
- );
7230
- } @else {
7231
- @include experimental(transform-origin, $origin,
7232
- -moz, -webkit, -o, -ms, not(-khtml), official
7233
- );
7234
- }
8870
+ // **Note** This mixin cannot be combined with other transform mixins.
8871
+ @mixin rotateZ(
8872
+ $rotate: $default-rotate,
8873
+ $perspective: false,
8874
+ $only3d: false
8875
+ ) {
8876
+ @include rotate($rotate, $perspective, $only3d);
7235
8877
  }
7236
8878
 
7237
- // Transform-origin sent as individual arguments:
8879
+ // Rotate an object around the x axis (3D)
8880
+ // @include rotateX( [ rotation, perspective ] )
7238
8881
  //
7239
- // @include transform-origin( [ origin-x, origin-y, origin-z, 3D-only ] )
8882
+ // **Note** This mixin cannot be combined with other transform mixins.
8883
+ @mixin rotateX(
8884
+ $rotate: $default-rotate,
8885
+ $perspective: false
8886
+ ) {
8887
+ $trans: rotateX($rotate);
8888
+ @if $perspective { $trans: perspective($perspective) $trans; }
8889
+ @include transform3d($trans);
8890
+ }
8891
+
8892
+ // Rotate an object around the y axis (3D)
8893
+ // @include rotate( [ rotation, perspective ] )
7240
8894
  //
7241
- // where the 3 'origin-' arguments represent x/y/z coordinates.
8895
+ // **Note** This mixin cannot be combined with other transform mixins.
8896
+ @mixin rotateY(
8897
+ $rotate: $default-rotate,
8898
+ $perspective: false
8899
+ ) {
8900
+ $trans: rotateY($rotate);
8901
+ @if $perspective { $trans: perspective($perspective) $trans; }
8902
+ @include transform3d($trans);
8903
+ }
8904
+
8905
+ // Rotate an object around an arbitrary axis (3D)
8906
+ // @include rotate( [ vector-x, vector-y, vector-z, rotation, perspective ] )
8907
+ // where the 'vector-' arguments accept unitless numbers.
8908
+ // These numbers are not important on their own, but in relation to one another
8909
+ // creating an axis from your transform-origin, along the axis of Xx = Yy = Zz.
7242
8910
  //
7243
- // **NOTE:** setting z coordinates triggers 3D support list, leave false for 2D support
7244
- @mixin transform-origin(
7245
- $origin-x: $default-origin-x,
7246
- $origin-y: $default-origin-y,
7247
- $origin-z: false,
7248
- $only3d: if($origin-z, true, false)
8911
+ // **Note** This mixin cannot be combined with other transform mixins.
8912
+ @mixin rotate3d(
8913
+ $vector-x: $default-vector-x,
8914
+ $vector-y: $default-vector-y,
8915
+ $vector-z: $default-vector-z,
8916
+ $rotate: $default-rotate,
8917
+ $perspective: false
7249
8918
  ) {
7250
- $origin: unquote('');
7251
- @if $origin-x or $origin-y or $origin-z {
7252
- @if $origin-x { $origin: $origin-x; } @else { $origin: 50%; }
7253
- @if $origin-y { $origin: $origin $origin-y; } @else { @if $origin-z { $origin: $origin 50%; }}
7254
- @if $origin-z { $origin: $origin $origin-z; }
7255
- @include apply-origin($origin, $only3d);
7256
- }
8919
+ $trans: rotate3d($vector-x, $vector-y, $vector-z, $rotate);
8920
+ @if $perspective { $trans: perspective($perspective) $trans; }
8921
+ @include transform3d($trans);
7257
8922
  }
7258
8923
 
8924
+ // @doc off
8925
+ // Translate -----------------------------------------------------------------
8926
+ // @doc on
8927
+
8928
+ // Move an object along the x or y axis (2D)
8929
+ // @include translate( [ translate-x, translate-y, perspective, 3D-only ] )
8930
+ // where the 'translate-' arguments accept any distance in percentages or absolute (px, cm, in, em etc..) units.
8931
+ //
8932
+ // **Note** This mixin cannot be combined with other transform mixins.
8933
+ @mixin translate(
8934
+ $translate-x: $default-translate-x,
8935
+ $translate-y: $default-translate-y,
8936
+ $perspective: false,
8937
+ $only3d: false
8938
+ ) {
8939
+ $trans: translate($translate-x, $translate-y);
8940
+ @if $perspective { $trans: perspective($perspective) $trans; }
8941
+ @include transform($trans, $only3d);
8942
+ }
7259
8943
 
7260
- // Transform sent as a complete string:
8944
+ // Move an object along the x axis (2D)
8945
+ // @include translate( [ translate-x, perspective, 3D-only ] )
7261
8946
  //
7262
- // @include transform( transforms [, 3D-only ] )
8947
+ // **Note** This mixin cannot be combined with other transform mixins.
8948
+ @mixin translateX(
8949
+ $trans-x: $default-translate-x,
8950
+ $perspective: false,
8951
+ $only3d: false
8952
+ ) {
8953
+ $trans: translateX($trans-x);
8954
+ @if $perspective { $trans: perspective($perspective) $trans; }
8955
+ @include transform($trans, $only3d);
8956
+ }
8957
+
8958
+ // Move an object along the y axis (2D)
8959
+ // @include translate( [ translate-y, perspective, 3D-only ] )
7263
8960
  //
7264
- // where 'transforms' is a space separated list of all the transforms to be applied.
7265
- @mixin transform(
7266
- $transform,
7267
- $only3d: false
8961
+ // **Note** This mixin cannot be combined with other transform mixins.
8962
+ @mixin translateY(
8963
+ $trans-y: $default-translate-y,
8964
+ $perspective: false,
8965
+ $only3d: false
7268
8966
  ) {
7269
- @if $only3d {
7270
- @include experimental(transform, $transform,
7271
- -moz, -webkit, -o, -ms, not(-khtml), official
7272
- );
7273
- } @else {
7274
- @include experimental(transform, $transform,
7275
- -moz, -webkit, -o, -ms, not(-khtml), official
7276
- );
7277
- }
8967
+ $trans: translateY($trans-y);
8968
+ @if $perspective { $trans: perspective($perspective) $trans; }
8969
+ @include transform($trans, $only3d);
7278
8970
  }
7279
8971
 
7280
- // Shortcut to target all browsers with 2D transform support
7281
- @mixin transform2d($trans) {
7282
- @include transform($trans, false);
8972
+ // Move an object along the z axis (3D)
8973
+ // @include translate( [ translate-z, perspective ] )
8974
+ //
8975
+ // **Note** This mixin cannot be combined with other transform mixins.
8976
+ @mixin translateZ(
8977
+ $trans-z: $default-translate-z,
8978
+ $perspective: false
8979
+ ) {
8980
+ $trans: translateZ($trans-z);
8981
+ @if $perspective { $trans: perspective($perspective) $trans; }
8982
+ @include transform3d($trans);
7283
8983
  }
7284
8984
 
7285
- // Shortcut to target only browsers with 3D transform support
7286
- @mixin transform3d($trans) {
7287
- @include transform($trans, true);
8985
+ // Move an object along the x, y and z axis (3D)
8986
+ // @include translate( [ translate-x, translate-y, translate-z, perspective ] )
8987
+ //
8988
+ // **Note** This mixin cannot be combined with other transform mixins.
8989
+ @mixin translate3d(
8990
+ $translate-x: $default-translate-x,
8991
+ $translate-y: $default-translate-y,
8992
+ $translate-z: $default-translate-z,
8993
+ $perspective: false
8994
+ ) {
8995
+ $trans: translate3d($translate-x, $translate-y, $translate-z);
8996
+ @if $perspective { $trans: perspective($perspective) $trans; }
8997
+ @include transform3d($trans);
7288
8998
  }
7289
8999
 
7290
9000
  // @doc off
7291
- // 3D Parameters -------------------------------------------------------------
9001
+ // Skew ----------------------------------------------------------------------
7292
9002
  // @doc on
7293
9003
 
7294
- // Set the perspective of 3D transforms on the children of an element:
7295
- //
7296
- // @include perspective( perspective )
9004
+ // Skew an element:
7297
9005
  //
7298
- // where 'perspective' is a unitless number representing the depth of the
7299
- // z-axis. The higher the perspective, the more exaggerated the foreshortening.
7300
- // values from 500 to 1000 are more-or-less "normal" - a good starting-point.
7301
- @mixin perspective($p) {
7302
- @include experimental(perspective, $p,
7303
- -moz, -webkit, -o, -ms, not(-khtml), official
7304
- );
7305
- }
7306
-
7307
- // Set the origin position for the perspective
9006
+ // @include skew( [ skew-x, skew-y, 3D-only ] )
7308
9007
  //
7309
- // @include perspective-origin(origin-x [origin-y])
9008
+ // where the 'skew-' arguments accept css angles in degrees (deg) or radian (rad) units.
7310
9009
  //
7311
- // where the two arguments represent x/y coordinates
7312
- @mixin perspective-origin($origin: 50%) {
7313
- @include experimental(perspective-origin, $origin,
7314
- -moz, -webkit, -o, -ms, not(-khtml), official
7315
- );
9010
+ // **Note** This mixin cannot be combined with other transform mixins.
9011
+ @mixin skew(
9012
+ $skew-x: $default-skew-x,
9013
+ $skew-y: $default-skew-y,
9014
+ $only3d: false
9015
+ ) {
9016
+ $trans: skew($skew-x, $skew-y);
9017
+ @include transform($trans, $only3d);
7316
9018
  }
7317
9019
 
7318
- // Determine whether a 3D objects children also live in the given 3D space
9020
+ // Skew an element along the x axiz
7319
9021
  //
7320
- // @include transform-style( [ style ] )
9022
+ // @include skew( [ skew-x, 3D-only ] )
7321
9023
  //
7322
- // where `style` can be either `flat` or `preserve-3d`.
7323
- // Browsers default to `flat`, mixin defaults to `preserve-3d`.
7324
- @mixin transform-style($style: preserve-3d) {
7325
- @include experimental(transform-style, $style,
7326
- -moz, -webkit, -o, -ms, not(-khtml), official
7327
- );
9024
+ // **Note** This mixin cannot be combined with other transform mixins.
9025
+ @mixin skewX(
9026
+ $skew-x: $default-skew-x,
9027
+ $only3d: false
9028
+ ) {
9029
+ $trans: skewX($skew-x);
9030
+ @include transform($trans, $only3d);
7328
9031
  }
7329
9032
 
7330
- // Determine the visibility of an element when it's back is turned
9033
+ // Skew an element along the y axis
7331
9034
  //
7332
- // @include backface-visibility( [ visibility ] )
9035
+ // @include skew( [ skew-y, 3D-only ] )
7333
9036
  //
7334
- // where `visibility` can be either `visible` or `hidden`.
7335
- // Browsers default to visible, mixin defaults to hidden
7336
- @mixin backface-visibility($visibility: hidden) {
7337
- @include experimental(backface-visibility, $visibility,
7338
- -moz, -webkit, -o, -ms, not(-khtml), official
7339
- );
9037
+ // **Note** This mixin cannot be combined with other transform mixins.
9038
+ @mixin skewY(
9039
+ $skew-y: $default-skew-y,
9040
+ $only3d: false
9041
+ ) {
9042
+ $trans: skewY($skew-y);
9043
+ @include transform($trans, $only3d);
7340
9044
  }
7341
9045
 
7342
- // @doc off
7343
- // Transform Partials --------------------------------------------------------
7344
- // These work well on their own, but they don't add to each other, they override.
7345
- // Use along with transform parameter mixins to adjust origin, perspective and style
7346
- // ---------------------------------------------------------------------------
7347
-
7348
-
7349
- // Scale ---------------------------------------------------------------------
7350
- // @doc on
7351
9046
 
7352
- // Scale an object along the x and y axis:
7353
- //
7354
- // @include scale( [ scale-x, scale-y, perspective, 3D-only ] )
9047
+ // Full transform mixins
9048
+ // For settings any combination of transforms as arguments
9049
+ // These are complex and not highly recommended for daily use. They are mainly
9050
+ // here for backward-compatibility purposes.
7355
9051
  //
7356
- // where the 'scale-' arguments are unitless multipliers of the x and y dimensions
7357
- // and perspective, which works the same as the stand-alone perspective property/mixin
7358
- // but applies to the individual element (multiplied with any parent perspective)
9052
+ // * they include origin adjustments
9053
+ // * scale takes a multiplier (unitless), rotate and skew take degrees (deg)
7359
9054
  //
7360
9055
  // **Note** This mixin cannot be combined with other transform mixins.
7361
- @mixin scale(
7362
- $scale-x: $default-scale-x,
7363
- $scale-y: $scale-x,
9056
+ @mixin create-transform(
7364
9057
  $perspective: false,
9058
+ $scale-x: false,
9059
+ $scale-y: false,
9060
+ $scale-z: false,
9061
+ $rotate-x: false,
9062
+ $rotate-y: false,
9063
+ $rotate-z: false,
9064
+ $rotate3d: false,
9065
+ $trans-x: false,
9066
+ $trans-y: false,
9067
+ $trans-z: false,
9068
+ $skew-x: false,
9069
+ $skew-y: false,
9070
+ $origin-x: false,
9071
+ $origin-y: false,
9072
+ $origin-z: false,
7365
9073
  $only3d: false
7366
9074
  ) {
7367
- $trans: scale($scale-x, $scale-y);
7368
- @if $perspective { $trans: perspective($perspective) $trans; }
9075
+ $trans: unquote("");
9076
+
9077
+ // perspective
9078
+ @if $perspective { $trans: perspective($perspective) ; }
9079
+
9080
+ // scale
9081
+ @if $scale-x and $scale-y {
9082
+ @if $scale-z { $trans: $trans scale3d($scale-x, $scale-y, $scale-z); }
9083
+ @else { $trans: $trans scale($scale-x, $scale-y); }
9084
+ } @else {
9085
+ @if $scale-x { $trans: $trans scaleX($scale-x); }
9086
+ @if $scale-y { $trans: $trans scaleY($scale-y); }
9087
+ @if $scale-z { $trans: $trans scaleZ($scale-z); }
9088
+ }
9089
+
9090
+ // rotate
9091
+ @if $rotate-x { $trans: $trans rotateX($rotate-x); }
9092
+ @if $rotate-y { $trans: $trans rotateY($rotate-y); }
9093
+ @if $rotate-z { $trans: $trans rotateZ($rotate-z); }
9094
+ @if $rotate3d { $trans: $trans rotate3d($rotate3d); }
9095
+
9096
+ // translate
9097
+ @if $trans-x and $trans-y {
9098
+ @if $trans-z { $trans: $trans translate3d($trans-x, $trans-y, $trans-z); }
9099
+ @else { $trans: $trans translate($trans-x, $trans-y); }
9100
+ } @else {
9101
+ @if $trans-x { $trans: $trans translateX($trans-x); }
9102
+ @if $trans-y { $trans: $trans translateY($trans-y); }
9103
+ @if $trans-z { $trans: $trans translateZ($trans-z); }
9104
+ }
9105
+
9106
+ // skew
9107
+ @if $skew-x and $skew-y { $trans: $trans skew($skew-x, $skew-y); }
9108
+ @else {
9109
+ @if $skew-x { $trans: $trans skewX($skew-x); }
9110
+ @if $skew-y { $trans: $trans skewY($skew-y); }
9111
+ }
9112
+
9113
+ // apply it!
7369
9114
  @include transform($trans, $only3d);
9115
+ @include transform-origin($origin-x, $origin-y, $origin-z, $only3d);
9116
+ }
9117
+
9118
+
9119
+ // A simplified set of options
9120
+ // backwards-compatible with the previous version of the 'transform' mixin
9121
+ @mixin simple-transform(
9122
+ $scale: false,
9123
+ $rotate: false,
9124
+ $trans-x: false,
9125
+ $trans-y: false,
9126
+ $skew-x: false,
9127
+ $skew-y: false,
9128
+ $origin-x: false,
9129
+ $origin-y: false
9130
+ ) {
9131
+ @include create-transform(
9132
+ false,
9133
+ $scale, $scale, false,
9134
+ false, false, $rotate, false,
9135
+ $trans-x, $trans-y, false,
9136
+ $skew-x, $skew-y,
9137
+ $origin-x, $origin-y, false,
9138
+ false
9139
+ );
7370
9140
  }
7371
9141
 
7372
- // Scale an object along the x axis
7373
- // @include scaleX( [ scale-x, perspective, 3D-only ] )
7374
- //
7375
- // **Note** This mixin cannot be combined with other transform mixins.
7376
- @mixin scaleX(
7377
- $scale: $default-scale-x,
7378
- $perspective: false,
7379
- $only3d: false
7380
- ) {
7381
- $trans: scaleX($scale);
7382
- @if $perspective { $trans: perspective($perspective) $trans; }
7383
- @include transform($trans, $only3d);
7384
- }
9142
+ // Usually compass hacks apply to both ie6 & 7 -- set this to false to disable support for both.
9143
+ $legacy-support-for-ie: true !default;
9144
+
9145
+ // Setting this to false will result in smaller output, but no support for ie6 hacks
9146
+ $legacy-support-for-ie6: $legacy-support-for-ie !default;
9147
+
9148
+ // Setting this to false will result in smaller output, but no support for ie7 hacks
9149
+ $legacy-support-for-ie7: $legacy-support-for-ie !default;
9150
+
9151
+ // Setting this to false will result in smaller output, but no support for legacy ie8 hacks
9152
+ $legacy-support-for-ie8: $legacy-support-for-ie !default;
9153
+
9154
+ // @private
9155
+ // The user can simply set $legacy-support-for-ie and 6, 7, and 8 will be set accordingly,
9156
+ // But in case the user set each of those explicitly, we need to sync the value of
9157
+ // this combined variable.
9158
+ $legacy-support-for-ie: $legacy-support-for-ie6 or $legacy-support-for-ie7 or $legacy-support-for-ie8;
9159
+
9160
+ // Whether to output legacy support for mozilla.
9161
+ // Usually this means hacks to support Firefox 3.6 or earlier.
9162
+ $legacy-support-for-mozilla: true;
9163
+
9164
+ // Support for mozilla in experimental css3 properties (-moz).
9165
+ $experimental-support-for-mozilla : true !default;
9166
+ // Support for webkit in experimental css3 properties (-webkit).
9167
+ $experimental-support-for-webkit : true !default;
9168
+ // Support for webkit's original (non-standard) gradient syntax.
9169
+ $support-for-original-webkit-gradients : true !default;
9170
+ // Support for opera in experimental css3 properties (-o).
9171
+ $experimental-support-for-opera : true !default;
9172
+ // Support for microsoft in experimental css3 properties (-ms).
9173
+ $experimental-support-for-microsoft : true !default;
9174
+ // Support for khtml in experimental css3 properties (-khtml).
9175
+ $experimental-support-for-khtml : false !default;
9176
+ // Support for svg in experimental css3 properties.
9177
+ // Setting this to true might add significant size to your
9178
+ // generated stylesheets.
9179
+ $experimental-support-for-svg : false !default;
9180
+ // Support for CSS PIE in experimental css3 properties (-pie).
9181
+ $experimental-support-for-pie : false !default;
9182
+
7385
9183
 
7386
- // Scale an object along the y axis
7387
- // @include scaleY( [ scale-y, perspective, 3D-only ] )
7388
- //
7389
- // **Note** This mixin cannot be combined with other transform mixins.
7390
- @mixin scaleY(
7391
- $scale: $default-scale-y,
7392
- $perspective: false,
7393
- $only3d: false
9184
+ // This mixin provides basic support for CSS3 properties and
9185
+ // their corresponding experimental CSS2 properties when
9186
+ // the implementations are identical except for the property
9187
+ // prefix.
9188
+ @mixin experimental($property, $value,
9189
+ $moz : $experimental-support-for-mozilla,
9190
+ $webkit : $experimental-support-for-webkit,
9191
+ $o : $experimental-support-for-opera,
9192
+ $ms : $experimental-support-for-microsoft,
9193
+ $khtml : $experimental-support-for-khtml,
9194
+ $official : true
7394
9195
  ) {
7395
- $trans: scaleY($scale);
7396
- @if $perspective { $trans: perspective($perspective) $trans; }
7397
- @include transform($trans, $only3d);
9196
+ @if $webkit and $experimental-support-for-webkit { -webkit-#{$property} : $value; }
9197
+ @if $khtml and $experimental-support-for-khtml { -khtml-#{$property} : $value; }
9198
+ @if $moz and $experimental-support-for-mozilla { -moz-#{$property} : $value; }
9199
+ @if $ms and $experimental-support-for-microsoft { -ms-#{$property} : $value; }
9200
+ @if $o and $experimental-support-for-opera { -o-#{$property} : $value; }
9201
+ @if $official { #{$property} : $value; }
7398
9202
  }
7399
9203
 
7400
- // Scale an object along the z axis
7401
- // @include scaleZ( [ scale-z, perspective ] )
7402
- //
7403
- // **Note** This mixin cannot be combined with other transform mixins.
7404
- @mixin scaleZ(
7405
- $scale: $default-scale-z,
7406
- $perspective: false
9204
+ // Same as experimental(), but for cases when the property is the same and the value is vendorized
9205
+ @mixin experimental-value($property, $value,
9206
+ $moz : $experimental-support-for-mozilla,
9207
+ $webkit : $experimental-support-for-webkit,
9208
+ $o : $experimental-support-for-opera,
9209
+ $ms : $experimental-support-for-microsoft,
9210
+ $khtml : $experimental-support-for-khtml,
9211
+ $official : true
7407
9212
  ) {
7408
- $trans: scaleZ($scale);
7409
- @if $perspective { $trans: perspective($perspective) $trans; }
7410
- @include transform3d($trans);
9213
+ @if $webkit and $experimental-support-for-webkit { #{$property} : -webkit-#{$value}; }
9214
+ @if $khtml and $experimental-support-for-khtml { #{$property} : -khtml-#{$value}; }
9215
+ @if $moz and $experimental-support-for-mozilla { #{$property} : -moz-#{$value}; }
9216
+ @if $ms and $experimental-support-for-microsoft { #{$property} : -ms-#{$value}; }
9217
+ @if $o and $experimental-support-for-opera { #{$property} : -o-#{$value}; }
9218
+ @if $official { #{$property} : #{$value}; }
7411
9219
  }
7412
9220
 
7413
- // Scale and object along all three axis
7414
- // @include scale3d( [ scale-x, scale-y, scale-z, perspective ] )
7415
9221
  //
7416
- // **Note** This mixin cannot be combined with other transform mixins.
7417
- @mixin scale3d(
7418
- $scale-x: $default-scale-x,
7419
- $scale-y: $default-scale-y,
7420
- $scale-z: $default-scale-z,
7421
- $perspective: false
7422
- ) {
7423
- $trans: scale3d($scale-x, $scale-y, $scale-z);
7424
- @if $perspective { $trans: perspective($perspective) $trans; }
7425
- @include transform3d($trans);
7426
- }
9222
+ // A partial implementation of the Ruby list functions from Compass:
9223
+ // https://github.com/Compass/compass/blob/stable/lib/compass/sass_extensions/functions/lists.rb
9224
+ //
7427
9225
 
7428
- // @doc off
7429
- // Rotate --------------------------------------------------------------------
7430
- // @doc on
7431
9226
 
7432
- // Rotate an object around the z axis (2D)
7433
- // @include rotate( [ rotation, perspective, 3D-only ] )
7434
- // where 'rotation' is an angle set in degrees (deg) or radian (rad) units
7435
- //
7436
- // **Note** This mixin cannot be combined with other transform mixins.
7437
- @mixin rotate(
7438
- $rotate: $default-rotate,
7439
- $perspective: false,
7440
- $only3d: false
7441
- ) {
7442
- $trans: rotate($rotate);
7443
- @if $perspective { $trans: perspective($perspective) $trans; }
7444
- @include transform($trans, $only3d);
7445
- }
9227
+ // compact is part of libsass
7446
9228
 
7447
- // A longcut for 'rotate' in case you forget that 'z' is implied
7448
- //
7449
- // **Note** This mixin cannot be combined with other transform mixins.
7450
- @mixin rotateZ(
7451
- $rotate: $default-rotate,
7452
- $perspective: false,
7453
- $only3d: false
7454
- ) {
7455
- @include rotate($rotate, $perspective, $only3d);
9229
+ @function -compass-nth($list, $place) {
9230
+ // Yep, Sass-lists are 1-indexed.
9231
+ @if $place == "first" {
9232
+ $place: 1;
9233
+ }
9234
+ @if $place == "last" {
9235
+ $place: length($list);
9236
+ }
9237
+ @return nth($list, $place);
7456
9238
  }
7457
9239
 
7458
- // Rotate an object around the x axis (3D)
7459
- // @include rotateX( [ rotation, perspective ] )
7460
- //
7461
- // **Note** This mixin cannot be combined with other transform mixins.
7462
- @mixin rotateX(
7463
- $rotate: $default-rotate,
7464
- $perspective: false
7465
- ) {
7466
- $trans: rotateX($rotate);
7467
- @if $perspective { $trans: perspective($perspective) $trans; }
7468
- @include transform3d($trans);
7469
- }
9240
+ // compass_list can't be implemented in sass script
7470
9241
 
7471
- // Rotate an object around the y axis (3D)
7472
- // @include rotate( [ rotation, perspective ] )
7473
- //
7474
- // **Note** This mixin cannot be combined with other transform mixins.
7475
- @mixin rotateY(
7476
- $rotate: $default-rotate,
7477
- $perspective: false
7478
- ) {
7479
- $trans: rotateY($rotate);
7480
- @if $perspective { $trans: perspective($perspective) $trans; }
7481
- @include transform3d($trans);
7482
- }
9242
+ @function -compass-space-list($item1, $item2:null, $item3:null, $item4:null, $item5:null, $item6:null, $item7:null, $item8:null, $item9:null) {
9243
+ $items: ();
9244
+ // Support for polymorphism.
9245
+ @if type-of($item1) == 'list' {
9246
+ // Passing a single array of properties.
9247
+ $items: $item1;
9248
+ } @else {
9249
+ $items: $item1 $item2 $item3 $item4 $item5 $item6 $item7 $item8 $item9;
9250
+ }
7483
9251
 
7484
- // Rotate an object around an arbitrary axis (3D)
7485
- // @include rotate( [ vector-x, vector-y, vector-z, rotation, perspective ] )
7486
- // where the 'vector-' arguments accept unitless numbers.
7487
- // These numbers are not important on their own, but in relation to one another
7488
- // creating an axis from your transform-origin, along the axis of Xx = Yy = Zz.
7489
- //
7490
- // **Note** This mixin cannot be combined with other transform mixins.
7491
- @mixin rotate3d(
7492
- $vector-x: $default-vector-x,
7493
- $vector-y: $default-vector-y,
7494
- $vector-z: $default-vector-z,
7495
- $rotate: $default-rotate,
7496
- $perspective: false
7497
- ) {
7498
- $trans: rotate3d($vector-x, $vector-y, $vector-z, $rotate);
7499
- @if $perspective { $trans: perspective($perspective) $trans; }
7500
- @include transform3d($trans);
7501
- }
9252
+ $full: first-value-of($items);
7502
9253
 
7503
- // @doc off
7504
- // Translate -----------------------------------------------------------------
7505
- // @doc on
9254
+ @for $i from 2 through length($items) {
9255
+ $item: nth($items, $i);
9256
+ @if $item != null {
9257
+ $full: $full $item;
9258
+ }
9259
+ }
7506
9260
 
7507
- // Move an object along the x or y axis (2D)
7508
- // @include translate( [ translate-x, translate-y, perspective, 3D-only ] )
7509
- // where the 'translate-' arguments accept any distance in percentages or absolute (px, cm, in, em etc..) units.
7510
- //
7511
- // **Note** This mixin cannot be combined with other transform mixins.
7512
- @mixin translate(
7513
- $translate-x: $default-translate-x,
7514
- $translate-y: $default-translate-y,
7515
- $perspective: false,
7516
- $only3d: false
7517
- ) {
7518
- $trans: translate($translate-x, $translate-y);
7519
- @if $perspective { $trans: perspective($perspective) $trans; }
7520
- @include transform($trans, $only3d);
9261
+ @return $full;
7521
9262
  }
7522
9263
 
7523
- // Move an object along the x axis (2D)
7524
- // @include translate( [ translate-x, perspective, 3D-only ] )
7525
- //
7526
- // **Note** This mixin cannot be combined with other transform mixins.
7527
- @mixin translateX(
7528
- $trans-x: $default-translate-x,
7529
- $perspective: false,
7530
- $only3d: false
7531
- ) {
7532
- $trans: translateX($trans-x);
7533
- @if $perspective { $trans: perspective($perspective) $trans; }
7534
- @include transform($trans, $only3d);
9264
+ @function -compass-list-size($list) {
9265
+ @return length($list);
7535
9266
  }
7536
9267
 
7537
- // Move an object along the y axis (2D)
7538
- // @include translate( [ translate-y, perspective, 3D-only ] )
7539
- //
7540
- // **Note** This mixin cannot be combined with other transform mixins.
7541
- @mixin translateY(
7542
- $trans-y: $default-translate-y,
7543
- $perspective: false,
7544
- $only3d: false
7545
- ) {
7546
- $trans: translateY($trans-y);
7547
- @if $perspective { $trans: perspective($perspective) $trans; }
7548
- @include transform($trans, $only3d);
9268
+ @function -compass-slice($list, $start, $end: false) {
9269
+ @if $end == false {
9270
+ $end: length($list);
9271
+ }
9272
+ $full: nth($list, $start);
9273
+ @for $i from $start + 1 through $end {
9274
+ $full: $full, nth($list, $i);
9275
+ }
9276
+ @return $full;
9277
+ }
9278
+
9279
+ @function reject($list, $reject1, $reject2:null, $reject3:null, $reject4:null, $reject5:null, $reject6:null, $reject7:null, $reject8:null, $reject9:null) {
9280
+ $rejects: $reject1, $reject2, $reject3, $reject4, $reject5, $reject6, $reject7, $reject8, $reject9;
9281
+
9282
+ $full: false;
9283
+ @each $item in $list {
9284
+ @if index($rejects, $item) {}
9285
+ @else {
9286
+ @if $full {
9287
+ $full: $full, $item;
9288
+ }
9289
+ @else {
9290
+ $full: $item;
9291
+ }
9292
+ }
9293
+ }
9294
+ @return $full;
7549
9295
  }
7550
9296
 
7551
- // Move an object along the z axis (3D)
7552
- // @include translate( [ translate-z, perspective ] )
7553
- //
7554
- // **Note** This mixin cannot be combined with other transform mixins.
7555
- @mixin translateZ(
7556
- $trans-z: $default-translate-z,
7557
- $perspective: false
7558
- ) {
7559
- $trans: translateZ($trans-z);
7560
- @if $perspective { $trans: perspective($perspective) $trans; }
7561
- @include transform3d($trans);
9297
+ @function first-value-of($list) {
9298
+ @return nth($list, 1);
7562
9299
  }
7563
9300
 
7564
- // Move an object along the x, y and z axis (3D)
7565
- // @include translate( [ translate-x, translate-y, translate-z, perspective ] )
7566
- //
7567
- // **Note** This mixin cannot be combined with other transform mixins.
7568
- @mixin translate3d(
7569
- $translate-x: $default-translate-x,
7570
- $translate-y: $default-translate-y,
7571
- $translate-z: $default-translate-z,
7572
- $perspective: false
7573
- ) {
7574
- $trans: translate3d($translate-x, $translate-y, $translate-z);
7575
- @if $perspective { $trans: perspective($perspective) $trans; }
7576
- @include transform3d($trans);
9301
+ @function compact($vars...) {
9302
+ $separator: list-separator($vars);
9303
+ $list: ();
9304
+ @each $var in $vars {
9305
+ @if $var {
9306
+ $list: append($list, $var, $separator);
9307
+ }
9308
+ }
9309
+ @return $list;
7577
9310
  }
7578
9311
 
7579
- // @doc off
7580
- // Skew ----------------------------------------------------------------------
7581
- // @doc on
7582
-
7583
- // Skew an element:
7584
- //
7585
- // @include skew( [ skew-x, skew-y, 3D-only ] )
7586
9312
  //
7587
- // where the 'skew-' arguments accept css angles in degrees (deg) or radian (rad) units.
9313
+ // A partial implementation of the Ruby cross browser support functions from Compass:
9314
+ // https://github.com/Compass/compass/blob/stable/lib/compass/sass_extensions/functions/cross_browser_support.rb
7588
9315
  //
7589
- // **Note** This mixin cannot be combined with other transform mixins.
7590
- @mixin skew(
7591
- $skew-x: $default-skew-x,
7592
- $skew-y: $default-skew-y,
7593
- $only3d: false
7594
- ) {
7595
- $trans: skew($skew-x, $skew-y);
7596
- @include transform($trans, $only3d);
9316
+
9317
+ @function prefixed($prefix, $property1, $property2:null, $property3:null, $property4:null, $property5:null, $property6:null, $property7:null, $property8:null, $property9:null) {
9318
+ $properties: $property1, $property2, $property3, $property4, $property5, $property6, $property7, $property8, $property9;
9319
+ $prefixed: false;
9320
+ @each $item in $properties {
9321
+ @if type-of($item) == 'string' {
9322
+ $prefixed: $prefixed or str-index($item, 'url') != 1 and str-index($item, 'rgb') != 1 and str-index($item, '#') != 1;
9323
+ } @else if type-of($item) == 'color' {
9324
+ } @else if $item != null {
9325
+ $prefixed: true;
9326
+ }
9327
+ }
9328
+ @return $prefixed;
7597
9329
  }
7598
9330
 
7599
- // Skew an element along the x axiz
7600
- //
7601
- // @include skew( [ skew-x, 3D-only ] )
7602
- //
7603
- // **Note** This mixin cannot be combined with other transform mixins.
7604
- @mixin skewX(
7605
- $skew-x: $default-skew-x,
7606
- $only3d: false
7607
- ) {
7608
- $trans: skewX($skew-x);
7609
- @include transform($trans, $only3d);
9331
+ @function prefix($prefix, $property1, $property2:null, $property3:null, $property4:null, $property5:null, $property6:null, $property7:null, $property8:null, $property9:null) {
9332
+ $properties: "";
9333
+
9334
+ // Support for polymorphism.
9335
+ @if type-of($property1) == 'list' {
9336
+ // Passing a single array of properties.
9337
+ $properties: $property1;
9338
+ } @else {
9339
+ // Passing multiple properties.
9340
+ $properties: $property1, $property2, $property3, $property4, $property5, $property6, $property7, $property8, $property9;
9341
+ }
9342
+
9343
+ $props: false;
9344
+ @each $item in $properties {
9345
+ @if $item == null {}
9346
+ @else {
9347
+ @if prefixed($prefix, $item) {
9348
+ $item: #{$prefix}-#{$item};
9349
+ }
9350
+ @if $props {
9351
+ $props: $props, $item;
9352
+ }
9353
+ @else {
9354
+ $props: $item;
9355
+ }
9356
+ }
9357
+ }
9358
+ @return $props;
7610
9359
  }
7611
9360
 
7612
- // Skew an element along the y axis
7613
- //
7614
- // @include skew( [ skew-y, 3D-only ] )
7615
- //
7616
- // **Note** This mixin cannot be combined with other transform mixins.
7617
- @mixin skewY(
7618
- $skew-y: $default-skew-y,
7619
- $only3d: false
7620
- ) {
7621
- $trans: skewY($skew-y);
7622
- @include transform($trans, $only3d);
9361
+ @function -svg($property1, $property2:null, $property3:null, $property4:null, $property5:null, $property6:null, $property7:null, $property8:null, $property9:null) {
9362
+ @return prefix('-svg', $property1, $property2, $property3, $property4, $property5, $property6, $property7, $property8, $property9);
7623
9363
  }
7624
9364
 
9365
+ @function -owg($property1, $property2:null, $property3:null, $property4:null, $property5:null, $property6:null, $property7:null, $property8:null, $property9:null) {
9366
+ @return prefix('-owg', $property1, $property2, $property3, $property4, $property5, $property6, $property7, $property8, $property9);
9367
+ }
7625
9368
 
7626
- // Full transform mixins
7627
- // For settings any combination of transforms as arguments
7628
- // These are complex and not highly recommended for daily use. They are mainly
7629
- // here for backward-compatibility purposes.
7630
- //
7631
- // * they include origin adjustments
7632
- // * scale takes a multiplier (unitless), rotate and skew take degrees (deg)
7633
- //
7634
- // **Note** This mixin cannot be combined with other transform mixins.
7635
- @mixin create-transform(
7636
- $perspective: false,
7637
- $scale-x: false,
7638
- $scale-y: false,
7639
- $scale-z: false,
7640
- $rotate-x: false,
7641
- $rotate-y: false,
7642
- $rotate-z: false,
7643
- $rotate3d: false,
7644
- $trans-x: false,
7645
- $trans-y: false,
7646
- $trans-z: false,
7647
- $skew-x: false,
7648
- $skew-y: false,
7649
- $origin-x: false,
7650
- $origin-y: false,
7651
- $origin-z: false,
7652
- $only3d: false
7653
- ) {
7654
- $trans: unquote("");
9369
+ @function -webkit($property1, $property2:null, $property3:null, $property4:null, $property5:null, $property6:null, $property7:null, $property8:null, $property9:null) {
9370
+ @return prefix('-webkit', $property1, $property2, $property3, $property4, $property5, $property6, $property7, $property8, $property9);
9371
+ }
7655
9372
 
7656
- // perspective
7657
- @if $perspective { $trans: perspective($perspective) ; }
9373
+ @function -moz($property1, $property2:null, $property3:null, $property4:null, $property5:null, $property6:null, $property7:null, $property8:null, $property9:null) {
9374
+ @return prefix('-moz', $property1, $property2, $property3, $property4, $property5, $property6, $property7, $property8, $property9);
9375
+ }
7658
9376
 
7659
- // scale
7660
- @if $scale-x and $scale-y {
7661
- @if $scale-z { $trans: $trans scale3d($scale-x, $scale-y, $scale-z); }
7662
- @else { $trans: $trans scale($scale-x, $scale-y); }
7663
- } @else {
7664
- @if $scale-x { $trans: $trans scaleX($scale-x); }
7665
- @if $scale-y { $trans: $trans scaleY($scale-y); }
7666
- @if $scale-z { $trans: $trans scaleZ($scale-z); }
7667
- }
9377
+ @function -o($property1, $property2:null, $property3:null, $property4:null, $property5:null, $property6:null, $property7:null, $property8:null, $property9:null) {
9378
+ @return prefix('-o', $property1, $property2, $property3, $property4, $property5, $property6, $property7, $property8, $property9);
9379
+ }
7668
9380
 
7669
- // rotate
7670
- @if $rotate-x { $trans: $trans rotateX($rotate-x); }
7671
- @if $rotate-y { $trans: $trans rotateY($rotate-y); }
7672
- @if $rotate-z { $trans: $trans rotateZ($rotate-z); }
7673
- @if $rotate3d { $trans: $trans rotate3d($rotate3d); }
9381
+ @function -pie($property1, $property2:null, $property3:null, $property4:null, $property5:null, $property6:null, $property7:null, $property8:null, $property9:null) {
9382
+ @return prefix('-pie', $property1, $property2, $property3, $property4, $property5, $property6, $property7, $property8, $property9);
9383
+ }
7674
9384
 
7675
- // translate
7676
- @if $trans-x and $trans-y {
7677
- @if $trans-z { $trans: $trans translate3d($trans-x, $trans-y, $trans-z); }
7678
- @else { $trans: $trans translate($trans-x, $trans-y); }
7679
- } @else {
7680
- @if $trans-x { $trans: $trans translateX($trans-x); }
7681
- @if $trans-y { $trans: $trans translateY($trans-y); }
7682
- @if $trans-z { $trans: $trans translateZ($trans-z); }
7683
- }
9385
+ //
9386
+ // A partial implementation of the Ruby gradient support functions from Compass:
9387
+ // https://github.com/Compass/compass/blob/v0.12.2/lib/compass/sass_extensions/functions/gradient_support.rb
9388
+ //
7684
9389
 
7685
- // skew
7686
- @if $skew-x and $skew-y { $trans: $trans skew($skew-x, $skew-y); }
7687
- @else {
7688
- @if $skew-x { $trans: $trans skewX($skew-x); }
7689
- @if $skew-y { $trans: $trans skewY($skew-y); }
9390
+ @function color-stops($item1, $item2:null, $item3:null, $item4:null, $item5:null, $item6:null, $item7:null, $item8:null, $item9:null) {
9391
+ $items: $item2, $item3, $item4, $item5, $item6, $item7, $item8, $item9;
9392
+ $full: $item1;
9393
+ @each $item in $items {
9394
+ @if $item != null {
9395
+ $full: $full, $item;
9396
+ }
7690
9397
  }
9398
+ @return $full;
9399
+ }
9400
+ //
9401
+ // A partial implementation of the Ruby constants functions from Compass:
9402
+ // https://github.com/Compass/compass/blob/stable/lib/compass/sass_extensions/functions/constants.rb
9403
+ //
7691
9404
 
7692
- // apply it!
7693
- @include transform($trans, $only3d);
7694
- @include transform-origin($origin-x, $origin-y, $origin-z, $only3d);
9405
+ @function opposite-position($from) {
9406
+ @if ($from == top) {
9407
+ @return bottom;
9408
+ } @else if ($from == bottom) {
9409
+ @return top;
9410
+ } @else if ($from == left) {
9411
+ @return right;
9412
+ } @else if ($from == right) {
9413
+ @return left;
9414
+ } @else if ($from == center) {
9415
+ @return center;
9416
+ }
9417
+ }
9418
+
9419
+ //
9420
+ // A partial implementation of the Ruby display functions from Compass:
9421
+ // https://github.com/Compass/compass/blob/stable/core/lib/compass/core/sass_extensions/functions/display.rb
9422
+ //
9423
+
9424
+ @function elements-of-type($type){
9425
+ @if ($type == block){
9426
+ @return address, article, aside, blockquote, center, dir, div, dd, details, dl, dt, fieldset, figcaption, figure, form, footer, frameset, h1, h2, h3, h4, h5, h6, hr, header, hgroup, isindex, main, menu, nav, noframes, noscript, ol, p, pre, section, summary, ul;
9427
+ } @else if ($type == inline){
9428
+ @return a, abbr, acronym, audio, b, basefont, bdo, big, br, canvas, cite, code, command, datalist, dfn, em, embed, font, i, img, input, keygen, kbd, label, mark, meter, output, progress, q, rp, rt, ruby, s, samp, select, small, span, strike, strong, sub, sup, textarea, time, tt, u, var, video, wbr;
9429
+ } @else if ($type == inline-block){
9430
+ @return img;
9431
+ } @else if ($type == table){
9432
+ @return table;
9433
+ } @else if ($type == list-item){
9434
+ @return li;
9435
+ } @else if ($type == table-row-group){
9436
+ @return tbody;
9437
+ } @else if ($type == table-header-group){
9438
+ @return thead;
9439
+ } @else if ($type == table-footer-group){
9440
+ @return tfoot;
9441
+ } @else if ($type == table-row){
9442
+ @return tr;
9443
+ } @else if ($type == table-cell){
9444
+ @return th, td;
9445
+ } @else if ($type == html5-block){
9446
+ @return article, aside, details, figcaption, figure, footer, header, hgroup, main, menu, nav, section, summary;
9447
+ } @else if ($type == html5-inline){
9448
+ @return audio, canvas, command, datalist, embed, keygen, mark, meter, output, progress, rp, rt, ruby, time, video, wbr;
9449
+ } @else if ($type == html5){
9450
+ @return article, aside, audio, canvas, command, datalist, details, embed, figcaption, figure, footer, header, hgroup, keygen, main, mark, menu, meter, nav, output, progress, rp, rt, ruby, section, summary, time, video, wbr;
9451
+ } @else if ($type == text-input){
9452
+ @return input, textarea;
9453
+ }
7695
9454
  }
7696
9455
 
9456
+ //
9457
+ // A partial implementation of the Ruby colors functions from Compass:
9458
+ // https://github.com/Compass/compass/blob/stable/core/lib/compass/core/sass_extensions/functions/colors.rb
9459
+ //
7697
9460
 
7698
- // A simplified set of options
7699
- // backwards-compatible with the previous version of the 'transform' mixin
7700
- @mixin simple-transform(
7701
- $scale: false,
7702
- $rotate: false,
7703
- $trans-x: false,
7704
- $trans-y: false,
7705
- $skew-x: false,
7706
- $skew-y: false,
7707
- $origin-x: false,
7708
- $origin-y: false
7709
- ) {
7710
- @include create-transform(
7711
- false,
7712
- $scale, $scale, false,
7713
- false, false, $rotate, false,
7714
- $trans-x, $trans-y, false,
7715
- $skew-x, $skew-y,
7716
- $origin-x, $origin-y, false,
7717
- false
7718
- );
9461
+ // a genericized version of lighten/darken so that negative values can be used.
9462
+ @function adjust-lightness($color, $amount) {
9463
+ @return adjust-color($color, $lightness: $amount);
7719
9464
  }
7720
9465
 
7721
- // Usually compass hacks apply to both ie6 & 7 -- set this to false to disable support for both.
7722
- $legacy-support-for-ie: true !default;
9466
+ // Scales a color's lightness by some percentage.
9467
+ // If the amount is negative, the color is scaled darker, if positive, it is scaled lighter.
9468
+ // This will never return a pure light or dark color unless the amount is 100%.
9469
+ @function scale-lightness($color, $amount) {
9470
+ @return scale-color($color, $lightness: $amount);
9471
+ }
7723
9472
 
7724
- // Setting this to false will result in smaller output, but no support for ie6 hacks
7725
- $legacy-support-for-ie6: $legacy-support-for-ie !default;
9473
+ // a genericized version of saturate/desaturate so that negative values can be used.
9474
+ @function adjust-saturation($color, $amount) {
9475
+ @return adjust-color($color, $saturation: $amount);
9476
+ }
7726
9477
 
7727
- // Setting this to false will result in smaller output, but no support for ie7 hacks
7728
- $legacy-support-for-ie7: $legacy-support-for-ie !default;
9478
+ // Scales a color's saturation by some percentage.
9479
+ // If the amount is negative, the color is desaturated, if positive, it is saturated.
9480
+ // This will never return a pure saturated or desaturated color unless the amount is 100%.
9481
+ @function scale-saturation($color, $amount) {
9482
+ @return scale-color($color, $saturation: $amount);
9483
+ }
7729
9484
 
7730
- // Setting this to false will result in smaller output, but no support for legacy ie8 hacks
7731
- $legacy-support-for-ie8: $legacy-support-for-ie !default;
9485
+ @function shade($color, $percentage) {
9486
+ @return mix(#000000, $color, $percentage);
9487
+ }
7732
9488
 
7733
- // @private
7734
- // The user can simply set $legacy-support-for-ie and 6, 7, and 8 will be set accordingly,
7735
- // But in case the user set each of those explicitly, we need to sync the value of
7736
- // this combined variable.
7737
- $legacy-support-for-ie: $legacy-support-for-ie6 or $legacy-support-for-ie7 or $legacy-support-for-ie8;
9489
+ @function tint($color, $percentage) {
9490
+ @return mix(#ffffff, $color, $percentage);
9491
+ }
7738
9492
 
7739
- // Whether to output legacy support for mozilla.
7740
- // Usually this means hacks to support Firefox 3.6 or earlier.
7741
- $legacy-support-for-mozilla: true;
7742
9493
 
7743
- // Support for mozilla in experimental css3 properties (-moz).
7744
- $experimental-support-for-mozilla : true !default;
7745
- // Support for webkit in experimental css3 properties (-webkit).
7746
- $experimental-support-for-webkit : true !default;
7747
- // Support for webkit's original (non-standard) gradient syntax.
7748
- $support-for-original-webkit-gradients : true !default;
7749
- // Support for opera in experimental css3 properties (-o).
7750
- $experimental-support-for-opera : true !default;
7751
- // Support for microsoft in experimental css3 properties (-ms).
7752
- $experimental-support-for-microsoft : true !default;
7753
- // Support for khtml in experimental css3 properties (-khtml).
7754
- $experimental-support-for-khtml : false !default;
7755
- // Support for svg in experimental css3 properties.
7756
- // Setting this to true might add significant size to your
7757
- // generated stylesheets.
7758
- $experimental-support-for-svg : false !default;
7759
- // Support for CSS PIE in experimental css3 properties (-pie).
7760
- $experimental-support-for-pie : false !default;
9494
+ //
9495
+ // A partial implementation of the Ruby fonts functions from Compass:
9496
+ // https://github.com/Compass/compass/blob/stable/core/lib/compass/core/sass_extensions/functions/font_files.rb
9497
+ //
9498
+ // and several functions from the file:
9499
+ // https://github.com/Compass/compass/blob/stable/core/lib/compass/core/sass_extensions/functions/urls.rb
9500
+ // -----------------------------------------------------------------------------
9501
+ // Helper functions font-files and font-url for font-face mixins.
9502
+ // -----------------------------------------------------------------------------
9503
+ // use mixin this way:
9504
+ //
9505
+ // $font-path: "/public/fonts/roboto";
9506
+ // @include font-face(
9507
+ // 'Roboto',
9508
+ // font_files("roboto.ttf", "truetype", "roboto.woff", "roboto.woff2"), // or
9509
+ // font_files("roboto.ttf", "roboto.woff", "roboto.woff2"),
9510
+ // "roboto.eot", // [$eot]
9511
+ // normal, // [$weight]
9512
+ // normal // [$style]
9513
+ // );
9514
+ // -----------------------------------------------------------------------------
9515
+
9516
+
9517
+ @function font-url($path) {
9518
+ $font-path: 'fonts' !default;
9519
+ @return url("#{$font-path}/#{$path}");
9520
+ }
9521
+
9522
+
9523
+ // -----------------------------------------------------------------------------
9524
+ // helper function to create a list of font files for the src attribute in @font-face.
9525
+ // In the global variable $font-path, you can specify the path to the folder
9526
+ // with fonts relative to style files, by default the path to the fonts is "fonts".
9527
+ //
9528
+ // Usage: font-files ('file-name-w-ext'[, 'format'][,'file-name-w-ext'[, 'format']]...).
9529
+ // If the font format is not specified, the function will add the format corresponding to the file extension.
9530
+ //
9531
+ // for best results use this order: woff, opentype / truetype, svg.
9532
+ // -----------------------------------------------------------------------------
9533
+ // function ported from Ruby.
9534
+ // -----------------------------------------------------------------------------
9535
+ @function font-files($font-files...) {
9536
+ $font-path: 'fonts' !default;
9537
+ // types of font formats from module Compass::Core::SassExtensions::Functions::FontFiles.
9538
+ $font-types: (
9539
+ 'woff': "woff",
9540
+ 'woff2': "woff2",
9541
+ 'opentype': "otf",
9542
+ // 'opentype': "opentype",
9543
+ 'truetype': "ttf",
9544
+ // 'truetype': "truetype",
9545
+ 'svg': "svg",
9546
+ 'embedded-opentype': "eot"
9547
+ );
7761
9548
 
9549
+ $full: '';
9550
+ // if the font format is specified after the font file name, skip the next iteration.
9551
+ $skip-next: false;
9552
+ // number of font files including font format.
9553
+ $font-file-length: length($font-files);
9554
+
9555
+ @for $i from 1 through $font-file-length {
9556
+ @if(not $skip-next) {
9557
+ $font-file: nth($font-files, $i);
9558
+ $font-file-next: if($i < $font-file-length, nth($font-files, $i + 1), false);
9559
+
9560
+ // add font url.
9561
+ $full: $full + 'url("#{$font-path}/#{$font-file}")';
9562
+
9563
+ // add the font format if it is specified after the font file name.
9564
+ @if $font-file-next and map-has-key($font-types, $font-file-next) {
9565
+ $full: $full + ' format("#{$font-file-next}")';
9566
+ $skip-next: true;
9567
+ } @else {
9568
+ // add a font format based on the font file name extension.
9569
+ @each $type, $extension in $font-types {
9570
+ $pos: str-index($font-file, '.' + $extension);
9571
+
9572
+ @if($font-file-next == $extension) {
9573
+ $full: $full + ' format("#{$type}")';
9574
+ $skip-next: true;
9575
+ } @else if ($pos and (to-lower-case(str-slice($font-file, $pos + 1)) == $extension)) {
9576
+ $full: $full + ' format("#{$type}")';
9577
+ }
9578
+ }
9579
+ }
9580
+ } @else {
9581
+ $skip-next: false;
9582
+ }
7762
9583
 
7763
- // This mixin provides basic support for CSS3 properties and
7764
- // their corresponding experimental CSS2 properties when
7765
- // the implementations are identical except for the property
7766
- // prefix.
7767
- @mixin experimental($property, $value,
7768
- $moz : $experimental-support-for-mozilla,
7769
- $webkit : $experimental-support-for-webkit,
7770
- $o : $experimental-support-for-opera,
7771
- $ms : $experimental-support-for-microsoft,
7772
- $khtml : $experimental-support-for-khtml,
7773
- $official : true
7774
- ) {
7775
- @if $webkit and $experimental-support-for-webkit { -webkit-#{$property} : $value; }
7776
- @if $khtml and $experimental-support-for-khtml { -khtml-#{$property} : $value; }
7777
- @if $moz and $experimental-support-for-mozilla { -moz-#{$property} : $value; }
7778
- @if $ms and $experimental-support-for-microsoft { -ms-#{$property} : $value; }
7779
- @if $o and $experimental-support-for-opera { -o-#{$property} : $value; }
7780
- @if $official { #{$property} : $value; }
7781
- }
9584
+ @if (not $skip-next and $i != $font-file-length) { $full: $full + ', ';}
9585
+ }
7782
9586
 
7783
- // Same as experimental(), but for cases when the property is the same and the value is vendorized
7784
- @mixin experimental-value($property, $value,
7785
- $moz : $experimental-support-for-mozilla,
7786
- $webkit : $experimental-support-for-webkit,
7787
- $o : $experimental-support-for-opera,
7788
- $ms : $experimental-support-for-microsoft,
7789
- $khtml : $experimental-support-for-khtml,
7790
- $official : true
7791
- ) {
7792
- @if $webkit and $experimental-support-for-webkit { #{$property} : -webkit-#{$value}; }
7793
- @if $khtml and $experimental-support-for-khtml { #{$property} : -khtml-#{$value}; }
7794
- @if $moz and $experimental-support-for-mozilla { #{$property} : -moz-#{$value}; }
7795
- @if $ms and $experimental-support-for-microsoft { #{$property} : -ms-#{$value}; }
7796
- @if $o and $experimental-support-for-opera { #{$property} : -o-#{$value}; }
7797
- @if $official { #{$property} : #{$value}; }
9587
+ @return unquote($full);
7798
9588
  }
7799
9589
 
7800
9590
 
9591
+
7801
9592
  // CSS Transitions
7802
9593
  // Currently only works in Webkit.
7803
9594
  //
@@ -8192,27 +9983,183 @@ $experimental-support-for-pie : false !default;
8192
9983
  @if $official { #{$property} : #{$value}; }
8193
9984
  }
8194
9985
 
8195
-
8196
- // Webkit, IE10 and future support for [CSS Regions](http://dev.w3.org/csswg/css3-regions/)
9986
+
9987
+ // Webkit, IE10 and future support for [CSS Regions](http://dev.w3.org/csswg/css3-regions/)
9988
+ //
9989
+ // $target is a value you use to link two regions of your css. Give the source of your content the flow-into property, and give your target container the flow-from property.
9990
+ //
9991
+ // For a visual explanation, see the diagrams at Chris Coyier's
9992
+ // [CSS-Tricks](http://css-tricks.com/content-folding/)
9993
+
9994
+ @mixin flow-into($target) {
9995
+ $target: unquote($target);
9996
+ @include experimental(flow-into, $target,
9997
+ not(-moz), -webkit, not(-o), -ms, not(-khtml), not official
9998
+ );
9999
+ }
10000
+
10001
+ @mixin flow-from($target) {
10002
+ $target: unquote($target);
10003
+ @include experimental(flow-from, $target,
10004
+ not(-moz), -webkit, not(-o), -ms, not(-khtml), not official
10005
+ );
10006
+ }
10007
+ // Usually compass hacks apply to both ie6 & 7 -- set this to false to disable support for both.
10008
+ $legacy-support-for-ie: true !default;
10009
+
10010
+ // Setting this to false will result in smaller output, but no support for ie6 hacks
10011
+ $legacy-support-for-ie6: $legacy-support-for-ie !default;
10012
+
10013
+ // Setting this to false will result in smaller output, but no support for ie7 hacks
10014
+ $legacy-support-for-ie7: $legacy-support-for-ie !default;
10015
+
10016
+ // Setting this to false will result in smaller output, but no support for legacy ie8 hacks
10017
+ $legacy-support-for-ie8: $legacy-support-for-ie !default;
10018
+
10019
+ // @private
10020
+ // The user can simply set $legacy-support-for-ie and 6, 7, and 8 will be set accordingly,
10021
+ // But in case the user set each of those explicitly, we need to sync the value of
10022
+ // this combined variable.
10023
+ $legacy-support-for-ie: $legacy-support-for-ie6 or $legacy-support-for-ie7 or $legacy-support-for-ie8;
10024
+
10025
+ // Whether to output legacy support for mozilla.
10026
+ // Usually this means hacks to support Firefox 3.6 or earlier.
10027
+ $legacy-support-for-mozilla: true;
10028
+
10029
+ // Support for mozilla in experimental css3 properties (-moz).
10030
+ $experimental-support-for-mozilla : true !default;
10031
+ // Support for webkit in experimental css3 properties (-webkit).
10032
+ $experimental-support-for-webkit : true !default;
10033
+ // Support for webkit's original (non-standard) gradient syntax.
10034
+ $support-for-original-webkit-gradients : true !default;
10035
+ // Support for opera in experimental css3 properties (-o).
10036
+ $experimental-support-for-opera : true !default;
10037
+ // Support for microsoft in experimental css3 properties (-ms).
10038
+ $experimental-support-for-microsoft : true !default;
10039
+ // Support for khtml in experimental css3 properties (-khtml).
10040
+ $experimental-support-for-khtml : false !default;
10041
+ // Support for svg in experimental css3 properties.
10042
+ // Setting this to true might add significant size to your
10043
+ // generated stylesheets.
10044
+ $experimental-support-for-svg : false !default;
10045
+ // Support for CSS PIE in experimental css3 properties (-pie).
10046
+ $experimental-support-for-pie : false !default;
10047
+
10048
+
10049
+ // This mixin provides basic support for CSS3 properties and
10050
+ // their corresponding experimental CSS2 properties when
10051
+ // the implementations are identical except for the property
10052
+ // prefix.
10053
+ @mixin experimental($property, $value,
10054
+ $moz : $experimental-support-for-mozilla,
10055
+ $webkit : $experimental-support-for-webkit,
10056
+ $o : $experimental-support-for-opera,
10057
+ $ms : $experimental-support-for-microsoft,
10058
+ $khtml : $experimental-support-for-khtml,
10059
+ $official : true
10060
+ ) {
10061
+ @if $webkit and $experimental-support-for-webkit { -webkit-#{$property} : $value; }
10062
+ @if $khtml and $experimental-support-for-khtml { -khtml-#{$property} : $value; }
10063
+ @if $moz and $experimental-support-for-mozilla { -moz-#{$property} : $value; }
10064
+ @if $ms and $experimental-support-for-microsoft { -ms-#{$property} : $value; }
10065
+ @if $o and $experimental-support-for-opera { -o-#{$property} : $value; }
10066
+ @if $official { #{$property} : $value; }
10067
+ }
10068
+
10069
+ // Same as experimental(), but for cases when the property is the same and the value is vendorized
10070
+ @mixin experimental-value($property, $value,
10071
+ $moz : $experimental-support-for-mozilla,
10072
+ $webkit : $experimental-support-for-webkit,
10073
+ $o : $experimental-support-for-opera,
10074
+ $ms : $experimental-support-for-microsoft,
10075
+ $khtml : $experimental-support-for-khtml,
10076
+ $official : true
10077
+ ) {
10078
+ @if $webkit and $experimental-support-for-webkit { #{$property} : -webkit-#{$value}; }
10079
+ @if $khtml and $experimental-support-for-khtml { #{$property} : -khtml-#{$value}; }
10080
+ @if $moz and $experimental-support-for-mozilla { #{$property} : -moz-#{$value}; }
10081
+ @if $ms and $experimental-support-for-microsoft { #{$property} : -ms-#{$value}; }
10082
+ @if $o and $experimental-support-for-opera { #{$property} : -o-#{$value}; }
10083
+ @if $official { #{$property} : #{$value}; }
10084
+ }
10085
+
10086
+
10087
+ // Mixins to support specific CSS Text Level 3 elements
10088
+ //
10089
+ //
10090
+ //
10091
+ // Mixin for word-break properties
10092
+ // http://www.w3.org/css3-text/#word-break
10093
+ // * legal values for $type : normal, keep-all, break-all
10094
+ //
10095
+ // Example:
10096
+ // p.wordBreak {@include word-break(break-all);}
10097
+ //
10098
+ // Which generates:
10099
+ // p.wordBreak {
10100
+ // -ms-word-break: break-all;
10101
+ // word-break: break-all;
10102
+ // word-break: break-word;}
10103
+ //
10104
+ @mixin word-break($value: normal){
10105
+ @if $value == break-all {
10106
+ //Most browsers handle the break-all case the same...
10107
+ @include experimental(word-break, $value,
10108
+ not(-moz), not(-webkit), not(-o), -ms, not(-khtml), official
10109
+ );
10110
+ //Webkit handles break-all differently... as break-word
10111
+ @include experimental(word-break, break-word,
10112
+ not(-moz), not(-webkit), not(-o), not(-ms), not(-khtml), official
10113
+ );
10114
+ }
10115
+ @else {
10116
+ @include experimental(word-break, $value,
10117
+ not(-moz), not(-webkit), not(-o), -ms, not(-khtml), official
10118
+ );
10119
+ }
10120
+ }
10121
+
10122
+ // Mixin for the hyphens property
8197
10123
  //
8198
- // $target is a value you use to link two regions of your css. Give the source of your content the flow-into property, and give your target container the flow-from property.
10124
+ // W3C specification: http://www.w3.org/TR/css3-text/#hyphens
10125
+ // * legal values for $type : auto, manual, none
8199
10126
  //
8200
- // For a visual explanation, see the diagrams at Chris Coyier's
8201
- // [CSS-Tricks](http://css-tricks.com/content-folding/)
8202
-
8203
- @mixin flow-into($target) {
8204
- $target: unquote($target);
8205
- @include experimental(flow-into, $target,
8206
- not(-moz), -webkit, not(-o), -ms, not(-khtml), not official
10127
+ // Example:
10128
+ // p {
10129
+ // @include hyphens(auto);}
10130
+ // Which generates:
10131
+ // p {
10132
+ // -moz-hyphens: auto;
10133
+ // -webkit-hyphens: auto;
10134
+ // hyphens: auto;}
10135
+ //
10136
+ @mixin hyphens($value: auto){
10137
+ @include experimental(hyphens, $value,
10138
+ -moz, -webkit, not(-o), not(-ms), not(-khtml), official
8207
10139
  );
8208
10140
  }
8209
10141
 
8210
- @mixin flow-from($target) {
8211
- $target: unquote($target);
8212
- @include experimental(flow-from, $target,
8213
- not(-moz), -webkit, not(-o), -ms, not(-khtml), not official
8214
- );
10142
+ // Mixin for x-browser hyphenation based on @auchenberg's post:
10143
+ // Removes the need for the <wbr/> HTML tag
10144
+ // http://blog.kenneth.io/blog/2012/03/04/word-wrapping-hypernation-using-css/
10145
+ //
10146
+ // Example:
10147
+ // div {@include hyphenation;}
10148
+ //
10149
+ // Which generates:
10150
+ // div {
10151
+ // -ms-word-break: break-all;
10152
+ // word-break: break-all;
10153
+ // word-break: break-word;
10154
+ // -moz-hyphens: auto;
10155
+ // -webkit-hyphens: auto;
10156
+ // hyphens: auto;}
10157
+ //
10158
+ @mixin hyphenation{
10159
+ @include word-break(break-all);
10160
+ @include hyphens;
8215
10161
  }
10162
+
8216
10163
  // Usually compass hacks apply to both ie6 & 7 -- set this to false to disable support for both.
8217
10164
  $legacy-support-for-ie: true !default;
8218
10165
 
@@ -8292,163 +10239,377 @@ $experimental-support-for-pie : false !default;
8292
10239
  @if $official { #{$property} : #{$value}; }
8293
10240
  }
8294
10241
 
8295
-
8296
- // Mixins to support specific CSS Text Level 3 elements
8297
- //
8298
10242
  //
10243
+ // A partial implementation of the Ruby list functions from Compass:
10244
+ // https://github.com/Compass/compass/blob/stable/lib/compass/sass_extensions/functions/lists.rb
8299
10245
  //
8300
- // Mixin for word-break properties
8301
- // http://www.w3.org/css3-text/#word-break
8302
- // * legal values for $type : normal, keep-all, break-all
8303
- //
8304
- // Example:
8305
- // p.wordBreak {@include word-break(break-all);}
10246
+
10247
+
10248
+ // compact is part of libsass
10249
+
10250
+ @function -compass-nth($list, $place) {
10251
+ // Yep, Sass-lists are 1-indexed.
10252
+ @if $place == "first" {
10253
+ $place: 1;
10254
+ }
10255
+ @if $place == "last" {
10256
+ $place: length($list);
10257
+ }
10258
+ @return nth($list, $place);
10259
+ }
10260
+
10261
+ // compass_list can't be implemented in sass script
10262
+
10263
+ @function -compass-space-list($item1, $item2:null, $item3:null, $item4:null, $item5:null, $item6:null, $item7:null, $item8:null, $item9:null) {
10264
+ $items: ();
10265
+ // Support for polymorphism.
10266
+ @if type-of($item1) == 'list' {
10267
+ // Passing a single array of properties.
10268
+ $items: $item1;
10269
+ } @else {
10270
+ $items: $item1 $item2 $item3 $item4 $item5 $item6 $item7 $item8 $item9;
10271
+ }
10272
+
10273
+ $full: first-value-of($items);
10274
+
10275
+ @for $i from 2 through length($items) {
10276
+ $item: nth($items, $i);
10277
+ @if $item != null {
10278
+ $full: $full $item;
10279
+ }
10280
+ }
10281
+
10282
+ @return $full;
10283
+ }
10284
+
10285
+ @function -compass-list-size($list) {
10286
+ @return length($list);
10287
+ }
10288
+
10289
+ @function -compass-slice($list, $start, $end: false) {
10290
+ @if $end == false {
10291
+ $end: length($list);
10292
+ }
10293
+ $full: nth($list, $start);
10294
+ @for $i from $start + 1 through $end {
10295
+ $full: $full, nth($list, $i);
10296
+ }
10297
+ @return $full;
10298
+ }
10299
+
10300
+ @function reject($list, $reject1, $reject2:null, $reject3:null, $reject4:null, $reject5:null, $reject6:null, $reject7:null, $reject8:null, $reject9:null) {
10301
+ $rejects: $reject1, $reject2, $reject3, $reject4, $reject5, $reject6, $reject7, $reject8, $reject9;
10302
+
10303
+ $full: false;
10304
+ @each $item in $list {
10305
+ @if index($rejects, $item) {}
10306
+ @else {
10307
+ @if $full {
10308
+ $full: $full, $item;
10309
+ }
10310
+ @else {
10311
+ $full: $item;
10312
+ }
10313
+ }
10314
+ }
10315
+ @return $full;
10316
+ }
10317
+
10318
+ @function first-value-of($list) {
10319
+ @return nth($list, 1);
10320
+ }
10321
+
10322
+ @function compact($vars...) {
10323
+ $separator: list-separator($vars);
10324
+ $list: ();
10325
+ @each $var in $vars {
10326
+ @if $var {
10327
+ $list: append($list, $var, $separator);
10328
+ }
10329
+ }
10330
+ @return $list;
10331
+ }
10332
+
8306
10333
  //
8307
- // Which generates:
8308
- // p.wordBreak {
8309
- // -ms-word-break: break-all;
8310
- // word-break: break-all;
8311
- // word-break: break-word;}
10334
+ // A partial implementation of the Ruby cross browser support functions from Compass:
10335
+ // https://github.com/Compass/compass/blob/stable/lib/compass/sass_extensions/functions/cross_browser_support.rb
8312
10336
  //
8313
- @mixin word-break($value: normal){
8314
- @if $value == break-all {
8315
- //Most browsers handle the break-all case the same...
8316
- @include experimental(word-break, $value,
8317
- not(-moz), not(-webkit), not(-o), -ms, not(-khtml), official
8318
- );
8319
- //Webkit handles break-all differently... as break-word
8320
- @include experimental(word-break, break-word,
8321
- not(-moz), not(-webkit), not(-o), not(-ms), not(-khtml), official
8322
- );
10337
+
10338
+ @function prefixed($prefix, $property1, $property2:null, $property3:null, $property4:null, $property5:null, $property6:null, $property7:null, $property8:null, $property9:null) {
10339
+ $properties: $property1, $property2, $property3, $property4, $property5, $property6, $property7, $property8, $property9;
10340
+ $prefixed: false;
10341
+ @each $item in $properties {
10342
+ @if type-of($item) == 'string' {
10343
+ $prefixed: $prefixed or str-index($item, 'url') != 1 and str-index($item, 'rgb') != 1 and str-index($item, '#') != 1;
10344
+ } @else if type-of($item) == 'color' {
10345
+ } @else if $item != null {
10346
+ $prefixed: true;
10347
+ }
8323
10348
  }
8324
- @else {
8325
- @include experimental(word-break, $value,
8326
- not(-moz), not(-webkit), not(-o), -ms, not(-khtml), official
8327
- );
10349
+ @return $prefixed;
10350
+ }
10351
+
10352
+ @function prefix($prefix, $property1, $property2:null, $property3:null, $property4:null, $property5:null, $property6:null, $property7:null, $property8:null, $property9:null) {
10353
+ $properties: "";
10354
+
10355
+ // Support for polymorphism.
10356
+ @if type-of($property1) == 'list' {
10357
+ // Passing a single array of properties.
10358
+ $properties: $property1;
10359
+ } @else {
10360
+ // Passing multiple properties.
10361
+ $properties: $property1, $property2, $property3, $property4, $property5, $property6, $property7, $property8, $property9;
10362
+ }
10363
+
10364
+ $props: false;
10365
+ @each $item in $properties {
10366
+ @if $item == null {}
10367
+ @else {
10368
+ @if prefixed($prefix, $item) {
10369
+ $item: #{$prefix}-#{$item};
10370
+ }
10371
+ @if $props {
10372
+ $props: $props, $item;
10373
+ }
10374
+ @else {
10375
+ $props: $item;
10376
+ }
10377
+ }
10378
+ }
10379
+ @return $props;
10380
+ }
10381
+
10382
+ @function -svg($property1, $property2:null, $property3:null, $property4:null, $property5:null, $property6:null, $property7:null, $property8:null, $property9:null) {
10383
+ @return prefix('-svg', $property1, $property2, $property3, $property4, $property5, $property6, $property7, $property8, $property9);
10384
+ }
10385
+
10386
+ @function -owg($property1, $property2:null, $property3:null, $property4:null, $property5:null, $property6:null, $property7:null, $property8:null, $property9:null) {
10387
+ @return prefix('-owg', $property1, $property2, $property3, $property4, $property5, $property6, $property7, $property8, $property9);
10388
+ }
10389
+
10390
+ @function -webkit($property1, $property2:null, $property3:null, $property4:null, $property5:null, $property6:null, $property7:null, $property8:null, $property9:null) {
10391
+ @return prefix('-webkit', $property1, $property2, $property3, $property4, $property5, $property6, $property7, $property8, $property9);
10392
+ }
10393
+
10394
+ @function -moz($property1, $property2:null, $property3:null, $property4:null, $property5:null, $property6:null, $property7:null, $property8:null, $property9:null) {
10395
+ @return prefix('-moz', $property1, $property2, $property3, $property4, $property5, $property6, $property7, $property8, $property9);
10396
+ }
10397
+
10398
+ @function -o($property1, $property2:null, $property3:null, $property4:null, $property5:null, $property6:null, $property7:null, $property8:null, $property9:null) {
10399
+ @return prefix('-o', $property1, $property2, $property3, $property4, $property5, $property6, $property7, $property8, $property9);
10400
+ }
10401
+
10402
+ @function -pie($property1, $property2:null, $property3:null, $property4:null, $property5:null, $property6:null, $property7:null, $property8:null, $property9:null) {
10403
+ @return prefix('-pie', $property1, $property2, $property3, $property4, $property5, $property6, $property7, $property8, $property9);
10404
+ }
10405
+
10406
+ //
10407
+ // A partial implementation of the Ruby gradient support functions from Compass:
10408
+ // https://github.com/Compass/compass/blob/v0.12.2/lib/compass/sass_extensions/functions/gradient_support.rb
10409
+ //
10410
+
10411
+ @function color-stops($item1, $item2:null, $item3:null, $item4:null, $item5:null, $item6:null, $item7:null, $item8:null, $item9:null) {
10412
+ $items: $item2, $item3, $item4, $item5, $item6, $item7, $item8, $item9;
10413
+ $full: $item1;
10414
+ @each $item in $items {
10415
+ @if $item != null {
10416
+ $full: $full, $item;
10417
+ }
8328
10418
  }
10419
+ @return $full;
8329
10420
  }
10421
+ //
10422
+ // A partial implementation of the Ruby constants functions from Compass:
10423
+ // https://github.com/Compass/compass/blob/stable/lib/compass/sass_extensions/functions/constants.rb
10424
+ //
8330
10425
 
8331
- // Mixin for the hyphens property
8332
- //
8333
- // W3C specification: http://www.w3.org/TR/css3-text/#hyphens
8334
- // * legal values for $type : auto, manual, none
8335
- //
8336
- // Example:
8337
- // p {
8338
- // @include hyphens(auto);}
8339
- // Which generates:
8340
- // p {
8341
- // -moz-hyphens: auto;
8342
- // -webkit-hyphens: auto;
8343
- // hyphens: auto;}
8344
- //
8345
- @mixin hyphens($value: auto){
8346
- @include experimental(hyphens, $value,
8347
- -moz, -webkit, not(-o), not(-ms), not(-khtml), official
8348
- );
10426
+ @function opposite-position($from) {
10427
+ @if ($from == top) {
10428
+ @return bottom;
10429
+ } @else if ($from == bottom) {
10430
+ @return top;
10431
+ } @else if ($from == left) {
10432
+ @return right;
10433
+ } @else if ($from == right) {
10434
+ @return left;
10435
+ } @else if ($from == center) {
10436
+ @return center;
10437
+ }
8349
10438
  }
8350
10439
 
8351
- // Mixin for x-browser hyphenation based on @auchenberg's post:
8352
- // Removes the need for the <wbr/> HTML tag
8353
- // http://blog.kenneth.io/blog/2012/03/04/word-wrapping-hypernation-using-css/
8354
- //
8355
- // Example:
8356
- // div {@include hyphenation;}
8357
- //
8358
- // Which generates:
8359
- // div {
8360
- // -ms-word-break: break-all;
8361
- // word-break: break-all;
8362
- // word-break: break-word;
8363
- // -moz-hyphens: auto;
8364
- // -webkit-hyphens: auto;
8365
- // hyphens: auto;}
10440
+ //
10441
+ // A partial implementation of the Ruby display functions from Compass:
10442
+ // https://github.com/Compass/compass/blob/stable/core/lib/compass/core/sass_extensions/functions/display.rb
10443
+ //
10444
+
10445
+ @function elements-of-type($type){
10446
+ @if ($type == block){
10447
+ @return address, article, aside, blockquote, center, dir, div, dd, details, dl, dt, fieldset, figcaption, figure, form, footer, frameset, h1, h2, h3, h4, h5, h6, hr, header, hgroup, isindex, main, menu, nav, noframes, noscript, ol, p, pre, section, summary, ul;
10448
+ } @else if ($type == inline){
10449
+ @return a, abbr, acronym, audio, b, basefont, bdo, big, br, canvas, cite, code, command, datalist, dfn, em, embed, font, i, img, input, keygen, kbd, label, mark, meter, output, progress, q, rp, rt, ruby, s, samp, select, small, span, strike, strong, sub, sup, textarea, time, tt, u, var, video, wbr;
10450
+ } @else if ($type == inline-block){
10451
+ @return img;
10452
+ } @else if ($type == table){
10453
+ @return table;
10454
+ } @else if ($type == list-item){
10455
+ @return li;
10456
+ } @else if ($type == table-row-group){
10457
+ @return tbody;
10458
+ } @else if ($type == table-header-group){
10459
+ @return thead;
10460
+ } @else if ($type == table-footer-group){
10461
+ @return tfoot;
10462
+ } @else if ($type == table-row){
10463
+ @return tr;
10464
+ } @else if ($type == table-cell){
10465
+ @return th, td;
10466
+ } @else if ($type == html5-block){
10467
+ @return article, aside, details, figcaption, figure, footer, header, hgroup, main, menu, nav, section, summary;
10468
+ } @else if ($type == html5-inline){
10469
+ @return audio, canvas, command, datalist, embed, keygen, mark, meter, output, progress, rp, rt, ruby, time, video, wbr;
10470
+ } @else if ($type == html5){
10471
+ @return article, aside, audio, canvas, command, datalist, details, embed, figcaption, figure, footer, header, hgroup, keygen, main, mark, menu, meter, nav, output, progress, rp, rt, ruby, section, summary, time, video, wbr;
10472
+ } @else if ($type == text-input){
10473
+ @return input, textarea;
10474
+ }
10475
+ }
10476
+
10477
+ //
10478
+ // A partial implementation of the Ruby colors functions from Compass:
10479
+ // https://github.com/Compass/compass/blob/stable/core/lib/compass/core/sass_extensions/functions/colors.rb
8366
10480
  //
8367
- @mixin hyphenation{
8368
- @include word-break(break-all);
8369
- @include hyphens;
10481
+
10482
+ // a genericized version of lighten/darken so that negative values can be used.
10483
+ @function adjust-lightness($color, $amount) {
10484
+ @return adjust-color($color, $lightness: $amount);
8370
10485
  }
8371
10486
 
8372
- // Usually compass hacks apply to both ie6 & 7 -- set this to false to disable support for both.
8373
- $legacy-support-for-ie: true !default;
10487
+ // Scales a color's lightness by some percentage.
10488
+ // If the amount is negative, the color is scaled darker, if positive, it is scaled lighter.
10489
+ // This will never return a pure light or dark color unless the amount is 100%.
10490
+ @function scale-lightness($color, $amount) {
10491
+ @return scale-color($color, $lightness: $amount);
10492
+ }
8374
10493
 
8375
- // Setting this to false will result in smaller output, but no support for ie6 hacks
8376
- $legacy-support-for-ie6: $legacy-support-for-ie !default;
10494
+ // a genericized version of saturate/desaturate so that negative values can be used.
10495
+ @function adjust-saturation($color, $amount) {
10496
+ @return adjust-color($color, $saturation: $amount);
10497
+ }
8377
10498
 
8378
- // Setting this to false will result in smaller output, but no support for ie7 hacks
8379
- $legacy-support-for-ie7: $legacy-support-for-ie !default;
10499
+ // Scales a color's saturation by some percentage.
10500
+ // If the amount is negative, the color is desaturated, if positive, it is saturated.
10501
+ // This will never return a pure saturated or desaturated color unless the amount is 100%.
10502
+ @function scale-saturation($color, $amount) {
10503
+ @return scale-color($color, $saturation: $amount);
10504
+ }
8380
10505
 
8381
- // Setting this to false will result in smaller output, but no support for legacy ie8 hacks
8382
- $legacy-support-for-ie8: $legacy-support-for-ie !default;
10506
+ @function shade($color, $percentage) {
10507
+ @return mix(#000000, $color, $percentage);
10508
+ }
8383
10509
 
8384
- // @private
8385
- // The user can simply set $legacy-support-for-ie and 6, 7, and 8 will be set accordingly,
8386
- // But in case the user set each of those explicitly, we need to sync the value of
8387
- // this combined variable.
8388
- $legacy-support-for-ie: $legacy-support-for-ie6 or $legacy-support-for-ie7 or $legacy-support-for-ie8;
10510
+ @function tint($color, $percentage) {
10511
+ @return mix(#ffffff, $color, $percentage);
10512
+ }
8389
10513
 
8390
- // Whether to output legacy support for mozilla.
8391
- // Usually this means hacks to support Firefox 3.6 or earlier.
8392
- $legacy-support-for-mozilla: true;
8393
10514
 
8394
- // Support for mozilla in experimental css3 properties (-moz).
8395
- $experimental-support-for-mozilla : true !default;
8396
- // Support for webkit in experimental css3 properties (-webkit).
8397
- $experimental-support-for-webkit : true !default;
8398
- // Support for webkit's original (non-standard) gradient syntax.
8399
- $support-for-original-webkit-gradients : true !default;
8400
- // Support for opera in experimental css3 properties (-o).
8401
- $experimental-support-for-opera : true !default;
8402
- // Support for microsoft in experimental css3 properties (-ms).
8403
- $experimental-support-for-microsoft : true !default;
8404
- // Support for khtml in experimental css3 properties (-khtml).
8405
- $experimental-support-for-khtml : false !default;
8406
- // Support for svg in experimental css3 properties.
8407
- // Setting this to true might add significant size to your
8408
- // generated stylesheets.
8409
- $experimental-support-for-svg : false !default;
8410
- // Support for CSS PIE in experimental css3 properties (-pie).
8411
- $experimental-support-for-pie : false !default;
10515
+ //
10516
+ // A partial implementation of the Ruby fonts functions from Compass:
10517
+ // https://github.com/Compass/compass/blob/stable/core/lib/compass/core/sass_extensions/functions/font_files.rb
10518
+ //
10519
+ // and several functions from the file:
10520
+ // https://github.com/Compass/compass/blob/stable/core/lib/compass/core/sass_extensions/functions/urls.rb
10521
+ // -----------------------------------------------------------------------------
10522
+ // Helper functions font-files and font-url for font-face mixins.
10523
+ // -----------------------------------------------------------------------------
10524
+ // use mixin this way:
10525
+ //
10526
+ // $font-path: "/public/fonts/roboto";
10527
+ // @include font-face(
10528
+ // 'Roboto',
10529
+ // font_files("roboto.ttf", "truetype", "roboto.woff", "roboto.woff2"), // or
10530
+ // font_files("roboto.ttf", "roboto.woff", "roboto.woff2"),
10531
+ // "roboto.eot", // [$eot]
10532
+ // normal, // [$weight]
10533
+ // normal // [$style]
10534
+ // );
10535
+ // -----------------------------------------------------------------------------
10536
+
10537
+
10538
+ @function font-url($path) {
10539
+ $font-path: 'fonts' !default;
10540
+ @return url("#{$font-path}/#{$path}");
10541
+ }
10542
+
10543
+
10544
+ // -----------------------------------------------------------------------------
10545
+ // helper function to create a list of font files for the src attribute in @font-face.
10546
+ // In the global variable $font-path, you can specify the path to the folder
10547
+ // with fonts relative to style files, by default the path to the fonts is "fonts".
10548
+ //
10549
+ // Usage: font-files ('file-name-w-ext'[, 'format'][,'file-name-w-ext'[, 'format']]...).
10550
+ // If the font format is not specified, the function will add the format corresponding to the file extension.
10551
+ //
10552
+ // for best results use this order: woff, opentype / truetype, svg.
10553
+ // -----------------------------------------------------------------------------
10554
+ // function ported from Ruby.
10555
+ // -----------------------------------------------------------------------------
10556
+ @function font-files($font-files...) {
10557
+ $font-path: 'fonts' !default;
10558
+ // types of font formats from module Compass::Core::SassExtensions::Functions::FontFiles.
10559
+ $font-types: (
10560
+ 'woff': "woff",
10561
+ 'woff2': "woff2",
10562
+ 'opentype': "otf",
10563
+ // 'opentype': "opentype",
10564
+ 'truetype': "ttf",
10565
+ // 'truetype': "truetype",
10566
+ 'svg': "svg",
10567
+ 'embedded-opentype': "eot"
10568
+ );
8412
10569
 
10570
+ $full: '';
10571
+ // if the font format is specified after the font file name, skip the next iteration.
10572
+ $skip-next: false;
10573
+ // number of font files including font format.
10574
+ $font-file-length: length($font-files);
10575
+
10576
+ @for $i from 1 through $font-file-length {
10577
+ @if(not $skip-next) {
10578
+ $font-file: nth($font-files, $i);
10579
+ $font-file-next: if($i < $font-file-length, nth($font-files, $i + 1), false);
10580
+
10581
+ // add font url.
10582
+ $full: $full + 'url("#{$font-path}/#{$font-file}")';
10583
+
10584
+ // add the font format if it is specified after the font file name.
10585
+ @if $font-file-next and map-has-key($font-types, $font-file-next) {
10586
+ $full: $full + ' format("#{$font-file-next}")';
10587
+ $skip-next: true;
10588
+ } @else {
10589
+ // add a font format based on the font file name extension.
10590
+ @each $type, $extension in $font-types {
10591
+ $pos: str-index($font-file, '.' + $extension);
10592
+
10593
+ @if($font-file-next == $extension) {
10594
+ $full: $full + ' format("#{$type}")';
10595
+ $skip-next: true;
10596
+ } @else if ($pos and (to-lower-case(str-slice($font-file, $pos + 1)) == $extension)) {
10597
+ $full: $full + ' format("#{$type}")';
10598
+ }
10599
+ }
10600
+ }
10601
+ } @else {
10602
+ $skip-next: false;
10603
+ }
8413
10604
 
8414
- // This mixin provides basic support for CSS3 properties and
8415
- // their corresponding experimental CSS2 properties when
8416
- // the implementations are identical except for the property
8417
- // prefix.
8418
- @mixin experimental($property, $value,
8419
- $moz : $experimental-support-for-mozilla,
8420
- $webkit : $experimental-support-for-webkit,
8421
- $o : $experimental-support-for-opera,
8422
- $ms : $experimental-support-for-microsoft,
8423
- $khtml : $experimental-support-for-khtml,
8424
- $official : true
8425
- ) {
8426
- @if $webkit and $experimental-support-for-webkit { -webkit-#{$property} : $value; }
8427
- @if $khtml and $experimental-support-for-khtml { -khtml-#{$property} : $value; }
8428
- @if $moz and $experimental-support-for-mozilla { -moz-#{$property} : $value; }
8429
- @if $ms and $experimental-support-for-microsoft { -ms-#{$property} : $value; }
8430
- @if $o and $experimental-support-for-opera { -o-#{$property} : $value; }
8431
- @if $official { #{$property} : $value; }
8432
- }
10605
+ @if (not $skip-next and $i != $font-file-length) { $full: $full + ', ';}
10606
+ }
8433
10607
 
8434
- // Same as experimental(), but for cases when the property is the same and the value is vendorized
8435
- @mixin experimental-value($property, $value,
8436
- $moz : $experimental-support-for-mozilla,
8437
- $webkit : $experimental-support-for-webkit,
8438
- $o : $experimental-support-for-opera,
8439
- $ms : $experimental-support-for-microsoft,
8440
- $khtml : $experimental-support-for-khtml,
8441
- $official : true
8442
- ) {
8443
- @if $webkit and $experimental-support-for-webkit { #{$property} : -webkit-#{$value}; }
8444
- @if $khtml and $experimental-support-for-khtml { #{$property} : -khtml-#{$value}; }
8445
- @if $moz and $experimental-support-for-mozilla { #{$property} : -moz-#{$value}; }
8446
- @if $ms and $experimental-support-for-microsoft { #{$property} : -ms-#{$value}; }
8447
- @if $o and $experimental-support-for-opera { #{$property} : -o-#{$value}; }
8448
- @if $official { #{$property} : #{$value}; }
10608
+ @return unquote($full);
8449
10609
  }
8450
10610
 
8451
10611
 
10612
+
8452
10613
  // Provides cross-browser support for the upcoming (?) css3 filter property.
8453
10614
  //
8454
10615
  // Each filter argument should adhere to the standard css3 syntax for the
@@ -8876,165 +11037,165 @@ $experimental-support-for-pie : false !default;
8876
11037
  @include flexbox((align-content: $align-content));
8877
11038
  }
8878
11039
 
8879
- //import required by _mixins
8880
- // Modules
8881
- // Layout Change Breakpoints
8882
-
8883
- $breakpoint-small: 481px;
8884
- $breakpoint-medium: 641px;
8885
- $breakpoint-xmedium: 860px;
8886
- $breakpoint-large: 1025px;
8887
- $breakpoint-xlarge: 1200px;
8888
- $breakpoint-xxlarge: 1441px;
8889
- $breakpoint-xxxlarge: 1921px;
8890
-
8891
- // Font size variables
8892
- $font-size-extra-large: 32px;
8893
- $font-size-large: 18px;
8894
- $font-size-md-large: 16px;
8895
- $font-size-md: 14px;
8896
- $font-size-small: 12px;
8897
- $font-size-mini: 10px;
8898
-
8899
- $font-weight-thin: 100;
8900
- $font-weight-light: 300;
8901
- $font-weight-normal: 400;
8902
- $font-weight-medium: 500;
8903
- $font-weight-bold: 700;
8904
-
8905
- // Colors
8906
- $color-primary: #4D4CFC;
8907
- $color-primary-light: lighten($color-primary, 15%);
8908
- $color-primary-dark: darken($color-primary, 20%);
8909
- $color-primary-darker: desaturate(darken($color-primary, 40%), 60%);
8910
-
8911
- $color-secondary: #AFB3C0;
8912
- $color-secondary-light: lighten($color-secondary, 15%);
8913
- $color-secondary-dark: darken($color-secondary, 15%);
8914
-
8915
- $color-success: #45DFB0;
8916
- $color-success-light: lighten($color-success, 15%);
8917
- $color-success-dark: darken($color-success, 15%);
8918
-
8919
- $color-alert: #FF425E;
8920
- $color-alert-light: lighten($color-alert, 15%);
8921
- $color-alert-dark: darken($color-alert, 15%);
8922
-
8923
- $color-warning: #FFFF00;
8924
- $color-warning-light: lighten($color-warning, 15%);
8925
- $color-warning-dark: darken($color-warning, 15%);
8926
-
8927
- $color-dark-gray: #666666;
8928
-
8929
- $color-text: #434448;
8930
- $color-text: #434448;
8931
- $default-color-hover: #EFF0F3;
8932
-
8933
- $default-background-color-app: #F4F4F5;
8934
- $list-divider-color: #dadce2;
8935
-
8936
- /*#############################################################################
8937
- # FUNCTIONS
8938
- #############################################################################*/
8939
-
8940
-
8941
- // ===========================================================================
8942
-
8943
- // This is the default html and body font-size for the base rem value.
8944
- $rem-base: 16px !default;
8945
-
8946
- // STRIP UNIT
8947
- // It strips the unit of measure and returns it
8948
- @function strip-unit($num) {
8949
- @return $num / ($num * 0 + 1);
8950
- }
8951
-
8952
- // CONVERT TO REM
8953
- @function convert-to-rem($value, $base-value: $rem-base) {
8954
- $value: strip-unit($value) / strip-unit($base-value) * 1rem;
8955
- @if ($value == 0rem) { $value: 0; } // Turn 0rem into 0
8956
- @return $value;
8957
- }
8958
-
8959
- // REM CALC
8960
- @function rem-calc($values, $base-value: $rem-base) {
8961
- $max: length($values);
8962
-
8963
- @if $max == 1 { @return convert-to-rem(nth($values, 1), $base-value); }
8964
-
8965
- $remValues: ();
8966
- @for $i from 1 through $max {
8967
- $remValues: append($remValues, convert-to-rem(nth($values, $i), $base-value));
8968
- }
8969
- @return $remValues;
8970
- }
8971
-
8972
- // ===========================================================================
8973
-
8974
- /*#############################################################################
8975
- # MIXINS
8976
- #############################################################################*/
8977
-
8978
- // Media Queries
8979
-
8980
- @mixin responsive($break-point) {
8981
-
8982
- @media only screen and (min-width: rem-calc($break-point)) { @content; }
8983
-
8984
- }
8985
-
8986
- @mixin responsive-min-max($min-break-point, $max-break-point) {
8987
-
8988
- @media only screen and (min-width: rem-calc($min-break-point)) and (max-width: rem-calc($max-break-point)) { @content; }
8989
-
8990
- }
8991
-
8992
- @mixin responsive-max($break-point) {
8993
-
8994
- @media only screen and (max-width: rem-calc($break-point)) { @content; }
8995
-
8996
- }
8997
-
8998
- @mixin responsive-height($break-point) {
8999
-
9000
- @media only screen and (min-height: rem-calc($break-point)) { @content; }
9001
-
9002
- }
9003
-
9004
- @mixin responsive-max-height($break-point) {
9005
-
9006
- @media only screen and (max-height: rem-calc($break-point)) { @content; }
9007
-
9008
- }
9009
-
9010
-
9011
- // ------------------------------------------------
9012
- // Retina display support
9013
- /* Example:
9014
- div.logo {
9015
- background: url("logo.png") no-repeat;
9016
- @include background-retina("logo2x.png", 100px, 25px);
9017
- }
9018
- */
9019
- @mixin background-retina($image, $width, $height) {
9020
- @media
9021
- only screen and (-webkit-min-device-pixel-ratio: 1.3),
9022
- only screen and (-o-min-device-pixel-ratio: 2.6/2),
9023
- only screen and (min--moz-device-pixel-ratio: 1.3),
9024
- only screen and (min-device-pixel-ratio: 1.3),
9025
- only screen and (min-resolution: 1.3dppx) {
9026
- background-image: url($image);
9027
- background-size: $width $height;
9028
- }
9029
- }
9030
-
9031
-
9032
- /*#############################################################################
9033
- # PLACEHOLDERS
9034
- #############################################################################*/
9035
-
9036
-
9037
- %transition-all {
9038
- @include transition(all 0.2s cubic-bezier(.7, 0, .175, 1) 0s);
9039
- }
9040
-
11040
+ //import required by _mixins
11041
+ // Modules
11042
+ // Layout Change Breakpoints
11043
+
11044
+ $breakpoint-small: 481px;
11045
+ $breakpoint-medium: 641px;
11046
+ $breakpoint-xmedium: 860px;
11047
+ $breakpoint-large: 1025px;
11048
+ $breakpoint-xlarge: 1200px;
11049
+ $breakpoint-xxlarge: 1441px;
11050
+ $breakpoint-xxxlarge: 1921px;
11051
+
11052
+ // Font size variables
11053
+ $font-size-extra-large: 32px;
11054
+ $font-size-large: 18px;
11055
+ $font-size-md-large: 16px;
11056
+ $font-size-md: 14px;
11057
+ $font-size-small: 12px;
11058
+ $font-size-mini: 10px;
11059
+
11060
+ $font-weight-thin: 100;
11061
+ $font-weight-light: 300;
11062
+ $font-weight-normal: 400;
11063
+ $font-weight-medium: 500;
11064
+ $font-weight-bold: 700;
11065
+
11066
+ // Colors
11067
+ $color-primary: #4D4CFC;
11068
+ $color-primary-light: lighten($color-primary, 15%);
11069
+ $color-primary-dark: darken($color-primary, 20%);
11070
+ $color-primary-darker: desaturate(darken($color-primary, 40%), 60%);
11071
+
11072
+ $color-secondary: #AFB3C0;
11073
+ $color-secondary-light: lighten($color-secondary, 15%);
11074
+ $color-secondary-dark: darken($color-secondary, 15%);
11075
+
11076
+ $color-success: #45DFB0;
11077
+ $color-success-light: lighten($color-success, 15%);
11078
+ $color-success-dark: darken($color-success, 15%);
11079
+
11080
+ $color-alert: #FF425E;
11081
+ $color-alert-light: lighten($color-alert, 15%);
11082
+ $color-alert-dark: darken($color-alert, 15%);
11083
+
11084
+ $color-warning: #FFFF00;
11085
+ $color-warning-light: lighten($color-warning, 15%);
11086
+ $color-warning-dark: darken($color-warning, 15%);
11087
+
11088
+ $color-dark-gray: #666666;
11089
+
11090
+ $color-text: #434448;
11091
+ $color-text: #434448;
11092
+ $default-color-hover: #EFF0F3;
11093
+
11094
+ $default-background-color-app: #F4F4F5;
11095
+ $list-divider-color: #dadce2;
11096
+
11097
+ /*#############################################################################
11098
+ # FUNCTIONS
11099
+ #############################################################################*/
11100
+
11101
+
11102
+ // ===========================================================================
11103
+
11104
+ // This is the default html and body font-size for the base rem value.
11105
+ $rem-base: 16px !default;
11106
+
11107
+ // STRIP UNIT
11108
+ // It strips the unit of measure and returns it
11109
+ @function strip-unit($num) {
11110
+ @return $num / ($num * 0 + 1);
11111
+ }
11112
+
11113
+ // CONVERT TO REM
11114
+ @function convert-to-rem($value, $base-value: $rem-base) {
11115
+ $value: strip-unit($value) / strip-unit($base-value) * 1rem;
11116
+ @if ($value == 0rem) { $value: 0; } // Turn 0rem into 0
11117
+ @return $value;
11118
+ }
11119
+
11120
+ // REM CALC
11121
+ @function rem-calc($values, $base-value: $rem-base) {
11122
+ $max: length($values);
11123
+
11124
+ @if $max == 1 { @return convert-to-rem(nth($values, 1), $base-value); }
11125
+
11126
+ $remValues: ();
11127
+ @for $i from 1 through $max {
11128
+ $remValues: append($remValues, convert-to-rem(nth($values, $i), $base-value));
11129
+ }
11130
+ @return $remValues;
11131
+ }
11132
+
11133
+ // ===========================================================================
11134
+
11135
+ /*#############################################################################
11136
+ # MIXINS
11137
+ #############################################################################*/
11138
+
11139
+ // Media Queries
11140
+
11141
+ @mixin responsive($break-point) {
11142
+
11143
+ @media only screen and (min-width: rem-calc($break-point)) { @content; }
11144
+
11145
+ }
11146
+
11147
+ @mixin responsive-min-max($min-break-point, $max-break-point) {
11148
+
11149
+ @media only screen and (min-width: rem-calc($min-break-point)) and (max-width: rem-calc($max-break-point)) { @content; }
11150
+
11151
+ }
11152
+
11153
+ @mixin responsive-max($break-point) {
11154
+
11155
+ @media only screen and (max-width: rem-calc($break-point)) { @content; }
11156
+
11157
+ }
11158
+
11159
+ @mixin responsive-height($break-point) {
11160
+
11161
+ @media only screen and (min-height: rem-calc($break-point)) { @content; }
11162
+
11163
+ }
11164
+
11165
+ @mixin responsive-max-height($break-point) {
11166
+
11167
+ @media only screen and (max-height: rem-calc($break-point)) { @content; }
11168
+
11169
+ }
11170
+
11171
+
11172
+ // ------------------------------------------------
11173
+ // Retina display support
11174
+ /* Example:
11175
+ div.logo {
11176
+ background: url("logo.png") no-repeat;
11177
+ @include background-retina("logo2x.png", 100px, 25px);
11178
+ }
11179
+ */
11180
+ @mixin background-retina($image, $width, $height) {
11181
+ @media
11182
+ only screen and (-webkit-min-device-pixel-ratio: 1.3),
11183
+ only screen and (-o-min-device-pixel-ratio: 2.6/2),
11184
+ only screen and (min--moz-device-pixel-ratio: 1.3),
11185
+ only screen and (min-device-pixel-ratio: 1.3),
11186
+ only screen and (min-resolution: 1.3dppx) {
11187
+ background-image: url($image);
11188
+ background-size: $width $height;
11189
+ }
11190
+ }
11191
+
11192
+
11193
+ /*#############################################################################
11194
+ # PLACEHOLDERS
11195
+ #############################################################################*/
11196
+
11197
+
11198
+ %transition-all {
11199
+ @include transition(all 0.2s cubic-bezier(.7, 0, .175, 1) 0s);
11200
+ }
11201
+