piecss 0.1.0.alpha.01

Sign up to get free protection for your applications and to get access to all the features.
Files changed (63) hide show
  1. checksums.yaml +7 -0
  2. data/README.md +7 -0
  3. data/lib/piecss.rb +6 -0
  4. data/sass/piecss/behavior.scss +11 -0
  5. data/sass/piecss/behavior/anchor.scss +30 -0
  6. data/sass/piecss/behavior/base.scss +4 -0
  7. data/sass/piecss/behavior/base/normalize.scss +458 -0
  8. data/sass/piecss/behavior/base/preset.scss +57 -0
  9. data/sass/piecss/behavior/form.scss +120 -0
  10. data/sass/piecss/behavior/grid.scss +4 -0
  11. data/sass/piecss/behavior/grid/layout.scss +170 -0
  12. data/sass/piecss/behavior/grid/rhythm.scss +54 -0
  13. data/sass/piecss/behavior/list.scss +189 -0
  14. data/sass/piecss/settings.scss +18 -0
  15. data/sass/piecss/settings/base.scss +177 -0
  16. data/sass/piecss/settings/breakpoint.scss +32 -0
  17. data/sass/piecss/settings/constants.scss +147 -0
  18. data/sass/piecss/settings/fonts.scss +31 -0
  19. data/sass/piecss/settings/fonts/_asap.scss +44 -0
  20. data/sass/piecss/settings/fonts/_bree-serif.scss +23 -0
  21. data/sass/piecss/settings/fonts/_example.scss +43 -0
  22. data/sass/piecss/settings/fonts/_lato.scss +32 -0
  23. data/sass/piecss/settings/fonts/_monospace.scss +39 -0
  24. data/sass/piecss/settings/fonts/_pt-sans.scss +40 -0
  25. data/sass/piecss/settings/fonts/_raleway.scss +31 -0
  26. data/sass/piecss/settings/fonts/_righteous.scss +23 -0
  27. data/sass/piecss/settings/fonts/_roboto.scss +34 -0
  28. data/sass/piecss/settings/fonts/_sans-serif.scss +39 -0
  29. data/sass/piecss/settings/fonts/_serif.scss +39 -0
  30. data/sass/piecss/settings/fonts/_sofia-pro.scss +40 -0
  31. data/sass/piecss/settings/fonts/_varela-round.scss +24 -0
  32. data/sass/piecss/settings/fonts/_verdana.scss +40 -0
  33. data/sass/piecss/settings/fonts/icon-fonts/_fontawesome.scss +33 -0
  34. data/sass/piecss/settings/fonts/icon-fonts/_foundation-accessability.scss +75 -0
  35. data/sass/piecss/settings/fonts/icon-fonts/fontawesome/_bootstrap.scss +84 -0
  36. data/sass/piecss/settings/fonts/icon-fonts/fontawesome/_core.scss +129 -0
  37. data/sass/piecss/settings/fonts/icon-fonts/fontawesome/_extras.scss +93 -0
  38. data/sass/piecss/settings/fonts/icon-fonts/fontawesome/_icons.scss +381 -0
  39. data/sass/piecss/settings/fonts/icon-fonts/fontawesome/_mixins.scss +48 -0
  40. data/sass/piecss/settings/fonts/icon-fonts/fontawesome/_path.scss +14 -0
  41. data/sass/piecss/settings/fonts/icon-fonts/fontawesome/_variables.scss +734 -0
  42. data/sass/piecss/settings/fonts/icon-fonts/foundation-accessability/_settings.scss +28 -0
  43. data/sass/piecss/settings/form.scss +664 -0
  44. data/sass/piecss/settings/grid.scss +157 -0
  45. data/sass/piecss/settings/list.scss +216 -0
  46. data/sass/piecss/utilities.scss +16 -0
  47. data/sass/piecss/utilities/README.md +105 -0
  48. data/sass/piecss/utilities/breakpoint.scss +46 -0
  49. data/sass/piecss/utilities/cache.scss +74 -0
  50. data/sass/piecss/utilities/elements.scss +182 -0
  51. data/sass/piecss/utilities/image.scss +58 -0
  52. data/sass/piecss/utilities/layout.scss +367 -0
  53. data/sass/piecss/utilities/list.scss +26 -0
  54. data/sass/piecss/utilities/miscellaneous.scss +260 -0
  55. data/sass/piecss/utilities/rhythm.scss +173 -0
  56. data/sass/piecss/utilities/sides.scss +376 -0
  57. data/sass/piecss/utilities/typography.scss +295 -0
  58. data/sass/piecss/utilities/units.scss +166 -0
  59. data/templates/project/_settings.scss +24 -0
  60. data/templates/project/examples.html +224 -0
  61. data/templates/project/manifest.rb +13 -0
  62. data/templates/project/screen.scss +96 -0
  63. metadata +133 -0
@@ -0,0 +1,166 @@
1
+ // Copyright (C) 2014 Babs Gösgens. Licensed under MIT; see LICENSE.txt
2
+
3
+
4
+ // Content
5
+ // 1. Functions:
6
+ // strip-unit
7
+ // to-unit
8
+ // to-px
9
+ // 2. Mixins:
10
+ // rem
11
+
12
+
13
+ // 1. FUNCTIONS
14
+
15
+ /**
16
+ * Accepts a value and returns it without a value.
17
+ * @link http://hugogiraudel.com/2013/08/12/sass-functions/ Courtesy Hugo Giraudel
18
+ *
19
+ * @since 0.1
20
+ *
21
+ * @param {Number} $value - A value in any unit (px, rem, em, %, pt)
22
+ *
23
+ * @return {Number} - The value stripped of its unit
24
+ */
25
+
26
+ @function strip-unit($value)
27
+ {
28
+ @if $value==0 {
29
+ @return $value;
30
+ }
31
+ @return $value / ($value * 0 + 1);
32
+ }
33
+
34
+
35
+ /**
36
+ * Convert a px value to a new unit, within the context of it's containing element
37
+ *
38
+ * @since 0.1
39
+ *
40
+ * @param {Number} $target-px - The final size in px
41
+ * @param {Number} $unit ($unit) - The final unit to which $target-px is converted, e.g. px, rem, em, %
42
+ * @param {Number} $context ($default-font-size) - The context of the targeted element, for calculations to em
43
+ *
44
+ * @return {Number} - The value in the requested unit
45
+ */
46
+
47
+ @function to-unit($value, $unit: $unit, $context: $default-font-size)
48
+ {
49
+ @if unit($value) != px {
50
+ /* Convert the value to px first */
51
+ $value: to-px($value);
52
+ }
53
+
54
+ @if unit($unit)=="%" {
55
+ $value: percentage($value / $context);
56
+ }
57
+ @elseif unit($unit)=="px" {
58
+ $value: $value;
59
+ }
60
+ @else {
61
+ $value: $value / $context * $unit;
62
+ }
63
+
64
+ @return $value;
65
+ }
66
+
67
+
68
+ /**
69
+ * Convert any unit to a px value, within the context of it's containing element
70
+ *
71
+ * @since 0.1
72
+ *
73
+ * @param {Number} $value - The value to convert, in any unit
74
+ * @param {Number} $context ($default-font-size) - The context of the targeted element, for calculations to em
75
+ *
76
+ * @return {Number} - The value in px
77
+ */
78
+
79
+ @function to-px($value, $context: $default-font-size)
80
+ {
81
+ @if unit($value)=="px" {
82
+ @debug $value;
83
+ }
84
+ @elseif unit($value)=="rem" {
85
+ $value: rem-to-px($value);
86
+ }
87
+ @elseif unit($value)=="em" {
88
+ $value: em-to-px($value, $context);
89
+ }
90
+ @elseif unit($value)=="%" {
91
+ $value: percentage-to-px($value);
92
+ }
93
+
94
+ @return $value;
95
+
96
+ }
97
+
98
+ /**
99
+ * Convert a value in rem to a px value
100
+ *
101
+ * @since 0.1
102
+ *
103
+ * @param {Number} $value - The value to convert
104
+ *
105
+ * @return {Number} - The value in px
106
+ */
107
+
108
+ @function rem-to-px($value)
109
+ {
110
+ @return $default-font-size * strip-unit($value);
111
+ }
112
+
113
+ /**
114
+ * Convert a value in em to a px value
115
+ *
116
+ * @since 0.1
117
+ *
118
+ * @param {Number} $value - The value to convert
119
+ * @param {Number} $context ($default-font-size) - The context of the targeted element
120
+ *
121
+ * @return {Number} - The value in px
122
+ */
123
+
124
+ @function em-to-px($value, $context: $default-font-size)
125
+ {
126
+ @return $context * strip-unit($value);
127
+ }
128
+
129
+ /**
130
+ * Convert a value in em to a px value
131
+ *
132
+ * @since 0.1
133
+ *
134
+ * @todo Needs to take into account the context
135
+ *
136
+ * @param {Number} $value - The value to convert
137
+ * @param {Number} $context ($default-font-size) - The context of the targeted element
138
+ *
139
+ * @return {Number} - The value in px
140
+ */
141
+
142
+ @function percentage-to-px($value, $context: $default-font-size1)
143
+ {
144
+ @return $value/10% + 0px;
145
+ }
146
+
147
+
148
+ // 2. MIXINS
149
+
150
+
151
+ /**
152
+ * Mixin a property in rem and the fallback in another unit
153
+ *
154
+ * @since 0.1
155
+ *
156
+ * @param {Number} $target-px - The targeted size in px
157
+ * @param {String} $property - The property-name
158
+ * @param {Number} $unit ($rem-fallback-unit) - The fallback unit to use
159
+ * @param {Number} $context-px ($default-font-size) - The context of the targeted element
160
+ */
161
+
162
+ @mixin rem($target-px, $property, $unit: $rem-fallback-unit, $context: $default-font-size)
163
+ {
164
+ #{$property}: to-unit($target-px, $context, $rem-fallback-unit);
165
+ #{$property}: to-unit($target-px, $default-font-size, 1rem);
166
+ }
@@ -0,0 +1,24 @@
1
+ /*
2
+ * Copyright (C) 2014 Crossing Hippos - Babs Gösgens. All rights reserved.
3
+ * Licensed under MIT; see LICENSE.txt
4
+ */
5
+
6
+ $single-direction-elements: (ul,p,pre,table,hr,article);
7
+
8
+ $column-widths: (
9
+ $small_handheld: (main: 1/1, side: 1/1),
10
+ $small_desktop: (main: 2/3, side: 1/3),
11
+ );
12
+
13
+ $reset-list: true;
14
+
15
+ $corner-radius: 4px;
16
+
17
+
18
+ $form-elements: add-properties(
19
+ (
20
+ border-radius: $corner-radius
21
+ ),
22
+ $form-field-base-selector,
23
+ $form-elements
24
+ );
@@ -0,0 +1,224 @@
1
+ <!DOCTYPE html>
2
+ <html lang="en">
3
+ <head>
4
+ <meta charset="utf-8" />
5
+ <title>Piecss</title>
6
+ <link href="./stylesheets/piecss.css" rel="stylesheet" media="screen">
7
+ </head>
8
+ <body>
9
+
10
+
11
+ <div class="main">
12
+
13
+ <h2>Layout</h2>
14
+
15
+ Please refer to the reference guide on http://www.piecss.com/docs.
16
+ You can also find tutorials on http://www.piecss.com/tutorials.
17
+
18
+
19
+ <div class="column">1</div><!--
20
+ --><div class="column column--half">2</div><!--
21
+ --><div class="column column--half">3</div><!--
22
+ --><div class="column column--half">4</div><!--
23
+ --><div class="column column--half">5</div><!--
24
+ --><div class="column column--half">
25
+ <div class="column column--half">7</div><!--
26
+ --><div class="column column--half">8</div><!--
27
+ --></div>
28
+
29
+
30
+ <h2>Type</h2>
31
+
32
+ <h1>Heading 1</h1>
33
+ <h2>Heading 2</h2>
34
+ <h3>Heading 3</h3>
35
+ <h4>Heading 4</h4>
36
+ <h5>Heading 5</h5>
37
+ <h6>Heading 6</h6>
38
+
39
+ <p class="column">Sweet <a href="#cantgothere">gingerbread</a> tiramisu cotton candy sweet roll. Sugar plum sweet sugar plum. Tiramisu bear claw pie tiramisu. Donut candy canes chocolate cake icing gummies. Tiramisu gummi bears danish chocolate cake halvah jelly cake. Marzipan unerdwear.com bonbon apple pie wafer tart cookie. Liquorice cookie jelly-o marzipan muffin. Chocolate bar jujubes ice cream muffin tiramisu pudding. Dragée dessert dessert. Soufflé tiramisu sweet biscuit cheesecake donut. Wafer toffee dessert bonbon muffin toffee. Apple pie marzipan dessert icing gummies tart marshmallow. Biscuit gingerbread cupcake cake cupcake tootsie roll. Brownie cheesecake cupcake halvah.</p>
40
+
41
+
42
+ <h2>Lists</h2>
43
+
44
+ <ul>
45
+ <li>Gingerbread</li>
46
+ <li>Tiramisu</li>
47
+ <li>Cotton candy</li>
48
+ </ul>
49
+
50
+ <ol>
51
+ <li>Gingerbread</li>
52
+ <li>Tiramisu</li>
53
+ <li>Cotton candy</li>
54
+ </ol>
55
+
56
+ <ul class="list">
57
+ <li>Gingerbread</li>
58
+ <li>Tiramisu</li>
59
+ <li>Cotton candy
60
+ <ol class="list">
61
+ <li>Gingerbread</li>
62
+ <li>Tiramisu</li>
63
+ <li>Cotton candy
64
+ <ol class="list list--outside">
65
+ <li>Gingerbread</li>
66
+ <li>Tiramisu</li>
67
+ <li>Cotton candy</li>
68
+ </ol>
69
+ </li>
70
+ </ol>
71
+
72
+ <ul class="list">
73
+ <li>Gingerbread</li>
74
+ <li>Tiramisu</li>
75
+ <li>Cotton candy</li>
76
+ </ul>
77
+ </li>
78
+ </ul>
79
+
80
+ <ol class="list">
81
+ <li>Gingerbread</li>
82
+ <li>Tiramisu</li>
83
+ <li>Cotton candy</li>
84
+ <li>Gingerbread</li>
85
+ <li>Tiramisu</li>
86
+ <li>Cotton candy</li>
87
+ <li>Gingerbread</li>
88
+ <li>Tiramisu</li>
89
+ <li>Cotton candy</li>
90
+ <li>Gingerbread</li>
91
+ <li>Tiramisu</li>
92
+ <li>Cotton candy</li>
93
+ </ol>
94
+
95
+
96
+ <h2>Tables</h2>
97
+
98
+ <table>
99
+ <caption>Recipees</caption>
100
+ <colgroup>
101
+ <col class="name" title="Name">
102
+ <col class="ingredients" title="Ingredients">
103
+ <col class="time" title="Cooking Time">
104
+ </colgroup>
105
+ <tbody>
106
+ <tr>
107
+ <td>Candy sweet roll</td>
108
+ <td>
109
+ <ul>
110
+ <li>Sugar</li>
111
+ <li>Flour</li>
112
+ <li>Butter</li>
113
+ </ul>
114
+ </td>
115
+ <td>20 minutes</td>
116
+ </tr>
117
+ </tbody>
118
+ <thead>
119
+ <tr>
120
+ <th>Name</th>
121
+ <th>Ingredients</th>
122
+ <th>Cooking Time</th>
123
+ </tr>
124
+ </thead>
125
+ <tfoot>
126
+ <tr>
127
+ <td id="3">Sugar is bad for you.</td>
128
+ </tr>
129
+ </tfoot>
130
+ </table>
131
+
132
+
133
+ <h2>Forms</h2>
134
+
135
+ <form>
136
+ <fieldset>
137
+ <legend>Recipe</legend>
138
+ <fieldset>
139
+ <legend>Ingredients</legend>
140
+ <div>
141
+ <label for="text">Type</label>
142
+ <input class="" id="text" type="text" value="">
143
+ </div>
144
+ <div>
145
+ <label for="search">Search</label>
146
+ <input class="" id="text" type="search" value="">
147
+ </div>
148
+ <div>
149
+ <label for="color">Color</label>
150
+ <input class="" id="text" type="color" value="">
151
+ </div>
152
+ <div>
153
+ <label for="range">Range</label>
154
+ <input class="" id="text" type="range" value="">
155
+ </div>
156
+ <div>
157
+ <label for="select1">Select</label>
158
+ <select name="select1">
159
+ <option>Pick one</option>
160
+ <optgroup label="Group">
161
+ <option>High in calories</option>
162
+ <option>Low in calories</option>
163
+ </optgroup>
164
+ </select>
165
+ </div>
166
+ <div>
167
+ <label for="select2">Select</label>
168
+ <select name="select2" size="5" multiple="multiple">
169
+ <option>Pick many</option>
170
+ <optgroup label="Group">
171
+ <option>High in calories</option>
172
+ <option>Low in calories</option>
173
+ </optgroup>
174
+ </select>
175
+ </div>
176
+ <fieldset>
177
+ <legend>Choose</legend>
178
+ <div>
179
+ <label for="radio1">High in calories</label>
180
+ <input class="" id="radio1" type="radio" name="radio" value="">
181
+ </div>
182
+ <div>
183
+ <label for="radio2">Low in calories</label>
184
+ <input class="" id="radio2" type="radio" name="radio" value="">
185
+ </div>
186
+ </fieldset>
187
+ <fieldset>
188
+ <legend>Check</legend>
189
+ <div>
190
+ <label for="check1">High in calories</label>
191
+ <input class="" id="check1" type="checkbox" name="checkbox" value="">
192
+ </div>
193
+ <div>
194
+ <label for="check2">Low in calories</label>
195
+ <input class="" id="check2" type="checkbox" name="checkbox" value="">
196
+ </div>
197
+ </fieldset>
198
+ </fieldset>
199
+ <fieldset>
200
+ <legend>Preparation</legend>
201
+ <div>
202
+ <label for="textarea">Name</label>
203
+ <textarea class="" id="textarea"></textarea>
204
+ </div>
205
+ <div>
206
+ <label for="textarea">Name</label>
207
+ <textarea class="editor--medium" id="textarea"></textarea>
208
+ </div>
209
+ <div>
210
+ <label for="textarea">Name</label>
211
+ <textarea class="editor--large" id="textarea"></textarea>
212
+ </div>
213
+ </fieldset>
214
+ </fieldset>
215
+ </form>
216
+
217
+ </div><!--
218
+ --><div class="side">
219
+ <p class="column">Sweet <a href="#cantgothere">gingerbread</a> tiramisu cotton candy sweet roll. Sugar plum sweet sugar plum. Tiramisu bear claw pie tiramisu. Donut candy canes chocolate cake icing gummies. Tiramisu gummi bears danish chocolate cake halvah jelly cake. Marzipan unerdwear.com bonbon apple pie wafer tart cookie. Liquorice cookie jelly-o marzipan muffin. Chocolate bar jujubes ice cream muffin tiramisu pudding. Dragée dessert dessert. Soufflé tiramisu sweet biscuit cheesecake donut. Wafer toffee dessert bonbon muffin toffee. Apple pie marzipan dessert icing gummies tart marshmallow. Biscuit gingerbread cupcake cake cupcake tootsie roll. Brownie cheesecake cupcake halvah.</p>
220
+ </div>
221
+
222
+
223
+ </body>
224
+ </html>
@@ -0,0 +1,13 @@
1
+ stylesheet 'screen.scss', :media => 'screen, projection'
2
+ stylesheet '_settings.scss'
3
+
4
+ html 'examples.html'
5
+
6
+ help %Q{
7
+ Please refer to the reference guide on http://www.piecss.com/docs.
8
+ You can also find tutorials on http://www.piecss.com/tutorials.
9
+ }
10
+
11
+ welcome_message %Q{
12
+ Both thumbs up for using Piecss! We'll have your project up and running in no time. To help you get started, we've added 'examples.html' to your project folder. Open it in your browser to get to the goodies.
13
+ }
@@ -0,0 +1,96 @@
1
+ @charset "UTF-8";
2
+ /*! piecss.scss v0.1 | MIT License | git.io/piecss/piecss */
3
+
4
+
5
+ // ==========================================================================
6
+ //
7
+ // CONTENT
8
+ //
9
+ // ==========================================================================
10
+ //
11
+ // 1. Variables
12
+ // debug-rhythm
13
+ // 2. Imports
14
+ // 2a. Dependencies
15
+ // 2b. Settings
16
+ // Piecss settings
17
+ // Project settings
18
+ // 2c. Utilities
19
+ // Piecss utilities
20
+ // Project utilities
21
+ // 2d. Behavior (output)
22
+ // Piecss behavior
23
+ // Project behavior
24
+
25
+
26
+ // ==========================================================================
27
+ //
28
+ // 1. VARIABLES
29
+ //
30
+ // ==========================================================================
31
+
32
+
33
+ // ==========================================================================
34
+ // $debug-rhythm - If true, will show vertical rhythm
35
+ // ==========================================================================
36
+
37
+ $debug-rhythm: false;
38
+
39
+
40
+ // ==========================================================================
41
+ //
42
+ // 2. IMPORTS
43
+ //
44
+ // ==========================================================================
45
+ //
46
+ // 2a. DEPENDENCIES
47
+ //
48
+ // ==========================================================================
49
+
50
+ @import "Compass";
51
+
52
+
53
+ // ==========================================================================
54
+ //
55
+ // 2b. UTILITIES
56
+ //
57
+ // 1. Piecss utilities
58
+ // 2. Project utilities (if any)
59
+ //
60
+ // ==========================================================================
61
+
62
+ @import "piecss/utilities";
63
+
64
+
65
+ // ==========================================================================
66
+ //
67
+ // 2c. SETTINGS
68
+ //
69
+ // 1. Piecss settings
70
+ // 2. Project settings (if any)
71
+ //
72
+ // ==========================================================================
73
+
74
+ @import "piecss/settings";
75
+ @import "settings";
76
+
77
+
78
+ // ==========================================================================
79
+ //
80
+ // 2c. BEHAVIOR
81
+ //
82
+ // 1. Piecss behavior
83
+ // 2. Project behavior - you should have that ;)
84
+ //
85
+ // ==========================================================================
86
+
87
+ @import "piecss/behavior";
88
+
89
+ // Or, import individually:
90
+
91
+ /*
92
+ @import "../../sass/base";
93
+ @import "../../sass/grid";
94
+ @import "../../sass/form";
95
+ @import "../../sass/list";
96
+ */