stitch 0.0.3 → 0.1.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (47) hide show
  1. data/Gemfile.lock +25 -0
  2. data/README.md +14 -58
  3. data/Rakefile +1 -2
  4. data/lib/stitch/version.rb +1 -1
  5. data/stitch.gemspec +3 -0
  6. data/stylesheets/stitch/_patterns.scss +3 -0
  7. data/stylesheets/stitch/_reset.scss +315 -0
  8. data/stylesheets/stitch/_utilities.scss +41 -0
  9. data/stylesheets/stitch/patterns/_animation.scss +2 -0
  10. data/stylesheets/stitch/{helpers → patterns}/_css3.scss +104 -32
  11. data/stylesheets/stitch/patterns/_layout.scss +3 -1
  12. data/stylesheets/stitch/patterns/_text.scss +5 -1
  13. data/stylesheets/stitch/patterns/accessibility/_hide-content.scss +2 -2
  14. data/stylesheets/stitch/patterns/animation/_hardware-acceleration.scss +6 -0
  15. data/stylesheets/stitch/patterns/animation/_timing-functions.scss +60 -0
  16. data/stylesheets/stitch/patterns/forms/_search-fields.scss +1 -1
  17. data/stylesheets/stitch/patterns/images/_image-replace.scss +5 -4
  18. data/stylesheets/stitch/patterns/layout/_center.scss +3 -3
  19. data/stylesheets/stitch/patterns/layout/_clear-floats.scss +12 -18
  20. data/stylesheets/stitch/patterns/layout/_columns.scss +10 -0
  21. data/stylesheets/stitch/patterns/layout/_force-scrollbars.scss +1 -1
  22. data/stylesheets/stitch/patterns/layout/_media.scss +6 -5
  23. data/stylesheets/stitch/patterns/layout/_simple-gradient.scss +11 -0
  24. data/stylesheets/stitch/patterns/legacy/_inline-block.scss +10 -10
  25. data/stylesheets/stitch/patterns/text/.sass-cache/920421d458a84b7a73054dd233bdbe8adead02f9/_rem.scssc +0 -0
  26. data/stylesheets/stitch/patterns/text/_font-stacks.scss +15 -0
  27. data/stylesheets/stitch/patterns/text/_hyphens.scss +7 -0
  28. data/stylesheets/stitch/patterns/text/_justify.scss +4 -0
  29. data/stylesheets/stitch/patterns/text/_rem.scss +3 -0
  30. metadata +34 -25
  31. data/stylesheets/stitch/_helpers.scss +0 -1
  32. data/stylesheets/stitch/reset/_desktop.scss +0 -243
  33. data/templates/project/layouts/desktop/_copy.scss +0 -140
  34. data/templates/project/layouts/desktop/_forms.scss +0 -3
  35. data/templates/project/layouts/desktop/_functions.scss +0 -3
  36. data/templates/project/layouts/desktop/_global.scss +0 -52
  37. data/templates/project/layouts/desktop/_layout.scss +0 -4
  38. data/templates/project/layouts/desktop/_modules.scss +0 -4
  39. data/templates/project/layouts/desktop/master.scss +0 -18
  40. data/templates/project/layouts/mobile/_global.scss +0 -3
  41. data/templates/project/layouts/mobile/master.scss +0 -2
  42. data/templates/project/layouts/print/_global.scss +0 -6
  43. data/templates/project/layouts/print/_layout.scss +0 -0
  44. data/templates/project/layouts/print/master.scss +0 -2
  45. data/templates/project/legacy.scss +0 -4
  46. data/templates/project/manifest.rb +0 -31
  47. data/templates/project/master.scss +0 -8
@@ -0,0 +1,41 @@
1
+ /* Prefix properties and values
2
+ ---------------------------------------- */
3
+
4
+ $default-prefixes: -webkit, -moz, -o, -khtml, -ms;
5
+
6
+ @mixin prefix($property, $value, $prefixes: $default-prefixes) {
7
+
8
+ // Unquote the values
9
+ $property : unquote($property);
10
+ $value : unquote($value);
11
+
12
+ // Loop through the prefixes given
13
+ @each $prefix in $prefixes {
14
+ #{$prefix}-#{$property}:$value;
15
+ }
16
+ }
17
+
18
+ @mixin prefix-value($property, $value, $prefixes: $default-prefixes) {
19
+
20
+ // Unquote the values
21
+ $property : unquote($property);
22
+ $value : unquote($value);
23
+
24
+ // Loop through the prefixes given
25
+ @each $prefix in $prefixes {
26
+ #{$property}:#{$prefix}-#{$value};
27
+ }
28
+ }
29
+
30
+ /**
31
+ * Allows you to import a file only once
32
+ * @param $name string File to import
33
+ */
34
+ $imported-once-files: ();
35
+ @function import-once($name) {
36
+ @if index($imported-once-files, $name) {
37
+ @return false;
38
+ }
39
+ $imported-once-files: append($imported-once-files, $name);
40
+ @return true;
41
+ }
@@ -0,0 +1,2 @@
1
+ @import 'animation/hardware-acceleration';
2
+ @import 'animation/timing-functions';
@@ -1,33 +1,3 @@
1
- /* Prefixing
2
- ---------------------------------------- */
3
-
4
- $default-prefixes: -webkit, -moz, -o, -khtml, -ms;
5
-
6
- @mixin prefix($property, $value, $prefixes: $default-prefixes) {
7
-
8
- // Unquote the values
9
- $property : unquote($property);
10
- $value : unquote($value);
11
-
12
- // Loop through the prefixes given
13
- @each $prefix in $prefixes {
14
- #{$prefix}-#{$property}:$value;
15
- }
16
- }
17
-
18
- @mixin prefix-value($property, $value, $prefixes: $default-prefixes) {
19
-
20
- // Unquote the values
21
- $property : unquote($property);
22
- $value : unquote($value);
23
-
24
- // Loop through the prefixes given
25
- @each $prefix in $prefixes {
26
- #{$property}:#{$prefix}-#{$value};
27
- }
28
- }
29
-
30
-
31
1
  /* Appearance
32
2
  ---------------------------------------- */
33
3
 
@@ -44,6 +14,21 @@ $default-prefixes-appearance: -webkit, -moz;
44
14
  $default-prefixes-background-clip: -webkit, -moz;
45
15
 
46
16
  @mixin background-clip($v, $prefixes: $default-prefixes-background-clip) {
17
+ $v: unquote($v);
18
+
19
+ /* This is for older browser support */
20
+ @if $v === padding-box {
21
+ @include prefix(background-clip,padding,$default-prefixes-background-origin);
22
+ }
23
+
24
+ @if $v === border-box {
25
+ @include prefix(background-clip,border,$default-prefixes-background-origin);
26
+ }
27
+
28
+ @if $v === content-box {
29
+ @include prefix(background-clip,content,$default-prefixes-background-origin);
30
+ }
31
+
47
32
  @include prefix(background-clip,$v,$prefixes);
48
33
  background-clip:$v;
49
34
  }
@@ -54,6 +39,22 @@ $default-prefixes-background-clip: -webkit, -moz;
54
39
  $default-prefixes-background-origin: -webkit, -moz;
55
40
 
56
41
  @mixin background-origin($v, $prefixes: $default-prefixes-background-origin) {
42
+ $v: unquote($v);
43
+
44
+ /* This is for older browser support */
45
+ @if $v === padding-box {
46
+ @include prefix(background-origin,padding,$default-prefixes-background-origin);
47
+ }
48
+
49
+ @if $v === border-box {
50
+ @include prefix(background-origin,border,$default-prefixes-background-origin);
51
+ }
52
+
53
+ @if $v === content-box {
54
+ @include prefix(background-origin,content,$default-prefixes-background-origin);
55
+ }
56
+
57
+ /* Standard version */
57
58
  @include prefix(background-origin,$v,$prefixes);
58
59
  background-origin:$v;
59
60
  }
@@ -61,7 +62,7 @@ $default-prefixes-background-origin: -webkit, -moz;
61
62
  /* Background Size
62
63
  ---------------------------------------- */
63
64
 
64
- $default-prefixes-background-size: -webkit, -moz;
65
+ $default-prefixes-background-size: -webkit, -moz, -o;
65
66
 
66
67
  @mixin background-size($v, $prefixes: $default-prefixes-background-size) {
67
68
  @include prefix(background-size,$v,$prefixes);
@@ -84,7 +85,7 @@ $default-prefixes-border-radius: -webkit, -moz;
84
85
  $default-prefixes-box-shadow: -webkit, -moz;
85
86
 
86
87
  @mixin box-shadow($v, $prefixes: $default-prefixes-box-shadow) {
87
- @include prefix(border-radius,$v,$prefixes);
88
+ @include prefix(box-shadow,$v,$prefixes);
88
89
  box-shadow:$v;
89
90
  }
90
91
 
@@ -99,34 +100,42 @@ $default-prefixes-box: -webkit, -moz;
99
100
 
100
101
  @mixin box-orient($v, $prefixes: $default-prefixes-box) {
101
102
  @include prefix(box-orient,$v,$prefixes);
103
+ box-orient:$v;
102
104
  }
103
105
 
104
106
  @mixin box-align($v, $prefixes: $default-prefixes-box) {
105
107
  @include prefix(box-align,$v,$prefixes);
108
+ box-align:$v;
106
109
  }
107
110
 
108
111
  @mixin box-flex($v, $prefixes: $default-prefixes-box) {
109
112
  @include prefix(box-flex,$v,$prefixes);
113
+ box-flex:$v;
110
114
  }
111
115
 
112
116
  @mixin box-flex-group($v, $prefixes: $default-prefixes-box) {
113
117
  @include prefix(box-flex-group,$v,$prefixes);
118
+ box-flex-group:$v;
114
119
  }
115
120
 
116
121
  @mixin box-ordinal-group($v, $prefixes: $default-prefixes-box) {
117
122
  @include prefix(box-ordinal-group,$v,$prefixes);
123
+ box-ordinal-group:$v;
118
124
  }
119
125
 
120
126
  @mixin box-direction($v, $prefixes: $default-prefixes-box) {
121
127
  @include prefix(box-direction,$v,$prefixes);
128
+ box-direction:$v;
122
129
  }
123
130
 
124
131
  @mixin box-lines($v, $prefixes: $default-prefixes-box) {
125
132
  @include prefix(box-direction,$v,$prefixes);
133
+ box-lines:$v;
126
134
  }
127
135
 
128
136
  @mixin box-pack($v, $prefixes: $default-prefixes-box) {
129
137
  @include prefix(box-direction,$v,$prefixes);
138
+ box-pack:$v;
130
139
  }
131
140
 
132
141
  /* Box Sizing
@@ -136,6 +145,7 @@ $default-prefixes-box-sizing: -webkit, -moz;
136
145
 
137
146
  @mixin box-sizing($v, $prefixes: $default-prefixes-box-sizing) {
138
147
  @include prefix(box-sizing,$v,$prefixes);
148
+ box-sizing:$v;
139
149
  }
140
150
 
141
151
  /* Columns
@@ -145,30 +155,37 @@ $default-prefixes-columns: -webkit, -moz;
145
155
 
146
156
  @mixin column-count($v, $prefixes: $default-prefixes-columns) {
147
157
  @include prefix(column-count,$v,$prefixes);
158
+ column-count:$v;
148
159
  }
149
160
 
150
161
  @mixin column-gap($v, $prefixes: $default-prefixes-columns) {
151
162
  @include prefix(column-gap,$v,$prefixes);
163
+ column-gap:$v;
152
164
  }
153
165
 
154
166
  @mixin column-width($v, $prefixes: $default-prefixes-columns) {
155
167
  @include prefix(column-width,$v,$prefixes);
168
+ column-width:$v;
156
169
  }
157
170
 
158
171
  @mixin column-rule-width($v, $prefixes: $default-prefixes-columns) {
159
172
  @include prefix(column-rule-width,$v,$prefixes);
173
+ column-rule-width:$v;
160
174
  }
161
175
 
162
176
  @mixin column-rule-style($v, $prefixes: $default-prefixes-columns) {
163
177
  @include prefix(column-rule-style,$v,$prefixes);
178
+ column-rule-style:$v;
164
179
  }
165
180
 
166
181
  @mixin column-rule-color($v, $prefixes: $default-prefixes-columns) {
167
182
  @include prefix(column-rule-color,$v,$prefixes);
183
+ column-rule-color:$v;
168
184
  }
169
185
 
170
186
  @mixin column-rule($v, $prefixes: $default-prefixes-columns) {
171
187
  @include prefix(column-rule,$v,$prefixes);
188
+ column-rule:$v;
172
189
  }
173
190
 
174
191
  /* Transforms
@@ -179,26 +196,31 @@ $default-prefixes-transform: -webkit, -moz;
179
196
  // @see http://www.w3.org/TR/css3-2d-transforms/#transform-property
180
197
  @mixin transform($v, $prefixes:$default-prefixes-transform) {
181
198
  @include prefix(transform,$v,$prefixes);
199
+ transform:$v;
182
200
  }
183
201
 
184
202
  // @see http://www.w3.org/TR/css3-2d-transforms/#transform-origin-property
185
203
  @mixin transform-origin($v, $prefixes:$default-prefixes-transform) {
186
204
  @include prefix(transform-origin,$v,$prefixes);
205
+ transform-origin:$v;
187
206
  }
188
207
 
189
208
  // @see http://www.w3.org/TR/css3-3d-transforms/#transform-style
190
209
  @mixin transform-style($v, $prefixes:$default-prefixes-transform) {
191
210
  @include prefix(transform-style,$v,$prefixes);
211
+ transform-style:$v;
192
212
  }
193
213
 
194
214
  // @see http://www.w3.org/TR/css3-3d-transforms/#perspective
195
215
  @mixin perspective-origin($v, $prefixes:$default-prefixes-transform) {
196
216
  @include prefix(perspective-origin,$v,$prefixes);
217
+ perspective-origin:$v;
197
218
  }
198
219
 
199
220
  // @see http://www.w3.org/TR/css3-3d-transforms/#backface-visibility
200
221
  @mixin backface-visibility($v, $prefixes:$default-prefixes-transform) {
201
222
  @include prefix(backface-visibility,$v,$prefixes);
223
+ backface-visibility:$v;
202
224
  }
203
225
 
204
226
  /* Transitions
@@ -212,20 +234,70 @@ $default-prefixes-transition: -webkit, -moz;
212
234
 
213
235
  @mixin transition-property($v, $prefixes:$default-prefixes-transform) {
214
236
  @include prefix(transition-property,$v,$prefixes);
237
+ transition-property:$v;
215
238
  }
216
239
 
217
240
  @mixin transition-duration($v, $prefixes:$default-prefixes-transform) {
218
241
  @include prefix(transition-duration,$v,$prefixes);
242
+ transition-duration:$v;
219
243
  }
220
244
 
221
245
  @mixin transition-timing-function($v, $prefixes:$default-prefixes-transform) {
222
246
  @include prefix(transition-timing-function,$v,$prefixes);
247
+ transition-timing-function:$v;
223
248
  }
224
249
 
225
250
  @mixin transition-delay($v, $prefixes:$default-prefixes-transform) {
226
251
  @include prefix(transition-delay,$v,$prefixes);
252
+ transition-delay:$v;
227
253
  }
228
254
 
229
255
  @mixin transition($v, $prefixes:$default-prefixes-transform) {
230
256
  @include prefix(transition,$v,$prefixes);
257
+ transition:$v;
258
+ }
259
+
260
+ /* Animation
261
+ ---------------------------------------- */
262
+
263
+ $default-prefixes-animation: -webkit, -moz;
264
+
265
+ @mixin animation($v, $prefixes:$default-prefixes-animation) {
266
+ @include prefix(animation,$v,$prefixes);
267
+ animation:$v;
268
+ }
269
+
270
+ @mixin animation-name($v, $prefixes:$default-prefixes-animation) {
271
+ @include prefix(animation-name,$v,$prefixes);
272
+ animation-name:$v;
273
+ }
274
+
275
+ @mixin animation-duration($v, $prefixes:$default-prefixes-animation) {
276
+ @include prefix(animation-name,$v,$prefixes);
277
+ animation-duration:$v;
278
+ }
279
+
280
+ @mixin animation-timing-function($v, $prefixes:$default-prefixes-animation) {
281
+ @include prefix(animation-name,$v,$prefixes);
282
+ animation-timing-function:$v;
283
+ }
284
+
285
+ @mixin animation-iteration-count($v, $prefixes:$default-prefixes-animation) {
286
+ @include prefix(animation-name,$v,$prefixes);
287
+ animation-iteration-count:$v;
288
+ }
289
+
290
+ @mixin animation-direction($v, $prefixes:$default-prefixes-animation) {
291
+ @include prefix(animation-name,$v,$prefixes);
292
+ animation-direction:$v;
293
+ }
294
+
295
+ @mixin animation-play-state($v, $prefixes:$default-prefixes-animation) {
296
+ @include prefix(animation-name,$v,$prefixes);
297
+ animation-play-state:$v;
298
+ }
299
+
300
+ @mixin animation-delay($v, $prefixes:$default-prefixes-animation) {
301
+ @include prefix(animation-name,$v,$prefixes);
302
+ animation-delay:$v;
231
303
  }
@@ -1,4 +1,6 @@
1
1
  @import 'layout/center';
2
2
  @import 'layout/clear-floats';
3
+ @import 'layout/columns';
3
4
  @import 'layout/force-scrollbars';
4
- @import 'layout/media';
5
+ @import 'layout/media';
6
+ @import 'layout/simple-gradient';
@@ -1 +1,5 @@
1
- @import 'text/text-rendering';
1
+ @import 'text/text-rendering';
2
+ @import 'text/font-stacks';
3
+ @import 'text/hyphens';
4
+ @import 'text/rem';
5
+ @import 'text/justify';
@@ -2,7 +2,7 @@
2
2
  css-discuss.incutio.com/wiki/Screenreader_Visibility */
3
3
  @mixin hide-from-all {
4
4
  display:none;
5
- visibility: hidden;
5
+ visibility:hidden;
6
6
  }
7
7
 
8
8
  /* Hide only visually, but have it available for screenreaders
@@ -15,6 +15,6 @@
15
15
  }
16
16
 
17
17
  /* Hide visually and from screenreaders, but maintain layout */
18
- @mixin invisible-with-layout {
18
+ @mixin invisible {
19
19
  visibility: hidden;
20
20
  }
@@ -0,0 +1,6 @@
1
+ /*
2
+ Forces the browser to render animation on the element with hardware acceleration
3
+ */
4
+ @mixin enable-hardware-acceleration {
5
+ -webkit-transform:translate3d(0,0,0);
6
+ }
@@ -0,0 +1,60 @@
1
+ /*
2
+ * https://gist.github.com/960128
3
+ */
4
+
5
+ @function linear() {
6
+ @return cubic-bezier(0.250, 0.250, 0.750, 0.750); }
7
+
8
+ @function ease() {
9
+ @return cubic-bezier(0.250, 0.100, 0.250, 1.000); }
10
+
11
+ @function ease-in() {
12
+ @return cubic-bezier(0.420, 0.000, 1.000, 1.000); }
13
+ @function ease-in-quad() {
14
+ @return cubic-bezier(0.550, 0.085, 0.680, 0.530); }
15
+ @function ease-in-cubic() {
16
+ @return cubic-bezier(0.550, 0.055, 0.675, 0.190); }
17
+ @function ease-in-quart() {
18
+ @return cubic-bezier(0.895, 0.030, 0.685, 0.220); }
19
+ @function ease-in-quint() {
20
+ @return cubic-bezier(0.755, 0.050, 0.855, 0.060); }
21
+ @function ease-in-sine() {
22
+ @return cubic-bezier(0.470, 0.000, 0.745, 0.715); }
23
+ @function ease-in-expo() {
24
+ @return cubic-bezier(0.950, 0.050, 0.795, 0.035); }
25
+ @function ease-in-circ() {
26
+ @return cubic-bezier(0.600, 0.040, 0.980, 0.335); }
27
+
28
+ @function ease-out() {
29
+ @return cubic-bezier(0.000, 0.000, 0.580, 1.000); }
30
+ @function ease-out-quad() {
31
+ @return cubic-bezier(0.250, 0.460, 0.450, 0.940); }
32
+ @function ease-out-cubic() {
33
+ @return cubic-bezier(0.215, 0.610, 0.355, 1.000); }
34
+ @function ease-out-quart() {
35
+ @return cubic-bezier(0.165, 0.840, 0.440, 1.000); }
36
+ @function ease-out-quint() {
37
+ @return cubic-bezier(0.230, 1.000, 0.320, 1.000); }
38
+ @function ease-out-sine() {
39
+ @return cubic-bezier(0.390, 0.575, 0.565, 1.000); }
40
+ @function ease-out-expo() {
41
+ @return cubic-bezier(0.190, 1.000, 0.220, 1.000); }
42
+ @function ease-out-circ() {
43
+ @return cubic-bezier(0.075, 0.820, 0.165, 1.000); }
44
+
45
+ @function ease-in-out() {
46
+ @return cubic-bezier(0.420, 0.000, 0.580, 1.000); }
47
+ @function ease-in-out-quad() {
48
+ @return cubic-bezier(0.455, 0.030, 0.515, 0.955); }
49
+ @function ease-in-out-cubic() {
50
+ @return cubic-bezier(0.645, 0.045, 0.355, 1.000); }
51
+ @function ease-in-out-quart() {
52
+ @return cubic-bezier(0.770, 0.000, 0.175, 1.000); }
53
+ @function ease-in-out-quint() {
54
+ @return cubic-bezier(0.860, 0.000, 0.070, 1.000); }
55
+ @function ease-in-out-sine() {
56
+ @return cubic-bezier(0.445, 0.050, 0.550, 0.950); }
57
+ @function ease-in-out-expo() {
58
+ @return cubic-bezier(1.000, 0.000, 0.000, 1.000); }
59
+ @function ease-in-out-circ() {
60
+ @return cubic-bezier(0.785, 0.135, 0.150, 0.860); }
@@ -3,7 +3,7 @@
3
3
  */
4
4
  @mixin reset-search-field {
5
5
  -webkit-appearance:textfield;
6
- ::-webkit-search-decoration {
6
+ &::-webkit-search-decoration {
7
7
  display:none
8
8
  }
9
9
  }
@@ -1,7 +1,7 @@
1
1
  /*
2
2
  Removes any text from an element and replaces it with an image
3
3
  */
4
- .f-ir {
4
+ .__image-replace {
5
5
  display : block;
6
6
  text-indent : -9999em;
7
7
  overflow : hidden;
@@ -11,7 +11,8 @@
11
11
  }
12
12
 
13
13
  @mixin image-replace($img) {
14
- @extend .f-ir;
15
- height:image_height($img);
16
- width:image_width($img);
14
+ @extend .__image-replace;
15
+ height:image-height($img);
16
+ width:image-width($img);
17
+ background-image:image-url($img);
17
18
  }