mai 0.0.2 → 0.0.3

Sign up to get free protection for your applications and to get access to all the features.
Files changed (48) hide show
  1. checksums.yaml +8 -8
  2. data/README.md +39 -2
  3. data/lib/mai/version.rb +1 -1
  4. data/sass/_mai.sass +2 -3
  5. data/sass/mai/_base.sass +3 -0
  6. data/sass/mai/_config.sass +5 -0
  7. data/sass/mai/_media.sass +2 -0
  8. data/sass/mai/_modules.sass +2 -0
  9. data/sass/mai/_utils.sass +10 -0
  10. data/sass/{modules/_type.sass → mai/base/_base.sass} +86 -22
  11. data/sass/mai/base/_helpers.sass +17 -0
  12. data/sass/mai/config/_base.sass +143 -0
  13. data/sass/mai/config/_colors.sass +17 -0
  14. data/sass/{config → mai/config}/_global.sass +1 -7
  15. data/sass/{config → mai/config}/_grid.sass +1 -1
  16. data/sass/{config → mai/config}/_media.sass +0 -0
  17. data/sass/{modules → mai}/media/_print.sass +4 -7
  18. data/sass/mai/modules/_grid.sass +6 -0
  19. data/sass/{modules → mai/modules}/grid/_base.sass +6 -9
  20. data/sass/{modules → mai/modules}/grid/_functions.sass +0 -0
  21. data/sass/mai/modules/grid/_media.sass +2 -0
  22. data/sass/{modules → mai/modules}/grid/media/_base.sass +2 -1
  23. data/sass/mai/themes/_pinky.sass +2 -0
  24. data/sass/mai/themes/pinky/_colors.sass +5 -0
  25. data/sass/{utils → mai/utils}/_context.sass +1 -2
  26. data/sass/mai/utils/_global.sass +10 -0
  27. data/sass/{utils → mai/utils}/_media.sass +5 -2
  28. data/sass/mai/utils/_mobile.sass +10 -0
  29. data/sass/mai/utils/_rgba.sass +18 -0
  30. data/sass/{utils → mai/utils}/_ui.sass +9 -0
  31. data/templates/project/index.html +142 -0
  32. data/templates/project/manifest.rb +3 -0
  33. data/templates/project/sass/master.sass +47 -2
  34. metadata +29 -27
  35. data/sass/_config.sass +0 -6
  36. data/sass/_modules.sass +0 -6
  37. data/sass/_utils.sass +0 -2
  38. data/sass/config/_type.sass +0 -84
  39. data/sass/config/_ui.sass +0 -30
  40. data/sass/modules/_grid.sass +0 -6
  41. data/sass/modules/_helpers.sass +0 -18
  42. data/sass/modules/_media.sass +0 -2
  43. data/sass/modules/_ui.sass +0 -8
  44. data/sass/modules/grid/_media.sass +0 -142
  45. data/sass/modules/ui/_forms.sass +0 -51
  46. data/sass/modules/ui/_tables.sass +0 -4
  47. data/sass/utils/_global.sass +0 -8
  48. data/sass/utils/_rgba.sass +0 -20
checksums.yaml CHANGED
@@ -1,15 +1,15 @@
1
1
  ---
2
2
  !binary "U0hBMQ==":
3
3
  metadata.gz: !binary |-
4
- YzllZGQ3ZTAzY2UxZjFjYjExZWY2MTkzYzZlMGVlYzE0MmIwY2RiMw==
4
+ NGM3MGQyMjA2MzA5OWQyNWYyOGVhZDhhYzM0NTI3OGM4NzAxMTZjMA==
5
5
  data.tar.gz: !binary |-
6
- NTM3Y2RmZDk4NzM4MmQ1YzI2ODFlN2ZiODBlMGYxN2QyZWU5MjMwYg==
6
+ MTc1ODc1MjgxMzMwMTEwNGE3YWIzZWVhYzFiNGFlNjNiNWQ1NTQ4Zg==
7
7
  !binary "U0hBNTEy":
8
8
  metadata.gz: !binary |-
9
- MjVmYzAwNzM0ZDljNzMyODZlODkyY2M0MzAyNTgyY2ZiMThmNDY4Yjg2YzI2
10
- MDYyMjM0ZWNiZjk1Yjg5MTM5N2Q0MDYyODg0YzNjNDBlMzMyOTFmYjFiODY1
11
- N2I3MGRiZmIxNWM2MDI2MDU4ZjQwMTM1YTA5ZjA3MDRmYWFlYjQ=
9
+ NjRjZTY1YTg1YjI4NzAwYWZjOTA3OWQ4ZWJiNjVlM2FlMWM0MDVjOGQ0ZTQ4
10
+ YjE0MDBkMGRhZGI0ZWI0NmNjODY3MDA4MmNhZDY5MTA1NzhhYTQ2YWMxYjRl
11
+ YzViYTFjNTdiZjI3NWQ5Y2RiNmIwNzg1OWFiOTdjNjhkZGZhMDg=
12
12
  data.tar.gz: !binary |-
13
- N2EyOWRiODczZjJhMTQ2ODg1NDg1Nzg0OTlmODg4NDA1MGJjMjk2ZTQ0M2Uw
14
- MzZkYzVmNTM5N2MxYTAyYWU3MmYzY2UyOTI3OGFjYTJhNGJmMDJlZDgwYTNl
15
- NjFmNDU0MmRlNzg5NDRhNTE1MmQ3ODBiM2QwOTVkNjQwMzU2MWQ=
13
+ ZjBiZWIyZWUwODRiOTRmZDhkYTE3MWEzZWQ1ZTJlMTk5N2NjMTQ5Njc5ODU0
14
+ NTBiY2Y0MGMzZWZlZDllYTM2M2RhYzJmNDVjODdjODc1Mzg5MDI3NDU5ZTFl
15
+ OWQzMTdhMTBmNTIzNDllMGVkMTg2ZTE4OTczZTUwZDBhYzNjNzY=
data/README.md CHANGED
@@ -5,6 +5,43 @@ Mai is a baseline CSS framework written in SASS. Its main purpose is to provide
5
5
  a responsive grid (which is currently a nearly-copy-paste of Foundation 3's grid) and some sane typographical defaults
6
6
  at its core, while all other functionality will be made available as optional plugins/widgets.
7
7
 
8
+ In development (read: unusable)
9
+ =====================
10
+
8
11
  It is currently in its **design** phase and therefore considered **unusable**. We have used its past iterations
9
- internally for numerous projects in the past but are in the process of restructuring it to be more modular and
10
- extensible to make it somewhat compatible with either Foundation or Bootstrap (tbd).
12
+ internally for numerous projects but are in the process of restructuring it to be more modular and
13
+ extensible to make it somewhat compatible with either Foundation or Bootstrap (tbd).
14
+
15
+ You've been warned.
16
+
17
+ Installation
18
+ =====================
19
+
20
+ Mai is available as a Compass plugin.
21
+
22
+ Grab it with:
23
+
24
+ gem install mai
25
+
26
+ Require it by adding the respective line to your Compass config (`config.rb` or whatever you use):
27
+
28
+ require 'mai'
29
+
30
+ And install it as a Compass plugin (at the command line):
31
+
32
+ compass install mai
33
+
34
+
35
+ This will yield a `master.sass` file in your configured sass_dir with an example and some documentation on how to import
36
+ Mai and its modules. An `index.html` file referencing the built `master.css` file (ie. with a preview of what the example
37
+ `master.sass` generates) will also be generated in your project's root directory.
38
+
39
+ Design principles
40
+ =====================
41
+
42
+ - Mobile first;
43
+ - End-user first, designer second (1kb of additional data per request, stretched over thousands/millions of requests is
44
+ a lot compared to forcing the designer to spend a few extra seconds to import only what's really needed);
45
+ - Provide the kitchen sink but hide it in a maze so that it's available only when absolutely required;
46
+ - Make it flexible, easy to configure and easy to override. When an !important is required within your final stylesheet
47
+ in order to override Mai, it means we suck;
@@ -1,3 +1,3 @@
1
1
  module Mai
2
- VERSION = "0.0.2"
2
+ VERSION = "0.0.3"
3
3
  end
@@ -1,6 +1,5 @@
1
1
 
2
2
  @charset "UTF-8"
3
3
 
4
- @import config
5
- @import utils
6
- @import modules
4
+ @import mai/config
5
+ @import mai/utils
@@ -0,0 +1,3 @@
1
+
2
+ @import base/base
3
+ @import base/helpers
@@ -0,0 +1,5 @@
1
+
2
+ @import config/global
3
+ @import config/base
4
+ @import config/grid
5
+ @import config/media
@@ -0,0 +1,2 @@
1
+
2
+ @import media/print
@@ -0,0 +1,2 @@
1
+
2
+ @import modules/grid
@@ -0,0 +1,10 @@
1
+
2
+ @import utils/global
3
+ @import utils/context
4
+ @import utils/media
5
+ @import utils/mobile
6
+ @import utils/ui
7
+
8
+ /* Do this import if you've got the 'rgbapng' gem installed and want to be able to create rgba backgrounds with
9
+ fallbacks for browsers which don't support rgba:
10
+ // @import utils/rgba
@@ -1,22 +1,12 @@
1
1
 
2
2
  /* Requires
3
- /* - Configs: global, type
3
+ /* - Configs: global, base
4
4
 
5
-
6
- /* Mixins
5
+ /* Placeholders
7
6
  ----------------------------------------------------------------------------------------------------------------------
8
7
 
9
- // Lists
10
- @mixin m-type-list-inline
11
- margin: 0 auto $m-type-p-margin-bottom auto
12
- margin-#{$m-global-float-base}: $m-global-margin-size
13
- margin-#{$m-global-float-opposite}: 0
14
- padding: 0
15
- list-style: none
16
- overflow: hidden
17
- li
18
- margin-#{$m-global-float-base}: $m-global-margin-size
19
- display: inline
8
+ %lead
9
+ font-size: $m-type-lead-font-size
20
10
 
21
11
 
22
12
  /* Reset
@@ -37,10 +27,14 @@ html
37
27
  body
38
28
  margin: 0
39
29
  padding: 0
40
- color: $m-type-base-font-color
41
- font-family: $m-type-base-font-family
42
- font-size: $m-type-base-font-size
43
- line-height: $m-type-base-line-height
30
+ background: $m-body-background-color
31
+ color: $m-body-font-color
32
+ font-family: $m-body-font-family
33
+ font-size: $m-body-font-size
34
+ line-height: $m-body-line-height
35
+
36
+ html, body
37
+ height: 100%
44
38
 
45
39
  article, aside, details, figcaption, figure, footer, header, hgroup, main, nav, section, summary
46
40
  display: block
@@ -56,27 +50,35 @@ audio:not([controls])
56
50
  height: 0
57
51
 
58
52
  p
59
- line-height: $m-type-p-line-height
60
53
  margin-bottom: $m-type-p-margin-bottom
54
+ line-height: $m-type-p-line-height
55
+ &.lead
56
+ @extend %lead
61
57
 
62
58
  aside
63
59
  font-size: $m-type-aside-font-size
60
+ margin-bottom: $m-type-aside-margin-bottom
64
61
 
65
62
  blockquote
66
63
  margin: 0 0 $m-type-p-margin-bottom
67
64
  padding: $m-type-blockquote-padding
68
65
  border-#{$m-global-float-base}: $m-type-blockquote-border
69
- color: $m-type-blockquote-font-color
70
66
  p:last-child
71
67
  margin-bottom: 0
72
68
  cite
69
+ display: block
73
70
  font-size: $m-type-blockquote-cite-font-size
71
+ font-style: $m-type-blockquote-cite-font-style
74
72
  color: $m-type-blockquote-cite-font-color
75
73
  &:before
76
74
  content: "\2014 \0020"
77
75
  a
78
76
  color: $m-type-blockquote-cite-a-color
79
77
 
78
+ blockquote, blockquote p
79
+ line-height: $m-type-p-line-height
80
+ color: $m-type-blockquote-font-color
81
+
80
82
  em, i, dfn
81
83
  font-style: italic
82
84
 
@@ -177,9 +179,9 @@ a
177
179
 
178
180
  ul, ol, dl
179
181
  margin-bottom: $m-type-list-margin-bottom
182
+ line-height: $m-type-list-line-height
180
183
 
181
184
  ul, ol
182
- line-height: $m-type-list-line-height
183
185
  margin-#{$m-global-float-base}: $m-type-list-margin-side
184
186
  li
185
187
  ul, ol
@@ -212,4 +214,66 @@ dl
212
214
 
213
215
  img
214
216
  display: inline-block
215
- vertical-align: middle
217
+ vertical-align: middle
218
+
219
+ /* Forms
220
+ ----------------------------------------------------------------------------------------------------------------------
221
+
222
+ fieldset
223
+ border: $m-ui-border-default
224
+ margin: 0 2px
225
+ padding: 0.35em 0.625em 0.75em
226
+
227
+ legend
228
+ border: 0
229
+ padding: 0
230
+
231
+ button, input, select, textarea
232
+ font-family: inherit
233
+ font-size: 100%
234
+ margin: 0
235
+
236
+ button, input
237
+ line-height: normal
238
+
239
+ button, select
240
+ text-transform: none
241
+
242
+ button, html input[type="button"], input[type="reset"], input[type="submit"]
243
+ -webkit-appearance: button
244
+ cursor: pointer
245
+
246
+ button[disabled], html input[disabled]
247
+ cursor: default
248
+
249
+ input[type="checkbox"], input[type="radio"]
250
+ box-sizing: border-box
251
+ padding: 0
252
+
253
+ input[type="search"]
254
+ -webkit-appearance: textfield
255
+ +box-sizing
256
+
257
+ input[type="search"]::-webkit-search-cancel-button, input[type="search"]::-webkit-search-decoration
258
+ -webkit-appearance: none
259
+
260
+ button::-moz-focus-inner, input::-moz-focus-inner
261
+ border: 0
262
+ padding: 0
263
+
264
+ textarea
265
+ overflow: auto
266
+ vertical-align: top
267
+ height: auto
268
+ min-height: 50px
269
+
270
+ select
271
+ width: 100%
272
+
273
+
274
+ /* Tables
275
+ ----------------------------------------------------------------------------------------------------------------------
276
+
277
+ table
278
+ border-collapse: collapse
279
+ border-spacing: 0
@@ -0,0 +1,17 @@
1
+
2
+ /* Helpers
3
+ ----------------------------------------------------------------------------------------------------------------------
4
+
5
+ .left
6
+ float: left
7
+
8
+ .right
9
+ float: right
10
+
11
+ .hide
12
+ display: none
13
+
14
+ // Note: Not within mai/media/print to ensure this class works properly even if media/print is not inlined but loaded
15
+ // as a separate stylesheet with a different meta media attribute.
16
+ .print-only
17
+ display: none !important
@@ -0,0 +1,143 @@
1
+
2
+ @import global
3
+
4
+ /* BASE USER INTERFACE
5
+
6
+ /*----------------------------------------------------------------------------------------------------------------------
7
+ Borders
8
+ ----------------------------------------------------------------------------------------------------------------------
9
+ Base variables
10
+
11
+ $m-ui-border-size-default: 1px !default
12
+ $m-ui-border-style-default: solid !default
13
+ $m-ui-border-color-default: #eee !default
14
+ $m-ui-border-default: $m-ui-border-size-default $m-ui-border-style-default $m-ui-border-color-default !default
15
+
16
+ // Radius
17
+ $m-ui-border-radius-small: 5px !default
18
+ $m-ui-border-radius-medium: 2*$m-ui-border-radius-small !default
19
+ $m-ui-border-radius-big: 2*$m-ui-border-radius-medium !default
20
+
21
+ /* Mixins
22
+ ----------------------------------------------------------------------------------------------------------------------
23
+
24
+ // Borders
25
+ =m-ui-border-default
26
+ border: $m-ui-border-default
27
+
28
+ =m-ui-border-radius($size: 'small')
29
+ @if $size == 'big'
30
+ +border-radius($m-ui-border-radius-big)
31
+ @else if $size == 'medium'
32
+ +border-radius($m-ui-border-radius-medium)
33
+ @else
34
+ +border-radius($m-ui-border-radius-small)
35
+
36
+
37
+
38
+ /*----------------------------------------------------------------------------------------------------------------------
39
+ Type
40
+ ----------------------------------------------------------------------------------------------------------------------
41
+ Base variables
42
+
43
+ $m-body-font-size: 100% !default
44
+ $m-body-font-family: sans-serif !default
45
+ $m-body-font-color: $m-color-foreground !default
46
+ $m-body-background-color: $m-color-background !default
47
+ $m-body-line-height: 150% !default
48
+
49
+
50
+ /* Colors
51
+ ----------------------------------------------------------------------------------------------------------------------
52
+
53
+ $m-type-text-color-blur: $m-color-blur !default
54
+ $m-type-text-color-blur-more: $m-color-blur-more !default
55
+
56
+ $m-type-text-color-highlight: $m-color-highlight !default
57
+ $m-type-text-color-highlight-less: $m-color-highlight-less !default
58
+
59
+
60
+ /* Links
61
+ ----------------------------------------------------------------------------------------------------------------------
62
+
63
+ $m-type-a-color-base: $m-type-text-color-highlight !default
64
+ $m-type-a-color-hover: $m-type-text-color-highlight-less !default
65
+ $m-type-a-text-decoration: none !default
66
+
67
+
68
+ /* Headers
69
+ ----------------------------------------------------------------------------------------------------------------------
70
+
71
+ $m-type-h-line-height: 150% !default
72
+ $m-type-h-margin: 0 0 .4em !default
73
+
74
+ $m-type-h1-font-size: em(34px) !default
75
+ $m-type-h2-font-size: em(28px) !default
76
+ $m-type-h3-font-size: em(24px) !default
77
+ $m-type-h4-font-size: em(20px) !default
78
+ $m-type-h5-font-size: em(18px) !default
79
+ $m-type-h6-font-size: em(16px) !default
80
+
81
+
82
+ /* Paragraphs
83
+ ----------------------------------------------------------------------------------------------------------------------
84
+
85
+ $m-type-p-line-height: 180% !default
86
+ $m-type-p-margin-bottom: em(20px) !default
87
+
88
+
89
+ /* Lists
90
+ ----------------------------------------------------------------------------------------------------------------------
91
+
92
+ $m-type-list-margin-side: $m-global-margin-size * 2 !default
93
+ $m-type-list-margin-bottom: $m-type-p-margin-bottom !default
94
+ $m-type-list-line-height: $m-type-p-line-height !default
95
+
96
+
97
+ /* Placeholders
98
+ ----------------------------------------------------------------------------------------------------------------------
99
+
100
+ $m-type-lead-font-size: em(22px) !default
101
+
102
+
103
+ /* Minor elements
104
+ ----------------------------------------------------------------------------------------------------------------------
105
+
106
+ // <small>
107
+ $m-type-small-font-size: 60% !default
108
+
109
+ // <small> in headers
110
+ $m-type-h-small-font-color: $m-type-text-color-blur-more !default
111
+
112
+ // <aside>
113
+ $m-type-aside-margin-bottom: $m-type-p-margin-bottom !default
114
+ $m-type-aside-font-size: em(14px) !default
115
+
116
+ // <hr>
117
+ $m-type-hr-border: $m-ui-border-default !default
118
+ $m-type-hr-margin: $m-global-margin-size 0 !default
119
+
120
+ // <blockquote> and <cite> within <blockquote>
121
+ $m-type-blockquote-font-color: $m-type-text-color-blur !default
122
+ $m-type-blockquote-padding: $m-global-margin-size / 2 $m-global-margin-size !default
123
+ $m-type-blockquote-border: 3px $m-ui-border-style-default $m-ui-border-color-default !default
124
+ $m-type-blockquote-cite-font-size: em(14px) !default
125
+ $m-type-blockquote-cite-font-style: normal !default
126
+ $m-type-blockquote-cite-font-color: $m-type-text-color-blur-more !default
127
+ $m-type-blockquote-cite-a-color: $m-type-blockquote-cite-font-color !default
128
+
129
+
130
+ /* Mixins
131
+ ----------------------------------------------------------------------------------------------------------------------
132
+
133
+ // Lists
134
+ @mixin m-type-list-inline
135
+ margin: 0 auto $m-type-p-margin-bottom auto
136
+ margin-#{$m-global-float-base}: $m-global-margin-size
137
+ margin-#{$m-global-float-opposite}: 0
138
+ padding: 0
139
+ list-style: none
140
+ overflow: hidden
141
+ li
142
+ margin-#{$m-global-float-base}: $m-global-margin-size
143
+ display: inline
@@ -0,0 +1,17 @@
1
+
2
+ /* Default colors
3
+ ----------------------------------------------------------------------------------------------------------------------
4
+
5
+ $m-color-foreground: #222 !default
6
+ $m-color-background: white !default
7
+
8
+ $m-color-blur: lighten($m-color-foreground, 30%) !default
9
+ $m-color-blur-less: darken($m-color-blur, 15%) !default
10
+ $m-color-blur-more: lighten($m-color-blur, 15%) !default
11
+
12
+ $m-color-highlight: #00a9cb !default
13
+ $m-color-highlight-less: darken($m-color-highlight, 20%) !default
14
+ $m-color-highlight-more: lighten($m-color-highlight, 10%) !default
15
+
16
+ $m-color-alert: #c60f13 !default
17
+ $m-color-success: #5da423 !default