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
data/Gemfile.lock ADDED
@@ -0,0 +1,25 @@
1
+ PATH
2
+ remote: .
3
+ specs:
4
+ stitch (0.0.3)
5
+ compass
6
+ sass-globbing
7
+
8
+ GEM
9
+ remote: http://rubygems.org/
10
+ specs:
11
+ chunky_png (1.2.0)
12
+ compass (0.11.4)
13
+ chunky_png (~> 1.2)
14
+ fssm (>= 0.2.7)
15
+ sass (~> 3.1)
16
+ fssm (0.2.7)
17
+ sass (3.1.7)
18
+ sass-globbing (1.0.0.rc.1)
19
+ sass (>= 3.1)
20
+
21
+ PLATFORMS
22
+ ruby
23
+
24
+ DEPENDENCIES
25
+ stitch!
data/README.md CHANGED
@@ -1,4 +1,4 @@
1
- # Stitch CSS Pattern Framework
1
+ # Stitch - CSS Pattern Framework for Compass
2
2
 
3
3
  Patterns are chunks of styles that we use on every project. These chunks of styles generally perform a particular function, such as clearing floats. Having to write these styles each time is annoying and the function of these chunks of code in our stylesheets is obscure.
4
4
 
@@ -10,77 +10,33 @@ By breaking these patterns into reusable classes and mixins we:
10
10
  * Only have to write them once
11
11
  * Are updatable when newer methods are discovered by updating the framework
12
12
 
13
- # Get Stitch
13
+ ## Get Stitch
14
14
 
15
- Install the Rubygem.
16
-
17
- gem install stitch
15
+ sudo gem install stitch
18
16
 
19
- # Create a new project
20
-
21
- Now create your bare project that includes compass-stitch:
17
+ ## Add it to your Compass config.rb
22
18
 
23
- compass create my-project --bare -r stitch
24
-
25
- Install the project template:
19
+ require 'stitch'
26
20
 
27
- compass install stitch/project
21
+ ## Import it into your Sass
28
22
 
29
- # Add Stitch to a current project
23
+ @import 'stitch';
30
24
 
31
- To add Stitch patterns to a current project, add this to the top of your stylesheets
25
+ ## Or import it in parts
32
26
 
27
+ @import 'stitch/reset';
33
28
  @import 'stitch/patterns';
34
-
35
- And in your Compass config.rb file add
36
-
37
- require 'compass-stitch'
38
-
39
- To use the project template layout, run
40
29
 
41
- compass install stitch/project
42
-
43
- and the project template will be installed into your current directory
44
-
45
- # Patterns
30
+ ## Patterns
46
31
 
47
32
  [See all of the patterns available](https://github.com/anthonyshort/stitch-css/tree/master/stylesheets/stitch/patterns)
48
33
 
49
- By using @import 'stitch/patterns'; you will have access to all of the pattern mixins.
34
+ By using @import 'stitch/patterns'; you will have access to all of the pattern mixins. The patterns are all mixins with a couple of extra classes used for extending.
50
35
 
51
- # Reset
36
+ ## Reset
52
37
 
53
- Stitch includes a CSS reset. This is a new reset I'm working on. It resets everything back to it's raw text form so that it's easy to build from.
38
+ Stitch includes a unique CSS reset. It resets everything back to it's raw text form so that it's easy to build from.
54
39
 
55
40
  To manually import the Stitch reset.
56
41
 
57
- @import 'stitch/reset/desktop';
58
-
59
- If you're using the Stitch project template, this will be included for you.
60
-
61
- Stitch only includes a [desktop reset](https://github.com/anthonyshort/stitch-css/blob/master/stylesheets/stitch/patterns/reset/_desktop.scss) for now.
62
-
63
- # Project Template
64
-
65
- This project folder sets up the conventions for laying out your stylesheets. It is built around the idea that a single site may have many layouts and we'll use media queries to select which layout to use.
66
-
67
- However, we don't want to ALWAYS use media queries, so we still have the option to import the layouts statically.
68
-
69
- There are two files, master.scss and legacy.scss. Master imports the layouts based on media queries:
70
-
71
- // Default Layout
72
- @import "layouts/desktop/master.css" screen and (min-width: 481px);
73
-
74
- // Adjusted default layout for smaller tablet screens
75
- @import "layouts/tablet/master.css" screen and (min-width: 481px) and (max-width: 1024px);
76
-
77
- // Adjusted layout for mobile devices
78
- @import "layouts/mobile/master.css" screen and (max-width: 480px);
79
-
80
- Whereas the legacy file will import files statically and without media queries. This means we can send the legacy file to browsers that don't support media queries, and we can send the master file to browsers that do.
81
-
82
- ## Assets Folder
83
-
84
- This folder is where the majority of your assets, such as fonts and images, will live. Keeping them in this single spot makes them easy to access from any layout.
85
-
86
- Assets can include a stylesheet that allows layouts to easily use them. In the case of fonts, a stylesheet should be included with the @font-face method so that layouts only need to import the stylesheet to use the assets. The same method could be used for backgrounds, icons etc.
42
+ @import 'stitch/reset';
data/Rakefile CHANGED
@@ -1,2 +1 @@
1
- require 'bundler'
2
- Bundler::GemHelper.install_tasks
1
+ require "bundler/gem_tasks"
@@ -1,3 +1,3 @@
1
1
  module Stitch
2
- VERSION = "0.0.3"
2
+ VERSION = "0.1.0"
3
3
  end
data/stitch.gemspec CHANGED
@@ -18,4 +18,7 @@ Gem::Specification.new do |s|
18
18
  s.test_files = `git ls-files -- {test,spec,features}/*`.split("\n")
19
19
  s.executables = `git ls-files -- bin/*`.split("\n").map{ |f| File.basename(f) }
20
20
  s.require_paths = ["lib"]
21
+
22
+ s.add_runtime_dependency "compass"
23
+ #s.add_runtime_dependency "sass-globbing"
21
24
  end
@@ -1,4 +1,7 @@
1
+ @import 'utilities';
1
2
  @import 'patterns/accessibility';
3
+ @import 'patterns/animation';
4
+ //@import 'patterns/css3';
2
5
  @import 'patterns/forms';
3
6
  @import 'patterns/images';
4
7
  @import 'patterns/layout';
@@ -0,0 +1,315 @@
1
+ /*
2
+ * 1. Keeps page centred in all browsers regardless of content height
3
+ * 2. Prevents iOS text size adjust after orientation change, without disabling user zoom
4
+ * www.456bereastreet.com/archive/201012/controlling_text_size_in_safari_for_ios_without_disabling_user_zoom/
5
+ */
6
+ html {
7
+ overflow-y: scroll; /* 1 */
8
+ -webkit-text-size-adjust: 100%; /* 2 */
9
+ -ms-text-size-adjust: 100%; /* 2 */
10
+ text-size-adjust: 100%; /* 2 */
11
+ }
12
+
13
+ /*
14
+ * 1. Clear default browser margin
15
+ * 2. Default line-height inconsistent across browsers
16
+ */
17
+ body {
18
+ margin:0; /* 1 */
19
+ line-height:1; /* 2 */
20
+ }
21
+
22
+ /* Forms
23
+ ------------------------------------------------ */
24
+
25
+ form {
26
+ margin:0;
27
+ }
28
+
29
+ fieldset {
30
+ margin:0;
31
+ padding:0;
32
+ border:0;
33
+ }
34
+
35
+ /*
36
+ * 1. Corrects font size not being inherited in all browsers
37
+ * 2. Addresses margins set differently in IE6/7, F3/4, S5, Chrome
38
+ * 3. Improves appearance and consistency in all browsers
39
+ */
40
+ button,
41
+ input,
42
+ select,
43
+ textarea {
44
+ font-size: 100%; /* 1 */
45
+ font-family:inherit; /* 1 */
46
+ margin: 0; /* 2 */
47
+ padding:0; /* 2 */
48
+ vertical-align: baseline; /* 3 */
49
+ *vertical-align: middle; /* 3 */
50
+ }
51
+
52
+ /*
53
+ * 1. Addresses FF3/4 setting line-height using !important in the UA stylesheet
54
+ * 2. Corrects inner spacing displayed oddly in IE6/7
55
+ */
56
+ button,
57
+ input {
58
+ line-height: normal; /* 1 */
59
+ *overflow: visible; /* 2 */
60
+ }
61
+
62
+ /*
63
+ * 1. Removes default vertical scrollbar in IE6/7/8/9
64
+ * 2. Improves readability and alignment in all browsers
65
+ */
66
+ textarea {
67
+ overflow:auto;
68
+ vertical-align:top;
69
+ padding:0;
70
+ }
71
+
72
+ /*
73
+ * 1. Addresses appearance set to searchfield in S5, Chrome
74
+ * 2. Addresses box sizing set to border-box in S5, Chrome (include -moz to future-proof)
75
+ */
76
+ input[type="search"] {
77
+ -webkit-appearance: textfield; /* 1 */
78
+ -moz-box-sizing: content-box;
79
+ -webkit-box-sizing: content-box; /* 2 */
80
+ box-sizing: content-box;
81
+ }
82
+
83
+ /*
84
+ * Corrects inner padding displayed oddly in S5, Chrome on OSX
85
+ */
86
+ input[type="search"]::-webkit-search-decoration {
87
+ -webkit-appearance: none;
88
+ }
89
+
90
+ /*
91
+ * Remove the webkit glow
92
+ */
93
+ :focus {
94
+ outline:none;
95
+ }
96
+
97
+ /*
98
+ * 1. Addresses box sizing set to content-box in IE8/9
99
+ * 2. Addresses excess padding in IE8/9
100
+ */
101
+ input[type="checkbox"],
102
+ input[type="radio"] {
103
+ box-sizing: border-box; /* 1 */
104
+ padding: 0; /* 2 */
105
+ }
106
+
107
+ /*
108
+ * Corrects inner padding and border displayed oddly in FF3/4
109
+ * www.sitepen.com/blog/2008/05/14/the-devils-in-the-details-fixing-dojos-toolbar-buttons/
110
+ */
111
+ button::-moz-focus-inner,
112
+ input::-moz-focus-inner {
113
+ border: 0;
114
+ padding: 0;
115
+ }
116
+
117
+ /* Images
118
+ ------------------------------------------------ */
119
+
120
+ /*
121
+ * Chrome gives figures margin
122
+ */
123
+ figure {
124
+ margin:0;
125
+ }
126
+
127
+ /*
128
+ * 1. Nicer image sizing in IE
129
+ * 2. Common default
130
+ */
131
+ img {
132
+ -ms-interpolation-mode: bicubic; /* 1 */
133
+ display:block; /* 2 */
134
+ }
135
+
136
+ /* Lists
137
+ ------------------------------------------------ */
138
+
139
+ ol,
140
+ ul {
141
+ margin:0;
142
+ padding:0;
143
+ }
144
+
145
+ dl,
146
+ dd {
147
+ margin:0;
148
+ }
149
+
150
+ /*
151
+ * Reset list items back to normal block display.
152
+ * This allows us to use lists for semantic markup
153
+ * without needing to set this each time.
154
+ * Lists only look like lists in blocks of copy.
155
+ */
156
+ li {
157
+ display: block;
158
+ padding: 0;
159
+ margin: 0;
160
+ list-style: none;
161
+ }
162
+
163
+ /* Headings
164
+ ------------------------------------------------ */
165
+
166
+ /*
167
+ * Resets all headings to look like normal text
168
+ */
169
+ h1,
170
+ h2,
171
+ h3,
172
+ h4,
173
+ h5,
174
+ h6 {
175
+ font-weight:inherit;
176
+ line-height:inherit;
177
+ font-size:inherit;
178
+ margin:0;
179
+ }
180
+
181
+ /* Block Text
182
+ ------------------------------------------------ */
183
+
184
+ p {
185
+ margin:0;
186
+ }
187
+
188
+ blockquote {
189
+ margin:0;
190
+ }
191
+
192
+ /*
193
+ * Improve the appearance of preformatted text
194
+ */
195
+ pre {
196
+ white-space: pre;
197
+ white-space: pre-wrap;
198
+ word-wrap: break-word;
199
+ margin:0;
200
+ font-family:inherit;
201
+ font-size:inherit;
202
+ }
203
+
204
+ /* Inline Text
205
+ ------------------------------------------------ */
206
+
207
+ cite {
208
+ font-style:normal;
209
+ }
210
+
211
+ ins {
212
+ text-decoration:none;
213
+ }
214
+
215
+ dfn {
216
+ font-style:inherit;
217
+ }
218
+
219
+ del {
220
+ text-decoration:none;
221
+ }
222
+
223
+ mark {
224
+ background:none;
225
+ color:inherit;
226
+ }
227
+
228
+ address {
229
+ font-style:normal;
230
+ }
231
+
232
+ tt, code, kbd, samp {
233
+ font-family: inherit;
234
+ font-size:inherit;
235
+ }
236
+
237
+ b,
238
+ strong {
239
+ font-weight:inherit;
240
+ }
241
+
242
+ em {
243
+ font-style:inherit;
244
+ }
245
+
246
+ small {
247
+ font-size:100%;
248
+ }
249
+
250
+ q {
251
+ quotes: none;
252
+ }
253
+
254
+ q:before,
255
+ q:after {
256
+ content: '';
257
+ content: none;
258
+ }
259
+
260
+ a {
261
+ font-weight:inherit;
262
+ color:inherit;
263
+ text-decoration:none;
264
+ }
265
+
266
+ a:hover,
267
+ a:active {
268
+ outline: none;
269
+ }
270
+
271
+ /*
272
+ * Set sub, sup without affecting line-height: gist.github.com/413930
273
+ */
274
+ sub,sup {
275
+ font-size: 75%;
276
+ line-height: 0;
277
+ position: relative;
278
+ }
279
+
280
+ sup {
281
+ top: -0.5em;
282
+ }
283
+
284
+ sub {
285
+ bottom: -0.25em;
286
+ }
287
+
288
+ /* HTML 5 Block Elements
289
+ ------------------------------------------------ */
290
+
291
+ article,
292
+ aside,
293
+ details,
294
+ figcaption,
295
+ figure,
296
+ footer,
297
+ header,
298
+ hgroup,
299
+ menu,
300
+ nav,
301
+ section {
302
+ display:block;
303
+ }
304
+
305
+ /* Tables
306
+ ------------------------------------------------ */
307
+
308
+ table {
309
+ border-collapse: collapse;
310
+ border-spacing: 0;
311
+ }
312
+
313
+ th {
314
+ font-weight:inherit;
315
+ }