scut 0.7.2 → 0.8.0

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 +68 -21
  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: 6810606ff13638df342cfc4c54fcbcd70499bcf4
4
- data.tar.gz: 0e5ed966216697f9df8a25af50a618fe1a313c20
3
+ metadata.gz: 72d1ee5bd38af110fb0aa8df4db849f6c72741fd
4
+ data.tar.gz: 6f237718fe6fc2b68951e09f6e3d61ca0dd8353b
5
5
  SHA512:
6
- metadata.gz: 8ab84041758a93f9c0a94af7dd84c2c36050763e555894815484b9bd0e07729be0552617718535859d67f397ddc9cbbe0343624ba538d989e247d9973bd44e5f
7
- data.tar.gz: 090b17e256927f627e2c35ed203c9aefa224260f109b9f1fdd6c95883daa4883fdd902bc05f19abd358eeb34ac416aa6ff03f6c7389d8b1558e82b569f79eae2
6
+ metadata.gz: 36a721d349ef6d691b595214fe1b83558e3b29c552550bb337ac6349b640375f0790cc5b776ebd6139d9c68f8ce11438230c8551533fcaf5e1c14dc3349fa224
7
+ data.tar.gz: cd500e38611d208ad47db69841d144976d40b1864181021d8110700eb180e46060ce26097e0e707839a0009fe20f04109e0c24b67fc817085a86190bcc7562c9
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.7.2
3
+ * v0.8.0
4
4
  * Docs at http://davidtheclark.github.io/scut
5
5
  */
6
6
 
@@ -130,12 +130,20 @@ $scut-em-base: 16 !default;
130
130
  $multiplier: if(unit($base) == em, 16, 1);
131
131
  $divisor: scut-strip-unit($base) * $multiplier;
132
132
 
133
- $em-vals: null;
133
+ $em-vals: ();
134
134
  @each $val in $pixels {
135
135
  $val-in-ems: (scut-strip-unit($val) / $divisor) * 1em;
136
136
  $em-vals: append($em-vals, $val-in-ems);
137
137
  }
138
- @return $em-vals;
138
+
139
+ @if length($em-vals) == 1 {
140
+ // return a single value instead of a list,
141
+ // so it can be used in calculations
142
+ @return nth($em-vals, 1);
143
+ }
144
+ @else {
145
+ @return $em-vals;
146
+ }
139
147
 
140
148
  }
141
149
 
@@ -148,12 +156,20 @@ $scut-em-base: 16 !default;
148
156
  $pixels
149
157
  ) {
150
158
 
151
- $rem-vals: null;
159
+ $rem-vals: ();
152
160
  @each $val in $pixels {
153
161
  $val-in-rems: scut-strip-unit($val) / 16 * 1rem;
154
162
  $rem-vals: append($rem-vals, $val-in-rems);
155
163
  }
156
- @return $rem-vals;
164
+
165
+ @if length($rem-vals) == 1 {
166
+ // return a single value instead of a list,
167
+ // so it can be used in calculations
168
+ @return nth($rem-vals, 1);
169
+ }
170
+ @else {
171
+ @return $rem-vals;
172
+ }
157
173
 
158
174
  }
159
175
 
@@ -398,8 +414,6 @@ $scut-em-base: 16 !default;
398
414
  @mixin scut-reset-pointer {
399
415
  // Clickable form elements should have a pointer.
400
416
  label,
401
- input,
402
- textarea,
403
417
  select,
404
418
  option,
405
419
  button {
@@ -409,12 +423,12 @@ $scut-em-base: 16 !default;
409
423
 
410
424
  @mixin scut-reset-form {
411
425
  fieldset {
412
- border: 0;
413
- margin: 0;
414
- padding: 0;
426
+ border: 0;
427
+ margin: 0;
428
+ padding: 0;
415
429
  }
416
430
  textarea {
417
- resize: vertical;
431
+ resize: vertical;
418
432
  }
419
433
  }
420
434
 
@@ -431,10 +445,14 @@ $scut-em-base: 16 !default;
431
445
  width: auto;
432
446
  -webkit-appearance: none;
433
447
  -webkit-font-smoothing: antialiased;
448
+ -webkit-user-select: none;
449
+ -moz-user-select: none;
450
+ -ms-user-select: none;
451
+ user-select: none;
434
452
  }
435
453
  }
436
454
 
437
- @mixin scut-reset-paragraphs {
455
+ @mixin scut-reset-paragraph {
438
456
  // Some paragraph margins just get in the way.
439
457
  p:first-of-type {
440
458
  margin-top: 0;
@@ -444,15 +462,29 @@ $scut-em-base: 16 !default;
444
462
  }
445
463
  }
446
464
 
447
- // Call them all!
448
- @mixin scut-reset {
449
- @include scut-reset-border-box;
450
- @include scut-reset-antialias;
451
- @include scut-reset-semanticize;
452
- @include scut-reset-pointer;
453
- @include scut-reset-form;
454
- @include scut-reset-button;
455
- @include scut-reset-paragraphs;
465
+ // Call them all, minus exclusions!
466
+ @mixin scut-reset ($exclude: false) {
467
+ @if not index($exclude, border-box) {
468
+ @include scut-reset-border-box;
469
+ }
470
+ @if not index($exclude, antialias) {
471
+ @include scut-reset-antialias;
472
+ }
473
+ @if not index($exclude, semanticize) {
474
+ @include scut-reset-semanticize;
475
+ }
476
+ @if not index($exclude, pointer) {
477
+ @include scut-reset-pointer;
478
+ }
479
+ @if not index($exclude, form) {
480
+ @include scut-reset-form;
481
+ }
482
+ @if not index($exclude, button) {
483
+ @include scut-reset-button;
484
+ }
485
+ @if not index($exclude, paragraph) {
486
+ @include scut-reset-paragraph;
487
+ }
456
488
  }
457
489
 
458
490
  // SCUT SELECTED
@@ -1590,4 +1622,19 @@ $scut-whitecircle: "\25cb";
1590
1622
 
1591
1623
  %scut-side-lined {
1592
1624
  @include scut-side-lined;
1625
+ }
1626
+
1627
+ // SCUT TRUNCATE
1628
+ // http://davidtheclark.github.io/scut/#truncate
1629
+
1630
+ @mixin scut-truncate {
1631
+
1632
+ white-space: nowrap;
1633
+ overflow: hidden;
1634
+ text-overflow: ellipsis;
1635
+
1636
+ }
1637
+
1638
+ %scut-truncate {
1639
+ @include scut-truncate;
1593
1640
  }
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.7.2"
9
- DATE = "2013-12-08"
8
+ VERSION = "0.8.0"
9
+ DATE = "2013-12-13"
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.7.2
4
+ version: 0.8.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - David Clark
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2013-12-08 00:00:00.000000000 Z
11
+ date: 2013-12-13 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: sass