scut 0.9.0 → 0.9.1

Sign up to get free protection for your applications and to get access to all the features.
Files changed (4) hide show
  1. checksums.yaml +4 -4
  2. data/dist/_scut.scss +31 -7
  3. data/lib/scut.rb +2 -2
  4. metadata +2 -2
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 2f70f44afec7bb234b517a78a628be7371325121
4
- data.tar.gz: bbe7ac461de9efdceb8a37c173f05dcb9d837cc7
3
+ metadata.gz: d80b9ec8504ae003dbf833bb431aab2add0cd9e1
4
+ data.tar.gz: 35637f9c40c93e502a66227dc8801c49861bef9a
5
5
  SHA512:
6
- metadata.gz: 4ec1991f398215e9d2d58f3a87c5f0a46f577dc4f4285f9c55ee36973a7f9269bf32189f3d1de7de9b2e2acd5375de20c2f8380e5316fd41757569a3294cb3ed
7
- data.tar.gz: 6454ad69ff8d6f85eaa832a1d1b875362eb423d496b03935cb7c2f54cabb7c4a68d4ed5b9a7d51348072fd06e968c937cf28f6bf0e695139adda512164cc21a8
6
+ metadata.gz: 77fc42920a37c75e2e96f4762cf6ec0ab7153cef922a607a8d6d423c76d34b4d4559d5a6930302a2667d80b063f373242322e61e1c2b3b89c8314003077fdf77
7
+ data.tar.gz: 0233671560d46984e8193770c45fed813d28f674b14a2073fd251c3fe1896969fa9fc0df328090dce87bc5dcbf13d1276bbcc9cc16bbb49a356614b087834f2d
data/dist/_scut.scss CHANGED
@@ -1,6 +1,6 @@
1
1
  /*
2
2
  * Scut, a collection of Sass utilities to ease and improve our implementations of common style-code patterns.
3
- * v0.9.0
3
+ * v0.9.1
4
4
  * Docs at http://davidtheclark.github.io/scut
5
5
  */
6
6
 
@@ -1428,11 +1428,36 @@ $scut-whitecircle: "\25cb";
1428
1428
  // SCUT FONT-FACE
1429
1429
  // http://davidtheclark.github.io/scut/#font-face
1430
1430
 
1431
+ @function main-src($formats, $file-path, $font-family) {
1432
+ // Return the list of `src` values, in order, that
1433
+ // a good `@font-face` will need, including only
1434
+ // those formats specified in the list `$formats`.
1435
+ $result: ();
1436
+ @if index($formats, eot) {
1437
+ $eot-val: url('#{$file-path}.eot?#iefix') format('embedded-opentype');
1438
+ $result: append($result, $eot-val, comma);
1439
+ }
1440
+ @if index($formats, woff) {
1441
+ $woff-val: url('#{$file-path}.woff') format('woff');
1442
+ $result: append($result, $woff-val, comma);
1443
+ }
1444
+ @if index($formats, ttf) {
1445
+ $ttf-val: url('#{$file-path}.ttf') format('truetype');
1446
+ $result: append($result, $ttf-val, comma);
1447
+ }
1448
+ @if index($formats, svg) {
1449
+ $svg-val: url('#{$file-path}.svg##{$font-family}') format('svg');
1450
+ $result: append($result, $svg-val, comma);
1451
+ }
1452
+ @return $result;
1453
+ }
1454
+
1431
1455
  @mixin scut-font-face (
1432
1456
  $font-family,
1433
1457
  $file-path,
1434
1458
  $weight: normal,
1435
- $style: normal
1459
+ $style: normal,
1460
+ $formats: eot woff ttf svg
1436
1461
  ) {
1437
1462
 
1438
1463
  @if index('italic' 'oblique', $weight) {
@@ -1445,11 +1470,10 @@ $scut-whitecircle: "\25cb";
1445
1470
  font-weight: $weight;
1446
1471
  font-style: $style;
1447
1472
 
1448
- src: url('#{$file-path}.eot');
1449
- src: url('#{$file-path}.eot?#iefix') format('embedded-opentype'),
1450
- url('#{$file-path}.woff') format('woff'),
1451
- url('#{$file-path}.ttf') format('truetype'),
1452
- url('#{$file-path}.svg##{$font-family}') format('svg');
1473
+ @if index($formats, eot) {
1474
+ src: url('#{$file-path}.eot');
1475
+ }
1476
+ src: main-src($formats, $file-path, $font-family);
1453
1477
  }
1454
1478
 
1455
1479
  }
data/lib/scut.rb CHANGED
@@ -5,6 +5,6 @@ stylesheets_dir = File.join(base_directory, 'dist')
5
5
  Compass::Frameworks.register('Scut', :stylesheets_directory => stylesheets_dir)
6
6
 
7
7
  module Scut
8
- VERSION = "0.9.0"
9
- DATE = "2014-01-29"
8
+ VERSION = "0.9.1"
9
+ DATE = "2014-02-10"
10
10
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: scut
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.9.0
4
+ version: 0.9.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - David Clark
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2014-01-29 00:00:00.000000000 Z
11
+ date: 2014-02-10 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: sass