piecss 0.1.0.alpha.01

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.
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,157 @@
1
+ // Copyright (C) 2014 Babs Gösgens. Licensed under MIT; see LICENSE.txt
2
+
3
+
4
+ // Rhythm settings
5
+
6
+ // Vertical measurements like line-height and %-top and %-bottom are factors of rhythm
7
+
8
+ /**
9
+ * This measure is used to calculare vertical measurements like line-height and top and bottom paddings and margins. It defaults to the $default-line-height but some prefer to set it to a smaller value, like 1/2 or 1/3 times the $default-line-height.
10
+ *
11
+ * @since 0.1
12
+ *
13
+ * @type {Number}
14
+ */
15
+
16
+ $rhythm: $default-line-height !default;
17
+
18
+ /**
19
+ * If true,reveals the document's vertical rhythm. Also see: [mixin $debug-rhythm](./#mixin-debug-rhythm).
20
+ *
21
+ * @since 0.1
22
+ *
23
+ * @type {Bool}
24
+ */
25
+
26
+ $debug-rhythm: false !default;
27
+
28
+ /**
29
+ * Based on an idea by [@csswizardry](https://twitter.com/csswizardry): apply a bottom margin of one rhythm height to any element in this comma separated list.
30
+ *
31
+ * @since 0.1
32
+ *
33
+ * @type {List}
34
+ */
35
+
36
+ $single-direction-elements: (p,pre,table,hr,article) !default;
37
+
38
+ /**
39
+ * Column classes are rendered from this map. The first level of each item has a breakpoint string as a key, the value is another Map of classnames/column widths pairs. Column widths are expressed as factors.
40
+ * Piecss will render these columns by default, unless you override this Map from your project settings.
41
+ *
42
+ * @since 0.1
43
+ *
44
+ * @type {Map}
45
+ */
46
+
47
+ $column-widths: (
48
+ $small_handheld: (small-1-2: 1/2, small-1-3: 1/3, small-2-3: 2/3),
49
+ $medium_handheld: (medium-1-2: 1/2, medium-1-3: 1/3, medium-1-4: 1/4, medium-2-3: 2/3, medium-3-4: 3/4),
50
+ $small_desktop: (default-1-2: 1/2, default-1-3: 1/3, default-1-4: 1/4, default-2-3: 2/3, default-3-4: 3/4),
51
+ ) !default;
52
+
53
+ /**
54
+ * Default column width, all columns implemented with [column()](./#mixin-column) will have this width unless otherwise specified.
55
+ *
56
+ * @since 0.1
57
+ *
58
+ * @type {Number}
59
+ */
60
+
61
+ $column-width-default: 1/1 !default;
62
+
63
+ /**
64
+ * If set to true, the [column() mixin](./#mixin-column) will mixin a reset of all column widths to 100% at the smallest [breakpoint](./#variable-small_handheld). If you are developing mobile-first, leave this setting to false.
65
+ *
66
+ * @deprecated
67
+ *
68
+ * @since 0.1
69
+ *
70
+ * @type {Bool}
71
+ */
72
+
73
+ $column-breakpoint: false !default;
74
+
75
+ /**
76
+ * By default, columns are rendered as inline-blocks. Inline-block elements are much easier to implement than floating elements, but require the invisible space between elements to be minified or obscured.
77
+ * If you can't minify your markup, then floated columns (or [negative right margin](./#variable-negative-right-margin)) will be helpful. You will have to implement your own clearfix method though.
78
+ *
79
+ * @since 0.1
80
+ *
81
+ * @type {Bool}
82
+ */
83
+
84
+ $column-float: false !default; // If you prefer floated columns instead of inline-blocks, set to true.
85
+
86
+ /**
87
+ * Gutter widths are based on the vertical [rhythm](./#variable-rhythm) and default to 2*$rhythm. Gutters are implemented using the [gutter mixin](./#mixin-gutters) and are expressed in factors of this measure (usually 1/2).
88
+ *
89
+ * @since 0.1
90
+ *
91
+ * @type {Number}
92
+ */
93
+
94
+ $gutter-width: 2*$rhythm !default;
95
+
96
+ /**
97
+ * The final unit of output in which gutter widths are rendered
98
+ *
99
+ * @since 0.1
100
+ *
101
+ * @type {Number}
102
+ */
103
+
104
+ $gutter-width-unit: $unit !default;
105
+
106
+ /**
107
+ * If false, gutter widths will be halved below the smallest breakpoint.
108
+ *
109
+ * @deprecated
110
+ *
111
+ * @since 0.1
112
+ *
113
+ * @type {Number}
114
+ */
115
+
116
+ $gutter-width-persistent: false !default;
117
+
118
+ /**
119
+ * If you cannot minify your markup, you can assign a negative right margin to close gaps between columns to make them fit.
120
+ * You can also set [$column-float](./#variable-column-float) to true to render your columns as floated blocks. You will have to implement your own clearfix method though.
121
+ * This is a hack and not necessary when your html (or column markup) is minimized.
122
+ * @since 0.1
123
+ *
124
+ * @type {Number}
125
+ */
126
+
127
+ $negative-right-margin: false !default;
128
+
129
+
130
+ // Root settings
131
+ // Set a max width on a root container of your choice, the content will not stretch beyond this width.
132
+ // The root container can be positioned left or center, for alternate position you can provide your own behavior.
133
+
134
+
135
+ /**
136
+ * Fixes content maximum width, 72em is 1152px at a 16px [$default-font-size](./#variable-default-font-size). It is used by the [root mixin](./#mixin-root).
137
+ *
138
+ * @deprecated
139
+ *
140
+ * @since 0.1
141
+ *
142
+ * @type {Number}
143
+ */
144
+
145
+ $root-max-width: 72em !default;
146
+
147
+ /**
148
+ * Aligns content inside the viewport, center by default. Used by the [root mixin](./#mixin-root).
149
+ *
150
+ * @deprecated
151
+ *
152
+ * @since 0.1
153
+ *
154
+ * @type {Number}
155
+ */
156
+
157
+ $root-position: center !default;
@@ -0,0 +1,216 @@
1
+ // Copyright (C) 2014 Babs Gösgens. Licensed under MIT; see LICENSE.txt
2
+
3
+
4
+ /**
5
+ * If true, the default behavior of lists will be reset (remove padding and list-style-type none).
6
+ *
7
+ * @type {Bool}
8
+ */
9
+
10
+ $reset-list: false;
11
+
12
+ /**
13
+ * The namespace for the list placeholders
14
+ *
15
+ * @type {String}
16
+ */
17
+
18
+ $list-selector: "list" !default;
19
+
20
+ /**
21
+ * The default list-style-type for ul lists
22
+ *
23
+ * @type {String}
24
+ */
25
+
26
+ $list-ul-default: disc !default;
27
+
28
+ /**
29
+ * The default list-style-type for ol lists
30
+ *
31
+ * @type {String}
32
+ */
33
+
34
+ $list-ol-default: decimal !default;
35
+
36
+
37
+ // ==========================================================================
38
+ // List Style Types
39
+ // See: http://www.w3schools.com/cssref/pr_list-style-type.asp
40
+ // ==========================================================================
41
+
42
+ /**
43
+ * If true, Piecss will render a placeholder for this list-style-type (%list--armenian)
44
+ *
45
+ * @type {Bool}
46
+ */
47
+
48
+ $list-style-type-armenian: false !default;
49
+
50
+ /**
51
+ * If true, Piecss will render a placeholder for this list-style-type (%list--circle)
52
+ *
53
+ * @type {Bool}
54
+ */
55
+
56
+ $list-style-type-circle: true !default;
57
+
58
+ /**
59
+ * If true, Piecss will render a placeholder for this list-style-type (%list--cjk-ideographic)
60
+ *
61
+ * @type {Bool}
62
+ */
63
+
64
+ $list-style-type-cjk-ideographic: false !default;
65
+
66
+ /**
67
+ * If true, Piecss will render a placeholder for this list-style-type (%list--decimal)
68
+ *
69
+ * @type {Bool}
70
+ */
71
+
72
+ $list-style-type-decimal: true !default;
73
+
74
+ /**
75
+ * If true, Piecss will render a placeholder for this list-style-type (%list--decimal-leading-zero)
76
+ *
77
+ * @type {Bool}
78
+ */
79
+
80
+ $list-style-type-decimal-leading-zero: false !default;
81
+
82
+ /**
83
+ * If true, Piecss will render a placeholder for this list-style-type (%list--disc)
84
+ *
85
+ * @type {Bool}
86
+ */
87
+
88
+ $list-style-type-disc: true !default;
89
+
90
+ /**
91
+ * If true, Piecss will render a placeholder for this list-style-type (%list--georgian)
92
+ *
93
+ * @type {Bool}
94
+ */
95
+
96
+ $list-style-type-georgian: false !default;
97
+
98
+ /**
99
+ * If true, Piecss will render a placeholder for this list-style-type (%list--hebrew)
100
+ *
101
+ * @type {Bool}
102
+ */
103
+
104
+ $list-style-type-hebrew: false !default;
105
+
106
+ /**
107
+ * If true, Piecss will render a placeholder for this list-style-type (%list--hiragana)
108
+ *
109
+ * @type {Bool}
110
+ */
111
+
112
+ $list-style-type-hiragana: false;
113
+
114
+ /**
115
+ * If true, Piecss will render a placeholder for this list-style-type (%list--hiragana-iroha)
116
+ *
117
+ * @type {Bool}
118
+ */
119
+
120
+ $list-style-type-hiragana-iroha: false !default;
121
+
122
+ /**
123
+ * If true, Piecss will render a placeholder for this list-style-type (%list--inherit)
124
+ *
125
+ * @type {Bool}
126
+ */
127
+
128
+ $list-style-type-inherit: true !default;
129
+
130
+ /**
131
+ * If true, Piecss will render a placeholder for this list-style-type (%list--katakana)
132
+ *
133
+ * @type {Bool}
134
+ */
135
+
136
+ $list-style-type-katakana: false !default;
137
+
138
+ /**
139
+ * If true, Piecss will render a placeholder for this list-style-type (%list--katakana-iroha)
140
+ *
141
+ * @type {Bool}
142
+ */
143
+
144
+ $list-style-type-katakana-iroha: false !default;
145
+
146
+ /**
147
+ * If true, Piecss will render a placeholder for this list-style-type (%list--lower-alpha)
148
+ *
149
+ * @type {Bool}
150
+ */
151
+
152
+ $list-style-type-lower-alpha: true !default;
153
+
154
+ /**
155
+ * If true, Piecss will render a placeholder for this list-style-type (%list--lower-greek)
156
+ *
157
+ * @type {Bool}
158
+ */
159
+
160
+ $list-style-type-lower-greek: false !default;
161
+
162
+ /**
163
+ * If true, Piecss will render a placeholder for this list-style-type (%list--lower-latin)
164
+ *
165
+ * @type {Bool}
166
+ */
167
+
168
+ $list-style-type-lower-latin: true !default;
169
+
170
+ /**
171
+ * If true, Piecss will render a placeholder for this list-style-type (%list--lower-roman)
172
+ *
173
+ * @type {Bool}
174
+ */
175
+
176
+ $list-style-type-lower-roman: true !default;
177
+
178
+ /**
179
+ * If true, Piecss will render a placeholder for this list-style-type (%list--none)
180
+ *
181
+ * @type {Bool}
182
+ */
183
+
184
+ $list-style-type-none: true !default;
185
+
186
+ /**
187
+ * If true, Piecss will render a placeholder for this list-style-type (%list--square)
188
+ *
189
+ * @type {Bool}
190
+ */
191
+
192
+ $list-style-type-square: true !default;
193
+
194
+ /**
195
+ * If true, Piecss will render a placeholder for this list-style-type (%list--upper-alpha)
196
+ *
197
+ * @type {Bool}
198
+ */
199
+
200
+ $list-style-type-upper-alpha: true !default;
201
+
202
+ /**
203
+ * If true, Piecss will render a placeholder for this list-style-type (%list--upper-latin)
204
+ *
205
+ * @type {Bool}
206
+ */
207
+
208
+ $list-style-type-upper-latin: true !default;
209
+
210
+ /**
211
+ * If true, Piecss will render a placeholder for this list-style-type (%list--upper-roman)
212
+ *
213
+ * @type {Bool}
214
+ */
215
+
216
+ $list-style-type-upper-roman: true !default;
@@ -0,0 +1,16 @@
1
+ // Copyright (C) 2014 Babs Gösgens. Licensed under MIT; see LICENSE.txt
2
+
3
+
4
+
5
+
6
+ @import "utilities/cache";
7
+ @import "utilities/units";
8
+ @import "utilities/sides";
9
+ @import "utilities/rhythm";
10
+ @import "utilities/breakpoint";
11
+ @import "utilities/layout";
12
+ @import "utilities/typography";
13
+ @import "utilities/elements";
14
+ @import "utilities/image";
15
+ @import "utilities/list";
16
+ @import "utilities/miscellaneous";
@@ -0,0 +1,105 @@
1
+ #Utilities
2
+
3
+ ## Table of Content
4
+
5
+ 1. Typography
6
+ 2. Rhythm
7
+ 1. Vertical Rhythm
8
+ 2. Horizontal Rhythm
9
+ 3. Layout
10
+
11
+
12
+ ----------
13
+
14
+ ## 2. Rhythm
15
+
16
+ ### 2.1 Vertical Rhythm
17
+
18
+ Properties that implement vertical rhythm:
19
+
20
+ * margin (-top, -bottom)
21
+ * padding (-top, -bottom)
22
+ * height
23
+ * top
24
+ * bottom
25
+ * font-size
26
+ * line-height
27
+
28
+
29
+
30
+ #### Usage
31
+ Vertical units can be calculated with vrhythm-units();
32
+
33
+ ```scss
34
+ // units, context
35
+ @include line-height(1, 16px);
36
+ ```
37
+
38
+ ```scss
39
+ // units, property, context
40
+ @include vrhythm(1, line-height, 16px);
41
+ ```
42
+
43
+ ```scss
44
+ // units, context
45
+ line-height: vrhythm(1, 16px);
46
+ ```
47
+
48
+ Output (assuming context font-size is 16px and rhythm-measurement is 24px):
49
+
50
+ ```scss
51
+ // unit: px
52
+ line-height: 24px;
53
+ ```
54
+
55
+ ```scss
56
+ // unit: em
57
+ line-height: 1em;
58
+ ```
59
+
60
+ ```scss
61
+ // unit: rem
62
+ line-height: 1.5rem;
63
+ ```
64
+
65
+ ```scss
66
+ // unit: %
67
+ line-height: 150%;
68
+ ```
69
+
70
+ ### 2.2 Horizontal Rhythm
71
+
72
+ Vertical rhythm is used for horizontal padding. It's based on the value for column gutters which is configured in the layout settings file.
73
+
74
+ Properties that implement horizontal rhythm:
75
+
76
+ * margin (-right, -left)
77
+ * padding (-right, -left)
78
+ * width
79
+ * right
80
+ * left
81
+
82
+ #### Usage
83
+ Horizontal units can be calculated with hrhythm-units();
84
+
85
+ ```scss
86
+ // units, context
87
+ @include margin-bottom(1, 16px);
88
+ ```
89
+
90
+ ```scss
91
+ // units, property, context
92
+ @include hrhythm(1, margin-bottom, 16px);
93
+ ```
94
+
95
+ ```scss
96
+ // units, context
97
+ margin-bottom: hrhythm(1, 16px);
98
+ ```
99
+
100
+ Which outputs:
101
+
102
+ ```scss
103
+ // unit: rem
104
+ margin-bottom: 1.5rem;
105
+ ```