ezy 0.1.0 → 0.1.1

Sign up to get free protection for your applications and to get access to all the features.
@@ -0,0 +1,7 @@
1
+ ---
2
+ SHA1:
3
+ metadata.gz: c356c1caf87fa968c18eba1c4debaa02fb79fbf6
4
+ data.tar.gz: 959c46bdca6bb477dbd11d1a1b5e305ef4bfb1a8
5
+ SHA512:
6
+ metadata.gz: 707af3feea4008b898da3f1eb310f0d0bccaa55f0274d11c24ace8111bd3afca55fa8abe5e782a4e1ccd69f3b09d98b38f14e2551ebae86237082156502ca24c
7
+ data.tar.gz: ca508a57002f5b0aa204ebb5f5d4a4074086cfcd724fea664b77741ab89207114ecce8f8f8f5a7eee939bc5941fc941e5cd1ebac3f0037bf3a09a1d41841f57e
data/README.md CHANGED
@@ -3,6 +3,9 @@ Ezy: The developer's toolbox for responsive websites
3
3
 
4
4
  My attempt to create a collection of simple-to-use grid helpers and other tools with SCSS and Ruby
5
5
 
6
+ > NOTE: Ezy is now in beta, with only sprites out-of-the-box.
7
+ > Stand by for release of the grid.
8
+
6
9
  Installing Ezy
7
10
  --------------
8
11
 
@@ -16,11 +19,7 @@ Installing Ezy
16
19
 
17
20
  #### 3) Import the part you need in your SCSS
18
21
 
19
- Import all features:
20
-
21
- `@import "ezy";`
22
-
23
- Import sprites only:
22
+ Import sprites: (only option ATM)
24
23
 
25
24
  `@import "ezy/sprites";`
26
25
 
@@ -2,7 +2,7 @@
2
2
 
3
3
  Gem::Specification.new do |s|
4
4
  # Release Specific Information
5
- s.version = "0.1.0"
5
+ s.version = "0.1.1"
6
6
  s.date = "2013-11-13"
7
7
 
8
8
  # Gem Details
@@ -19,7 +19,9 @@ Gem::Specification.new do |s|
19
19
  s.files += %w(ezy.gemspec)
20
20
  s.files += %w(VERSION)
21
21
  s.files += Dir.glob("lib/**/*.*")
22
- s.files += Dir.glob("sass/**/*.*")
22
+ # s.files += Dir.glob("sass/**/*.*")
23
+ s.files += Dir.glob("sass/_ezy.scss")
24
+ s.files += Dir.glob("sass/ezy/_sprites.scss")
23
25
  s.files += Dir.glob("templates/**/*.*")
24
26
  s.files += Dir.glob("test/config.rb")
25
27
  s.files += Dir.glob("test/css/**/*.*")
@@ -31,4 +33,4 @@ Gem::Specification.new do |s|
31
33
  s.rubygems_version = %q{1.3.6}
32
34
  s.add_dependency(%q<compass>, [">= 0.12.2"])
33
35
  s.add_dependency(%q<sass>, [">= 3.2.0"])
34
- end
36
+ end
metadata CHANGED
@@ -1,72 +1,55 @@
1
- --- !ruby/object:Gem::Specification
1
+ --- !ruby/object:Gem::Specification
2
2
  name: ezy
3
- version: !ruby/object:Gem::Version
4
- hash: 27
5
- prerelease:
6
- segments:
7
- - 0
8
- - 1
9
- - 0
10
- version: 0.1.0
3
+ version: !ruby/object:Gem::Version
4
+ version: 0.1.1
11
5
  platform: ruby
12
- authors:
6
+ authors:
13
7
  - Frej Raahede Nielsen
14
8
  autorequire:
15
9
  bindir: bin
16
10
  cert_chain: []
17
-
18
- date: 2013-11-13 00:00:00 Z
19
- dependencies:
20
- - !ruby/object:Gem::Dependency
11
+ date: 2013-11-13 00:00:00.000000000 Z
12
+ dependencies:
13
+ - !ruby/object:Gem::Dependency
21
14
  name: compass
22
- prerelease: false
23
- requirement: &id001 !ruby/object:Gem::Requirement
24
- none: false
25
- requirements:
26
- - - ">="
27
- - !ruby/object:Gem::Version
28
- hash: 43
29
- segments:
30
- - 0
31
- - 12
32
- - 2
15
+ requirement: !ruby/object:Gem::Requirement
16
+ requirements:
17
+ - - '>='
18
+ - !ruby/object:Gem::Version
33
19
  version: 0.12.2
34
20
  type: :runtime
35
- version_requirements: *id001
36
- - !ruby/object:Gem::Dependency
37
- name: sass
38
21
  prerelease: false
39
- requirement: &id002 !ruby/object:Gem::Requirement
40
- none: false
41
- requirements:
42
- - - ">="
43
- - !ruby/object:Gem::Version
44
- hash: 15
45
- segments:
46
- - 3
47
- - 2
48
- - 0
22
+ version_requirements: !ruby/object:Gem::Requirement
23
+ requirements:
24
+ - - '>='
25
+ - !ruby/object:Gem::Version
26
+ version: 0.12.2
27
+ - !ruby/object:Gem::Dependency
28
+ name: sass
29
+ requirement: !ruby/object:Gem::Requirement
30
+ requirements:
31
+ - - '>='
32
+ - !ruby/object:Gem::Version
49
33
  version: 3.2.0
50
34
  type: :runtime
51
- version_requirements: *id002
52
- description: A collection of SCSS tools for creating responsive websites. Includes a simple but powerful grid framework, media query helpers and sprite helpers.
35
+ prerelease: false
36
+ version_requirements: !ruby/object:Gem::Requirement
37
+ requirements:
38
+ - - '>='
39
+ - !ruby/object:Gem::Version
40
+ version: 3.2.0
41
+ description: A collection of SCSS tools for creating responsive websites. Includes
42
+ a simple but powerful grid framework, media query helpers and sprite helpers.
53
43
  email: frejraahede@gmail.com
54
44
  executables: []
55
-
56
45
  extensions: []
57
-
58
46
  extra_rdoc_files: []
59
-
60
- files:
47
+ files:
61
48
  - README.md
62
49
  - ezy.gemspec
63
50
  - VERSION
64
51
  - lib/ezy.rb
65
52
  - sass/_ezy.scss
66
- - sass/ezy/_clearfix.scss
67
- - sass/ezy/_functions.scss
68
- - sass/ezy/_grid.scss
69
- - sass/ezy/_media.scss
70
53
  - sass/ezy/_sprites.scss
71
54
  - templates/project/_settings.scss
72
55
  - templates/project/index.html
@@ -143,37 +126,27 @@ files:
143
126
  - test/img/test-spacing@2x/classic.png
144
127
  - test/img/test-spacing@2x/indy.png
145
128
  homepage: http://github.com/raahede/
146
- licenses:
129
+ licenses:
147
130
  - MIT
131
+ metadata: {}
148
132
  post_install_message:
149
133
  rdoc_options: []
150
-
151
- require_paths:
134
+ require_paths:
152
135
  - lib
153
- required_ruby_version: !ruby/object:Gem::Requirement
154
- none: false
155
- requirements:
156
- - - ">="
157
- - !ruby/object:Gem::Version
158
- hash: 3
159
- segments:
160
- - 0
161
- version: "0"
162
- required_rubygems_version: !ruby/object:Gem::Requirement
163
- none: false
164
- requirements:
165
- - - ">="
166
- - !ruby/object:Gem::Version
167
- hash: 3
168
- segments:
169
- - 0
170
- version: "0"
136
+ required_ruby_version: !ruby/object:Gem::Requirement
137
+ requirements:
138
+ - - '>='
139
+ - !ruby/object:Gem::Version
140
+ version: '0'
141
+ required_rubygems_version: !ruby/object:Gem::Requirement
142
+ requirements:
143
+ - - '>='
144
+ - !ruby/object:Gem::Version
145
+ version: '0'
171
146
  requirements: []
172
-
173
147
  rubyforge_project:
174
- rubygems_version: 1.8.25
148
+ rubygems_version: 2.1.10
175
149
  signing_key:
176
- specification_version: 3
150
+ specification_version: 4
177
151
  summary: The developer's toolbox for responsive websites
178
152
  test_files: []
179
-
@@ -1,25 +0,0 @@
1
- /* -------------------------------------------------------------------- *
2
- * Micro Clearfix
3
- * http://nicolasgallagher.com/micro-clearfix-hack/
4
- */
5
-
6
- %clearfix:before,
7
- %clearfix:after {
8
- content: " ";
9
- display: table;
10
- }
11
-
12
- %clearfix:after {
13
- clear: both;
14
- }
15
-
16
-
17
- %clearfix {
18
- /**
19
- * For IE 6/7 only
20
- * Include this rule to trigger hasLayout and contain floats.
21
- */
22
- *zoom: 1;
23
- }
24
-
25
- /* -------------------------------------------------------------------- */
@@ -1,11 +0,0 @@
1
-
2
- // ---------------------------------------------------------------------------
3
- // @function percentage-round
4
- //
5
- // Similar to the SASS percentage() function, but rounds down to 2 decimals
6
- // $columns : Fraction to convert to percentage
7
- // @return : Percentage value rounded down to 2 decimals
8
-
9
- @function percentage-round( $value ) {
10
- @return floor( percentage( $value ) * 100 ) / 100;
11
- }
@@ -1,279 +0,0 @@
1
- // ---------------------------------------------------------------------------
2
- // Importing dependencies
3
-
4
- @import "functions";
5
- @import "clearfix";
6
-
7
- // ---------------------------------------------------------------------------
8
- // Mandatory grid settings
9
- // Defaults: can be overridden
10
-
11
- $column-width: 4em !default;
12
- $gutter-width: 1em !default;
13
- $default-gutter-property: "margin" !default;
14
- $total-columns: 12 !default;
15
- $is-fluid: true !default;
16
-
17
- // ---------------------------------------------------------------------------
18
- // Variables used in grid context
19
-
20
- $grid-init: false;
21
- $context-warn: "You must set $context if $is-fluid is set to true.";
22
- $init-gutter-property: $default-gutter-property;
23
-
24
- // ---------------------------------------------------------------------------
25
- // @function layout-width
26
- //
27
- // Returns width based on given number of culumns
28
- // $columns : Number of columns to calculate width from
29
- // @return : Width in the same unit as $column-width and $gutter-width
30
-
31
- @function layout-width( $columns ) {
32
- @if comparable( $column-width, $gutter-width ) {
33
- @return $columns * ( $column-width + $gutter-width ) - $gutter-width;
34
- } @else {
35
- @warn "$column-width and $gutter-width must have the same unit set. #{ unit($column-width) }'s and #{ unit($gutter-width) }'s are not comparable.";
36
- }
37
- }
38
-
39
- // ---------------------------------------------------------------------------
40
- // @function context-width
41
- //
42
- // Returns width based on given number of culumns, plus an extra gutter
43
- // Used for % calculations in the grid
44
- // $columns : Number of columns to calculate width from
45
- // @return : Width in the same unit as $column-width and $gutter-width
46
-
47
- @function context-width( $columns ) {
48
- @return layout-width( $columns ) + $gutter-width;
49
- }
50
-
51
- // ---------------------------------------------------------------------------
52
- // @function span-column-width
53
- //
54
- // Same as layout-width( $columns ), but renamed for better context awareness
55
-
56
- @function span-column-width( $columns ) {
57
- @return layout-width( $columns );
58
- }
59
-
60
- // ---------------------------------------------------------------------------
61
- // @function gutter
62
- //
63
- // Returns gutter in the same unit as $gutter-width if grid is static
64
- // Returns gutter as a percentage of the context if grid is fluid
65
- // $context : Number of columns in the current context.
66
- // : If set to false, the returned value is as in static grid
67
- // @return : Width as $gutter-width or as a percentage of the context
68
-
69
- @function gutter(
70
- $context: false
71
- ) {
72
- @if $is-fluid and $context {
73
- @return ( percentage-round( ( $gutter-width / 2 ) / context-width( $context ) ) );
74
- } @else if $is-fluid {
75
- @warn $context-warn;
76
- } @else {
77
- @return $gutter-width / 2;
78
- }
79
- }
80
-
81
- // ---------------------------------------------------------------------------
82
- // @mixin gutters
83
- //
84
- // Sets gutters using the gutter( $context ) function
85
- // $context : Number of columns in the current context.
86
- // : Only mandatory if grid is fluid
87
- // $gutter-property : Set to "margin" or "padding"
88
-
89
- @mixin gutters(
90
- $context: false,
91
- $property: false
92
- ) {
93
- @if (not $property) {
94
- $property: $default-gutter-property;
95
- }
96
- @if $property == "margin" or $property == "padding" {
97
- float: left;
98
- #{ $property }: {
99
- left: gutter( $context );
100
- right: gutter( $context );
101
- }
102
- } @else {
103
- @warn "$gutter-property must be set to either 'margin' or 'padding'";
104
- }
105
- }
106
-
107
- // ---------------------------------------------------------------------------
108
- // Grid master placeholder selector
109
- // Adds cleafix and centers page in browser
110
-
111
- %ezy-master {
112
- @extend %clearfix;
113
- margin: {
114
- left: auto;
115
- right: auto;
116
- }
117
- }
118
-
119
- // ---------------------------------------------------------------------------
120
- // @mixin master
121
- //
122
- // Sets width on page. If the grid is fluid, it's set as a max-width
123
- // Extends the grid master placeholder selector
124
- // $context : Number of columns in the current context.
125
-
126
- @mixin master(
127
- $context
128
- ) {
129
- @if $is-fluid {
130
- max-width: layout-width( $context );
131
- } @else {
132
- width: layout-width( $context );
133
- }
134
- @extend %ezy-master;
135
- }
136
-
137
- // ---------------------------------------------------------------------------
138
- // Grid container placeholder selector
139
- // Adds cleafix
140
-
141
- %ezy-container {
142
- @extend %clearfix;
143
- }
144
-
145
- // ---------------------------------------------------------------------------
146
- // @mixin container
147
- //
148
- // Sets width on page. If the grid is fluid, it's set as a max-width
149
- // Extends the grid master placeholder selector
150
- // $context : Number of columns in the current context
151
- // : Only mandatory if grid is fluid
152
- // $at-breakpoint : Set to true if mixin is called within a media query
153
- // : Avoids SASS compillation errors from extending within
154
- // : a media query
155
-
156
- @mixin container(
157
- $context: false,
158
- $at-breakpoint: false
159
- ) {
160
- $pullout: -( $gutter-width )/2;
161
- @if $is-fluid and $context {
162
- $pullout: -( percentage-round( $gutter-width / layout-width( $context ) ) )/2;
163
- } @else if $is-fluid {
164
- @warn $context-warn;
165
- }
166
- margin: {
167
- left: $pullout;
168
- right: $pullout;
169
- }
170
- @if (not $at-breakpoint) {
171
- @extend %ezy-container;
172
- }
173
- }
174
-
175
- // ---------------------------------------------------------------------------
176
- // @mixin grid-init
177
- //
178
- // Prints out placeholder selectors used with columns. Helps reduce the CSS output.
179
- //
180
- // Should be called after setting grid variables:
181
- // ----------------
182
- // $column-width
183
- // $gutter-width
184
- // $gutter-property
185
- // $total-columns
186
- // ----------------
187
-
188
- @mixin grid-init() {
189
- $grid-init: true;
190
- $init-gutter-property: $default-gutter-property;
191
- @if $is-fluid {
192
- @for $i from 1 through $total-columns {
193
- %ezy-column-#{ $i } {
194
- @include gutters( $i );
195
- }
196
- }
197
- } @else {
198
- %ezy-column {
199
- @include gutters;
200
- }
201
- }
202
- }
203
-
204
- // ---------------------------------------------------------------------------
205
- // @mixin span-columns
206
- //
207
- // Sets width and gutter on columns
208
- // Uses @extend for gutters outside media queries if grid-init() has been called
209
- // $columns : Number of columns to span
210
- // $context : Number of columns in the current context
211
- // : Only mandatory if grid is fluid
212
- // $at-breakpoint : Set to true if mixin is called within a media query
213
- // : Avoids SASS compillation errors from extending within
214
- // : a media query
215
- // $gutter-property : Overrides the global $gutter-property
216
-
217
- @mixin span-columns(
218
- $columns,
219
- $context: false,
220
- $at-breakpoint: false,
221
- $gutter-property: false
222
- ) {
223
- $width: span-column-width( $columns );
224
- @if $is-fluid and $context {
225
- /* Spanning #{ $columns } of #{ $context } columns */
226
- $context-width: context-width( $context );
227
- $pct-width: percentage-round( $width / $context-width );
228
- width: $pct-width;
229
- } @else {
230
- /* Spanning #{ $columns } columns */
231
- width: $width;
232
- }
233
-
234
- @if $gutter-property and $gutter-property != $default-gutter-property {
235
-
236
- @if $is-fluid and $context {
237
- @include gutters( $context, $gutter-property );
238
-
239
- } @else if ( not $is-fluid ) {
240
- @include gutters( $property: $gutter-property );
241
-
242
- } @else if $is-fluid and ( not $context ) {
243
- @warn $context-warn;
244
- }
245
-
246
- } @else if $is-fluid and $context {
247
-
248
- @if $at-breakpoint or $init-gutter-property != $default-gutter-property {
249
- @include gutters( $context );
250
-
251
- } @else if ( $total-columns < $context ) {
252
- @include gutters( $context );
253
- @warn "Please check if $total-columns is set. $total-columns should be the highest number of columns occuring in your layout. This error will not break your layout, but will increase the CSS output.";
254
-
255
- } @else if ( not $grid-init ) {
256
- @include gutters( $context );
257
- @warn "Include grid-init() after setting $total-columns for cleaner CSS output.";
258
-
259
- } @else {
260
- @extend %ezy-column-#{ $context };
261
- }
262
-
263
-
264
- } @else if $is-fluid { // $context not set
265
-
266
- @warn $context-warn;
267
-
268
- } @else if $grid-init and $init-gutter-property == $default-gutter-property { // Grid is static
269
- @extend %ezy-column;
270
-
271
- } @else {
272
- @include gutters( $context );
273
-
274
- @if (not $grid-init) {
275
- @warn "Include grid-init() after setting $gutter-width for cleaner CSS output.";
276
- }
277
- }
278
- }
279
-
@@ -1,48 +0,0 @@
1
-
2
- $legacy-selector: ".no-media-queries" !default;
3
-
4
- @function set-breakpoint(
5
- $min: false,
6
- $max: false,
7
- $custom: false,
8
- $legacy-support: false
9
- ) {
10
-
11
- @if (not $min) and (not $max) and (not $custom) {
12
- @warn "Either $min, $max, or $custom must be defined for set-breakpoint to work.";
13
- }
14
-
15
- @if $min and $max {
16
- // Both $min and $max
17
- @return "(min-width: #{ $min }) and (max-width: #{ $max })", $legacy-support;
18
- } @else {
19
- @if $min and (not $max) {
20
- // Min only:
21
- @return "(min-width: #{ $min })", $legacy-support;
22
- }
23
- @if $max and (not $min) {
24
- // Max only:
25
- @return "(max-width: #{ $max })", $legacy-support;
26
- } @else {
27
- // Custom:
28
- @return $custom, $legacy-support;
29
- }
30
- }
31
- }
32
-
33
- @mixin at-breakpoint(
34
- $breakpoint,
35
- $legacy-support: false
36
- ) {
37
- @media #{ nth( $breakpoint, 1 ) } {
38
- @content;
39
- }
40
- @if $legacy-support or nth( $breakpoint, 2 ) {
41
- #{ $legacy-selector } & {
42
- /* Fallback for browsers not supporting media queries */
43
- @content;
44
- }
45
- }
46
- }
47
-
48
-