sassquatch 0.0.4 → 0.0.5

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.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 24f7d0382fe6d5485cf03fb09787e722712f46d0
4
- data.tar.gz: 95b702d1194cfb93452034339bb2531cad45db8c
3
+ metadata.gz: a76e6761a17c2d15c2340327ad97749523eefe31
4
+ data.tar.gz: 4b9b20de0aeeefb61010403814ed60304585d78d
5
5
  SHA512:
6
- metadata.gz: 8cf0d683179c29c53efff648136dbc6cda9669201734bf4ac2b17596d37ec68f0bdbdac6c86493e2fb7a3e36e3291e23271fb405d5f130b63ac83d4005e1f204
7
- data.tar.gz: c30dd50abaa88a07566f48c02ca4de7a3052250c409677c42f1b1b832c2eb3feb2344be3c9fcca735e290ea919d1af5732cdb84ab6896d3c1dc47dfb7d067318
6
+ metadata.gz: 27006765f103c3491e04cfebd10f2db8a089baf78e0f03509970f4173ab557b6a76d533d1980a8aa179a8781ab056315d3e800567a6f756b44c74edeb529d1ec
7
+ data.tar.gz: efba1e259040c1dea40edd43838a67364e0c843d49e8b59570ab00eaca3aea3f83edc41a024960edd23fb04da630d778f3fd87c167911ea8a6056bfeed49da4d
@@ -1,16 +1,21 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- sassquatch (0.0.4)
4
+ sassquatch (0.0.5)
5
5
  thor
6
6
 
7
7
  GEM
8
8
  remote: https://rubygems.org/
9
9
  specs:
10
- thor (0.18.1)
10
+ rake (10.4.2)
11
+ thor (0.19.1)
11
12
 
12
13
  PLATFORMS
13
14
  ruby
14
15
 
15
16
  DEPENDENCIES
17
+ rake
16
18
  sassquatch!
19
+
20
+ BUNDLED WITH
21
+ 1.10.6
@@ -1,24 +1,29 @@
1
1
  $rails: true !default;
2
2
 
3
- @import "sassquatch/variables";
4
- @import "sassquatch/background_image";
5
- @import "sassquatch/centered";
6
- @import "sassquatch/clearfix";
7
- @import "sassquatch/display";
8
- @import "sassquatch/effects";
9
- @import "sassquatch/em";
10
- @import "sassquatch/flat_list";
11
- @import "sassquatch/floated_items";
12
- @import "sassquatch/fonts";
13
- @import "sassquatch/grid";
14
- @import "sassquatch/image_replace";
15
- @import "sassquatch/links";
16
- @import "sassquatch/mute";
17
- @import "sassquatch/no_border";
18
- @import "sassquatch/no_list_style";
19
- @import "sassquatch/no_margin";
20
- @import "sassquatch/no_padding";
21
- @import "sassquatch/position";
22
- @import "sassquatch/rails";
23
- @import "sassquatch/reset_box";
24
- @import "sassquatch/reset_last_child";
3
+ @import 'sassquatch/variables';
4
+ @import 'sassquatch/alignment';
5
+ @import 'sassquatch/background_image';
6
+ @import 'sassquatch/background_transition';
7
+ @import 'sassquatch/centered';
8
+ @import 'sassquatch/clearfix';
9
+ @import 'sassquatch/display';
10
+ @import 'sassquatch/effects';
11
+ @import 'sassquatch/em';
12
+ @import 'sassquatch/flat_list';
13
+ @import 'sassquatch/floated_items';
14
+ @import 'sassquatch/fonts';
15
+ @import 'sassquatch/grid';
16
+ @import 'sassquatch/image_replace';
17
+ @import 'sassquatch/inputs';
18
+ @import 'sassquatch/links';
19
+ @import 'sassquatch/mute';
20
+ @import 'sassquatch/no_border';
21
+ @import 'sassquatch/no_list_style';
22
+ @import 'sassquatch/no_margin';
23
+ @import 'sassquatch/no_padding';
24
+ @import 'sassquatch/outline';
25
+ @import 'sassquatch/position';
26
+ @import 'sassquatch/rails';
27
+ @import 'sassquatch/reset_box';
28
+ @import 'sassquatch/reset_last_child';
29
+ @import 'sassquatch/select';
@@ -0,0 +1,11 @@
1
+ %align-center {
2
+ text-align: center;
3
+ }
4
+
5
+ %align-left {
6
+ text-align: left;
7
+ }
8
+
9
+ %align-right {
10
+ text-align: right;
11
+ }
@@ -0,0 +1,4 @@
1
+ // Just a shortcut for background transition.
2
+ @mixin background-transition($duration: .2s) {
3
+ @include transition(background $duration ease-in);
4
+ }
@@ -1,4 +1,4 @@
1
- $base-font: 16px !default;
1
+ $font-size-base: 16px !default;
2
2
 
3
3
  @function remove-unit($number) {
4
4
  $unit: unit($number);
@@ -11,8 +11,17 @@ $base-font: 16px !default;
11
11
  @return $number / $one;
12
12
  }
13
13
 
14
- @function em($target, $context: $base-font) {
15
- $size: remove-unit($target) / remove-unit($context);
14
+ @function convert-to-pixel($number) {
15
+ $unit: unit($number);
16
+
17
+ @if $unit == "em" { @return remove-unit($number) * $font-size-base; }
18
+ @if $unit == "px" { @return $number; }
19
+
20
+ @return 0;
21
+ }
22
+
23
+ @function em($target, $context: $font-size-base) {
24
+ $size: remove-unit($target) / remove-unit(convert-to-pixel($context));
16
25
 
17
- @return #{$size}em;
26
+ @return $size * 1em;
18
27
  }
@@ -1,46 +1,68 @@
1
- @mixin lucida-grande {
2
- font-family: "Lucida Grande", "Lucida Sans Unicode", "Lucida Sans", Geneva, Verdana, sans-serif;
1
+ $lucida-grande: "Lucida Grande", "Lucida Sans Unicode", "Lucida Sans", Geneva, Verdana, sans-serif;
2
+ $myriad-pro: "Myriad Pro", "Gill Sans", "Gill Sans MT", Calibri, sans-serif;
3
+ $georgia: Georgia, Times, "Times New Roman", serif;
4
+ $pt-serif: "PT Serif", Georgia, Times, "Times New Roman", serif;
5
+ $helvetica: "Helvetica Neue", "HelveticaNeue", sans-serif;
6
+ $helvetica-neue: "Helvetica Neue", "HelveticaNeue", sans-serif;
7
+ $alegreya: Alegreya, Cambria, Georgia, serif;
8
+ $monospace: Menlo, Monaco, "Bitstream Vera Sans Mono", Consolas, Courier, monospace;
9
+ $verdana: Verdana, Geneva, sans-serif;
10
+ $minion-pro: minion-pro, Georgia, serif;
11
+ $bariol: bariol, "arial rounded", sans-serif;
12
+ $bariol-bold: "Bariol Bold", "Arial Rounded MT Bold", sans-serif;
13
+ $bariol-light: "Bariol Light", "Arial Rounded MT Light", sans-serif;
14
+
15
+ %lucida-grande {
16
+ font-family: $lucida-grande;
17
+ }
18
+
19
+ %myriad-pro {
20
+ font-family: $myriad-pro;
21
+ }
22
+
23
+ %georgia {
24
+ font-family: $georgia;
3
25
  }
4
26
 
5
- @mixin myriad-pro {
6
- font-family: "Myriad Pro", "Gill Sans", "Gill Sans MT", Calibri, sans-serif;
27
+ %pt-serif {
28
+ font-family: $pt-serif;
7
29
  }
8
30
 
9
- @mixin georgia {
10
- font-family: Georgia, Times, "Times New Roman", serif;
31
+ %helvetica {
32
+ font-family: $helvetica;
11
33
  }
12
34
 
13
- @mixin helvetica-neue {
14
- font-family: "Helvetica Neue", "HelveticaNeue", sans-serif;
35
+ %helvetica-neue {
36
+ font-family: $helvetica-neue;
15
37
  }
16
38
 
17
- @mixin alegreya {
18
- font-family: Alegreya, Cambria, Georgia, serif;
39
+ %alegreya {
40
+ font-family: $alegreya;
19
41
  }
20
42
 
21
- @mixin monospace {
22
- font-family: Menlo, Monaco, "Bitstream Vera Sans Mono", Consolas, Courier, monospace;
43
+ %monospace {
44
+ font-family: $monospace;
23
45
  }
24
46
 
25
- @mixin verdana {
26
- font-family: Verdana, Geneva, sans-serif;
47
+ %verdana {
48
+ font-family: $verdana;
27
49
  }
28
50
 
29
- @mixin minion-pro {
30
- font-family: minion-pro, Georgia, serif;
51
+ %minion-pro {
52
+ font-family: $minion-pro;
31
53
  }
32
54
 
33
- @mixin bariol {
34
- font-family: bariol, "arial rounded", sans-serif;
55
+ %bariol {
56
+ font-family: $bariol;
35
57
  font-weight: normal;
36
58
  }
37
59
 
38
- @mixin bariol-bold {
39
- font-family: "Bariol Bold", "Arial Rounded MT Bold", sans-serif;
60
+ %bariol-bold {
61
+ font-family: $bariol-bold;
40
62
  font-weight: normal;
41
63
  }
42
64
 
43
- @mixin bariol-light {
44
- font-family: "Bariol Light", "Arial Rounded MT Light", sans-serif;
65
+ %bariol-light {
66
+ font-family: $bariol-light;
45
67
  font-weight: normal;
46
68
  }
@@ -1,21 +1,35 @@
1
- $column: 54px !default;
2
- $gutter: 30px !default;
1
+ $grid-style: flex !default;
2
+ $grid-column-width: 54px !default;
3
+ $grid-gutter: 30px !default;
3
4
  $grid-columns: 12 !default;
4
- $max-width: em($column * $grid-columns + ($grid-columns - 1) * $gutter) !default;
5
+ $grid-max-width: $grid-column-width * $grid-columns + ($grid-columns - 1) * $grid-gutter !default;
5
6
 
6
- @mixin shift-columns($columns, $font-size: $base-font) {
7
- margin-left: em($columns * $column + $columns * $gutter, $font-size);
7
+ @function grid-width($columns, $last-column, $font-size) {
8
+ $width: $columns * $grid-column-width + $columns * $grid-gutter;
9
+
10
+ @if $last-column == true {
11
+ $width: $width - $grid-gutter;
12
+ }
13
+
14
+ @return grid-size($width, $font-size);
8
15
  }
9
16
 
10
- @mixin span-columns($columns, $font-size: $base-font) {
11
- @include columns($columns, $font-size);
12
- margin-right: em($gutter, $font-size);
17
+ @function grid-size($size, $font-size) {
18
+ @if $grid-style == flex {
19
+ @return $size / $grid-max-width * 100%;
20
+ } @else {
21
+ @return em($size, $font-size);
22
+ }
13
23
  }
14
24
 
15
- @mixin columns($columns, $font-size: $base-font) {
16
- width: em(($columns * $column) + (($columns - 1) * $gutter), $font-size);
25
+ @mixin columns($how-many, $last-column: false, $font-size: $font-size-base) {
26
+ width: grid-width($how-many, true, $font-size);
27
+
28
+ @if $last-column == false {
29
+ margin-right: grid-size($grid-gutter, $font-size);
30
+ }
17
31
  }
18
32
 
19
- @mixin all-columns($font-size: $base-font) {
20
- @include columns($grid-columns, $font-size);
33
+ @mixin shift-columns($how-many, $font-size: $font-size-base) {
34
+ margin-left: grid-width($how-many, false, $font-size);
21
35
  }
@@ -0,0 +1,32 @@
1
+ @function assign-inputs($inputs, $pseudo: false) {
2
+ $list: ();
3
+
4
+ @each $input in $inputs {
5
+ $input: unquote($input);
6
+ $input: if($pseudo, $input + ":" + $pseudo, $input);
7
+ $list: append($list, $input, comma);
8
+ }
9
+
10
+ @return $list;
11
+ }
12
+
13
+ $text-inputs-list: 'input[type="color"]',
14
+ 'input[type="date"]',
15
+ 'input[type="datetime"]',
16
+ 'input[type="datetime-local"]',
17
+ 'input[type="email"]',
18
+ 'input[type="month"]',
19
+ 'input[type="number"]',
20
+ 'input[type="password"]',
21
+ 'input[type="search"]',
22
+ 'input[type="tel"]',
23
+ 'input[type="text"]',
24
+ 'input[type="time"]',
25
+ 'input[type="url"]',
26
+ 'input[type="week"]',
27
+ 'textarea';
28
+
29
+ $all-text-inputs: assign-inputs($text-inputs-list);
30
+ $all-text-inputs-active: assign-inputs($text-inputs-list, 'active');
31
+ $all-text-inputs-focus: assign-inputs($text-inputs-list, 'focus');
32
+ $all-text-inputs-hover: assign-inputs($text-inputs-list, 'hover');
@@ -1,4 +1,4 @@
1
- $mute-color: #777 !default;
1
+ $mute-color: #666 !default;
2
2
 
3
3
  %mute {
4
4
  color: $mute-color;
@@ -0,0 +1,3 @@
1
+ %outline {
2
+ outline: 1px dotted;
3
+ }
@@ -0,0 +1,9 @@
1
+ %before:before {
2
+ @extend %inline-block;
3
+ content: '';
4
+ }
5
+
6
+ %after:after {
7
+ @extend %inline-block;
8
+ content: '';
9
+ }
@@ -1,4 +1,4 @@
1
1
  %reset-box {
2
- @extend %no-margin;
3
- @extend %no-padding;
2
+ margin: 0;
3
+ padding: 0;
4
4
  }
@@ -1,3 +1,3 @@
1
- %reset-last-child > *:last-child {
1
+ %reset-last-child > :last-child {
2
2
  margin-bottom: 0;
3
3
  }
@@ -0,0 +1,6 @@
1
+ %select {
2
+ -webkit-appeareance: none;
3
+ -moz-appeareance: none;
4
+ background: transparent;
5
+ border: none;
6
+ }
@@ -1,3 +1,3 @@
1
1
  module Sassquatch
2
- VERSION = "0.0.4"
2
+ VERSION = "0.0.5"
3
3
  end
@@ -14,4 +14,5 @@ Gem::Specification.new do |gem|
14
14
  gem.version = Sassquatch::VERSION
15
15
 
16
16
  gem.add_dependency "thor"
17
+ gem.add_development_dependency "rake"
17
18
  end
metadata CHANGED
@@ -1,27 +1,41 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: sassquatch
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.4
4
+ version: 0.0.5
5
5
  platform: ruby
6
6
  authors:
7
7
  - Nando Vieira
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2013-09-19 00:00:00.000000000 Z
11
+ date: 2015-12-14 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: thor
15
15
  requirement: !ruby/object:Gem::Requirement
16
16
  requirements:
17
- - - '>='
17
+ - - ">="
18
18
  - !ruby/object:Gem::Version
19
19
  version: '0'
20
20
  type: :runtime
21
21
  prerelease: false
22
22
  version_requirements: !ruby/object:Gem::Requirement
23
23
  requirements:
24
- - - '>='
24
+ - - ">="
25
+ - !ruby/object:Gem::Version
26
+ version: '0'
27
+ - !ruby/object:Gem::Dependency
28
+ name: rake
29
+ requirement: !ruby/object:Gem::Requirement
30
+ requirements:
31
+ - - ">="
32
+ - !ruby/object:Gem::Version
33
+ version: '0'
34
+ type: :development
35
+ prerelease: false
36
+ version_requirements: !ruby/object:Gem::Requirement
37
+ requirements:
38
+ - - ">="
25
39
  - !ruby/object:Gem::Version
26
40
  version: '0'
27
41
  description: Some SCSS helpers
@@ -32,13 +46,15 @@ executables:
32
46
  extensions: []
33
47
  extra_rdoc_files: []
34
48
  files:
35
- - .gitignore
49
+ - ".gitignore"
36
50
  - Gemfile
37
51
  - Gemfile.lock
38
52
  - README.md
39
53
  - Rakefile
40
54
  - app/assets/stylesheets/_sassquatch.scss
55
+ - app/assets/stylesheets/sassquatch/_alignment.scss
41
56
  - app/assets/stylesheets/sassquatch/_background_image.scss
57
+ - app/assets/stylesheets/sassquatch/_background_transition.scss
42
58
  - app/assets/stylesheets/sassquatch/_centered.scss
43
59
  - app/assets/stylesheets/sassquatch/_clearfix.scss
44
60
  - app/assets/stylesheets/sassquatch/_display.scss
@@ -51,16 +67,20 @@ files:
51
67
  - app/assets/stylesheets/sassquatch/_grid.scss
52
68
  - app/assets/stylesheets/sassquatch/_hardware_accel.scss
53
69
  - app/assets/stylesheets/sassquatch/_image_replace.scss
70
+ - app/assets/stylesheets/sassquatch/_inputs.scss
54
71
  - app/assets/stylesheets/sassquatch/_links.scss
55
72
  - app/assets/stylesheets/sassquatch/_mute.scss
56
73
  - app/assets/stylesheets/sassquatch/_no_border.scss
57
74
  - app/assets/stylesheets/sassquatch/_no_list_style.scss
58
75
  - app/assets/stylesheets/sassquatch/_no_margin.scss
59
76
  - app/assets/stylesheets/sassquatch/_no_padding.scss
77
+ - app/assets/stylesheets/sassquatch/_outline.scss
60
78
  - app/assets/stylesheets/sassquatch/_position.scss
79
+ - app/assets/stylesheets/sassquatch/_pseudo.scss
61
80
  - app/assets/stylesheets/sassquatch/_rails.scss
62
81
  - app/assets/stylesheets/sassquatch/_reset_box.scss
63
82
  - app/assets/stylesheets/sassquatch/_reset_last_child.scss
83
+ - app/assets/stylesheets/sassquatch/_select.scss
64
84
  - app/assets/stylesheets/sassquatch/_variables.scss
65
85
  - bin/sassquatch
66
86
  - lib/sassquatch.rb
@@ -78,17 +98,17 @@ require_paths:
78
98
  - lib
79
99
  required_ruby_version: !ruby/object:Gem::Requirement
80
100
  requirements:
81
- - - '>='
101
+ - - ">="
82
102
  - !ruby/object:Gem::Version
83
103
  version: '0'
84
104
  required_rubygems_version: !ruby/object:Gem::Requirement
85
105
  requirements:
86
- - - '>='
106
+ - - ">="
87
107
  - !ruby/object:Gem::Version
88
108
  version: '0'
89
109
  requirements: []
90
110
  rubyforge_project:
91
- rubygems_version: 2.1.0
111
+ rubygems_version: 2.5.0
92
112
  signing_key:
93
113
  specification_version: 4
94
114
  summary: Some SCSS helpers