mai 0.0.2

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.
checksums.yaml ADDED
@@ -0,0 +1,15 @@
1
+ ---
2
+ !binary "U0hBMQ==":
3
+ metadata.gz: !binary |-
4
+ YzllZGQ3ZTAzY2UxZjFjYjExZWY2MTkzYzZlMGVlYzE0MmIwY2RiMw==
5
+ data.tar.gz: !binary |-
6
+ NTM3Y2RmZDk4NzM4MmQ1YzI2ODFlN2ZiODBlMGYxN2QyZWU5MjMwYg==
7
+ !binary "U0hBNTEy":
8
+ metadata.gz: !binary |-
9
+ MjVmYzAwNzM0ZDljNzMyODZlODkyY2M0MzAyNTgyY2ZiMThmNDY4Yjg2YzI2
10
+ MDYyMjM0ZWNiZjk1Yjg5MTM5N2Q0MDYyODg0YzNjNDBlMzMyOTFmYjFiODY1
11
+ N2I3MGRiZmIxNWM2MDI2MDU4ZjQwMTM1YTA5ZjA3MDRmYWFlYjQ=
12
+ data.tar.gz: !binary |-
13
+ N2EyOWRiODczZjJhMTQ2ODg1NDg1Nzg0OTlmODg4NDA1MGJjMjk2ZTQ0M2Uw
14
+ MzZkYzVmNTM5N2MxYTAyYWU3MmYzY2UyOTI3OGFjYTJhNGJmMDJlZDgwYTNl
15
+ NjFmNDU0MmRlNzg5NDRhNTE1MmQ3ODBiM2QwOTVkNjQwMzU2MWQ=
data/.gitignore ADDED
@@ -0,0 +1,2 @@
1
+ .idea
2
+ *.gem
data/Gemfile ADDED
@@ -0,0 +1,3 @@
1
+ source 'https://rubygems.org'
2
+
3
+ gemspec
data/LICENSE.md ADDED
@@ -0,0 +1,22 @@
1
+ Copyright (c) 2013 Michał Chojnacki <m.chojnacki@muyo.pl>
2
+
3
+ MIT License
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining
6
+ a copy of this software and associated documentation files (the
7
+ "Software"), to deal in the Software without restriction, including
8
+ without limitation the rights to use, copy, modify, merge, publish,
9
+ distribute, sublicense, and/or sell copies of the Software, and to
10
+ permit persons to whom the Software is furnished to do so, subject to
11
+ the following conditions:
12
+
13
+ The above copyright notice and this permission notice shall be
14
+ included in all copies or substantial portions of the Software.
15
+
16
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
17
+ EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
18
+ MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
19
+ NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
20
+ LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
21
+ OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
22
+ WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
data/README.md ADDED
@@ -0,0 +1,10 @@
1
+ Mai
2
+ =====================
3
+
4
+ Mai is a baseline CSS framework written in SASS. Its main purpose is to provide simplistic cross-browser normalization,
5
+ a responsive grid (which is currently a nearly-copy-paste of Foundation 3's grid) and some sane typographical defaults
6
+ at its core, while all other functionality will be made available as optional plugins/widgets.
7
+
8
+ 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).
data/lib/mai.rb ADDED
@@ -0,0 +1,9 @@
1
+ root = File.join(File.dirname(__FILE__), "..")
2
+
3
+ require "mai/version"
4
+ require "compass"
5
+
6
+ Compass::Frameworks.register("mai",
7
+ :stylesheets_directory => File.join(root,"sass"),
8
+ :templates_directory => File.join(root,"templates")
9
+ )
@@ -0,0 +1,3 @@
1
+ module Mai
2
+ VERSION = "0.0.2"
3
+ end
data/mai.gemspec ADDED
@@ -0,0 +1,19 @@
1
+ # -*- encoding: utf-8 -*-
2
+ require File.expand_path('../lib/mai/version', __FILE__)
3
+
4
+ Gem::Specification.new do |gem|
5
+ gem.authors = ["Muyo"]
6
+ gem.email = ["mai@muyo.pl"]
7
+ gem.description = %q{Mai CSS skeleton built on Compass}
8
+ gem.summary = %q{Mai CSS skeleton built on Compass}
9
+ gem.homepage = "https://github.com/muyo/mai"
10
+
11
+ gem.files = `git ls-files`.split($\)
12
+ gem.executables = gem.files.grep(%r{^bin/}).map{ |f| File.basename(f) }
13
+ gem.test_files = gem.files.grep(%r{^(test|spec|features)/})
14
+ gem.name = "mai"
15
+ gem.version = Mai::VERSION
16
+ gem.license = 'MIT'
17
+
18
+ gem.add_dependency "sass", [">= 3.2.3"]
19
+ end
data/sass/_config.sass ADDED
@@ -0,0 +1,6 @@
1
+
2
+ @import config/global
3
+ @import config/grid
4
+ @import config/media
5
+ @import config/type
6
+ @import config/ui
data/sass/_mai.sass ADDED
@@ -0,0 +1,6 @@
1
+
2
+ @charset "UTF-8"
3
+
4
+ @import config
5
+ @import utils
6
+ @import modules
@@ -0,0 +1,6 @@
1
+
2
+ @import modules/helpers
3
+ @import modules/grid
4
+ @import modules/media
5
+ @import modules/type
6
+ @import modules/ui
data/sass/_utils.sass ADDED
@@ -0,0 +1,2 @@
1
+
2
+ @import utils/global
@@ -0,0 +1,49 @@
1
+
2
+ /* Global configuration
3
+ ----------------------------------------------------------------------------------------------------------------------
4
+ Contains variables and functions helpful in keeping all modules consistent.
5
+
6
+
7
+ /* Pixels to (r)em
8
+ ----------------------------------------------------------------------------------------------------------------------
9
+
10
+ $m-global-em: 16px !default
11
+
12
+ @function em($pxWidth)
13
+ @return $pxWidth / $m-global-em * 1em
14
+
15
+ @function rem($pxWidth)
16
+ @return $pxWidth / $m-global-em * 1rem
17
+
18
+
19
+ /* Colors
20
+ ----------------------------------------------------------------------------------------------------------------------
21
+
22
+ $m-global-color-grey: #999 !default
23
+ $m-global-color-grey-dark: #444 !default
24
+ $m-global-color-grey-light: #eee !default
25
+
26
+ $m-global-color-blue: #00a9cb !default
27
+ $m-global-color-blue-light: lighten($m-global-color-blue, 10%) !default
28
+ $m-global-color-blue-dark: darken($m-global-color-blue, 20%) !default
29
+
30
+
31
+ /* Margins / padding / gutter
32
+ ----------------------------------------------------------------------------------------------------------------------
33
+
34
+ $m-global-margin-size: em(15px)
35
+
36
+
37
+ /* Text direction
38
+ ----------------------------------------------------------------------------------------------------------------------
39
+
40
+ $m-global-direction: ltr !default
41
+ $m-global-float-base: left !default
42
+ $m-global-float-opposite: right !default
43
+
44
+ @if $m-global-direction == ltr
45
+ $m-global-float-base: left
46
+ $m-global-float-opposite: right
47
+ @else
48
+ $m-global-float-base: right
49
+ $m-global-float-opposite: left
@@ -0,0 +1,17 @@
1
+
2
+ @import "global", "media"
3
+
4
+ /* Base settings
5
+ ----------------------------------------------------------------------------------------------------------------------
6
+
7
+ $m-grid-width: em(960px) !default
8
+ $m-grid-breakpoint: em($m-media-screen-size-small - 1) !default
9
+ $m-grid-gutter-single: $m-global-margin-size !default
10
+ $m-grid-gutter: $m-grid-gutter-single * 2 !default
11
+ $m-grid-columns: 12 !default
12
+ $m-grid-column-float: $m-global-float-base !default
13
+
14
+ /* Media query strings
15
+ ----------------------------------------------------------------------------------------------------------------------
16
+
17
+ $m-media-query-breakpoint: "only screen and (max-width: #{$m-grid-breakpoint})" !default
@@ -0,0 +1,22 @@
1
+
2
+ /* Screen sizes
3
+ ----------------------------------------------------------------------------------------------------------------------
4
+
5
+ $m-media-screen-size-small: 768px !default
6
+ $m-media-screen-size-medium: 1279px !default
7
+ $m-media-screen-size-large: 1441px !default
8
+ $m-media-screen-size-xlarge: 1921px !default
9
+
10
+ /* Media query strings
11
+ ----------------------------------------------------------------------------------------------------------------------
12
+
13
+ $m-media-query-screen: "only screen" !default
14
+ $m-media-query-small: "only screen and (min-width: #{$m-media-screen-size-small})" !default
15
+ $m-media-query-medium: "only screen and (min-width: #{$m-media-screen-size-medium})" !default
16
+ $m-media-query-large: "only screen and (min-width: #{$m-media-screen-size-large})" !default
17
+ $m-media-query-xlarge: "only screen and (min-width: #{$m-media-screen-size-xlarge})" !default
18
+
19
+ $m-media-query-and-landscape: "and (orientation: landscape)" !default
20
+ $m-media-query-and-portrait: "and (orientation: portrait)" !default
21
+ $m-media-query-landscape: "only screen #{$m-media-query-and-landscape}" !default
22
+ $m-media-query-portrait: "only screen #{$m-media-query-and-portrait}" !default
@@ -0,0 +1,84 @@
1
+
2
+ @import "global", "grid", "ui"
3
+
4
+ /* Base variables
5
+ ----------------------------------------------------------------------------------------------------------------------
6
+
7
+ $m-type-base-font-size: 100% !default
8
+ $m-type-base-font-family: sans-serif !default
9
+ $m-type-base-font-color: black !default
10
+ $m-type-base-line-height: 150% !default
11
+
12
+ /* Colors
13
+ ----------------------------------------------------------------------------------------------------------------------
14
+
15
+ $m-type-text-color-blur: lighten($m-type-base-font-color, 40%) !default
16
+ $m-type-text-color-blur-more: lighten($m-type-text-color-blur, 20%) !default
17
+
18
+ $m-type-text-color-highlight: $m-global-color-blue !default
19
+ $m-type-text-color-highlight-less: $m-global-color-blue-dark !default
20
+
21
+ $m-type-text-color-alert: #cc0000 !default
22
+ $m-type-text-color-success: #a6cc13 !default
23
+
24
+ /* Links
25
+ ----------------------------------------------------------------------------------------------------------------------
26
+
27
+ $m-type-a-color-base: $m-type-text-color-highlight !default
28
+ $m-type-a-color-hover: $m-type-text-color-highlight-less !default
29
+ $m-type-a-text-decoration: none !default
30
+
31
+
32
+ /* Headers
33
+ ----------------------------------------------------------------------------------------------------------------------
34
+
35
+ $m-type-h-line-height: 150% !default
36
+ $m-type-h-margin: 0 0 .4em !default
37
+
38
+ $m-type-h1-font-size: em(34px) !default
39
+ $m-type-h2-font-size: em(28px) !default
40
+ $m-type-h3-font-size: em(24px) !default
41
+ $m-type-h4-font-size: em(20px) !default
42
+ $m-type-h5-font-size: em(18px) !default
43
+ $m-type-h6-font-size: em(16px) !default
44
+
45
+
46
+ /* Paragraphs
47
+ ----------------------------------------------------------------------------------------------------------------------
48
+
49
+ $m-type-p-line-height: 180% !default
50
+ $m-type-p-margin-bottom: em(20px) !default
51
+
52
+
53
+ /* List
54
+ ----------------------------------------------------------------------------------------------------------------------
55
+
56
+ $m-type-list-margin-side: $m-global-margin-size * 2 !default
57
+ $m-type-list-margin-bottom: $m-type-p-margin-bottom !default
58
+ $m-type-list-line-height: $m-type-p-line-height !default
59
+
60
+
61
+ /* Minor elements
62
+ ----------------------------------------------------------------------------------------------------------------------
63
+
64
+ // <small>
65
+ $m-type-small-font-size: 60% !default
66
+
67
+ // <small> in headers
68
+ $m-type-h-small-font-color: $m-type-text-color-blur-more !default
69
+
70
+ // <aside>
71
+ $m-type-aside-font-size: em(14px) !default
72
+ $m-type-aside-line-height: $m-type-base-line-height !default
73
+
74
+ // <hr>
75
+ $m-type-hr-border: $m-ui-border-default !default
76
+ $m-type-hr-margin: $m-global-margin-size 0 !default
77
+
78
+ // <blockquote> and <cite> within <blockquote>
79
+ $m-type-blockquote-font-color: $m-type-text-color-blur !default
80
+ $m-type-blockquote-padding: $m-global-margin-size / 2 $m-global-margin-size !default
81
+ $m-type-blockquote-border: $m-ui-border-default !default
82
+ $m-type-blockquote-cite-font-size: em(14px) !default
83
+ $m-type-blockquote-cite-font-color: $m-type-text-color-blur-more !default
84
+ $m-type-blockquote-cite-a-color: $m-type-blockquote-cite-font-color !default
@@ -0,0 +1,30 @@
1
+
2
+ /* Borders
3
+ -------------------------------------------------------------------------------------------------------------------
4
+ Base variables
5
+
6
+ $m-ui-border-size-default: 1px !default
7
+ $m-ui-border-style-default: solid !default
8
+ $m-ui-border-color-default: #ddd !default
9
+ $m-ui-border-default: $m-ui-border-size-default $m-ui-border-style-default $m-ui-border-color-default !default
10
+
11
+ // Radius
12
+ $m-ui-border-radius-small: 5px !default
13
+ $m-ui-border-radius-medium: 2*$m-ui-border-radius-small !default
14
+ $m-ui-border-radius-big: 2*$m-ui-border-radius-medium !default
15
+
16
+ /* Mixins
17
+ -------------------------------------------------------------------------------------------------------------------
18
+
19
+ // Borders
20
+ =m-ui-border-default
21
+ border: $m-ui-border-default
22
+
23
+ =m-ui-border-radius($size: 'small')
24
+ @if $size == 'big'
25
+ +border-radius($m-ui-border-radius-big)
26
+ @else if $size == 'medium'
27
+ +border-radius($m-ui-border-radius-medium)
28
+ @else
29
+ +border-radius($m-ui-border-radius-small)
30
+
@@ -0,0 +1,6 @@
1
+
2
+ /* Requires
3
+ /* - Configs: global, grid
4
+
5
+ @import "grid/_base"
6
+ @import "grid/_media"
@@ -0,0 +1,18 @@
1
+
2
+ .left
3
+ float: left
4
+
5
+ .right
6
+ float: right
7
+
8
+ .text-left
9
+ text-align: left
10
+
11
+ .text-right
12
+ text-align: right
13
+
14
+ .text-center
15
+ text-align: center
16
+
17
+ .hide
18
+ display: none
@@ -0,0 +1,2 @@
1
+
2
+ @import 'media/_print'
@@ -0,0 +1,215 @@
1
+
2
+ /* Requires
3
+ /* - Configs: global, type
4
+
5
+
6
+ /* Mixins
7
+ ----------------------------------------------------------------------------------------------------------------------
8
+
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
20
+
21
+
22
+ /* Reset
23
+ ----------------------------------------------------------------------------------------------------------------------
24
+
25
+ div, dl, dt, dd, ul, ol, li, h1, h2, h3, h4, h5, h6, pre, form, p, blockquote, th, td
26
+ margin: 0
27
+ padding: 0
28
+ direction: $m-global-direction
29
+
30
+ /* Base
31
+ ----------------------------------------------------------------------------------------------------------------------
32
+
33
+ html
34
+ -ms-text-size-adjust: 100%
35
+ -webkit-text-size-adjust: 100%
36
+
37
+ body
38
+ margin: 0
39
+ 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
44
+
45
+ article, aside, details, figcaption, figure, footer, header, hgroup, main, nav, section, summary
46
+ display: block
47
+
48
+ audio, canvas, video
49
+ display: inline-block
50
+
51
+ [hidden]
52
+ display: none
53
+
54
+ audio:not([controls])
55
+ display: none
56
+ height: 0
57
+
58
+ p
59
+ line-height: $m-type-p-line-height
60
+ margin-bottom: $m-type-p-margin-bottom
61
+
62
+ aside
63
+ font-size: $m-type-aside-font-size
64
+
65
+ blockquote
66
+ margin: 0 0 $m-type-p-margin-bottom
67
+ padding: $m-type-blockquote-padding
68
+ border-#{$m-global-float-base}: $m-type-blockquote-border
69
+ color: $m-type-blockquote-font-color
70
+ p:last-child
71
+ margin-bottom: 0
72
+ cite
73
+ font-size: $m-type-blockquote-cite-font-size
74
+ color: $m-type-blockquote-cite-font-color
75
+ &:before
76
+ content: "\2014 \0020"
77
+ a
78
+ color: $m-type-blockquote-cite-a-color
79
+
80
+ em, i, dfn
81
+ font-style: italic
82
+
83
+ strong, b
84
+ font-weight: bold
85
+
86
+ small
87
+ font-size: $m-type-small-font-size
88
+
89
+ code, kbd, pre, samp
90
+ font-family: Monaco, Consolas, "Lucida Console", monospace
91
+ font-size: .9em
92
+
93
+ pre
94
+ white-space: pre-wrap
95
+
96
+ q
97
+ quotes: "\201C" "\201D" "\2018" "\2019"
98
+
99
+ sub, sup
100
+ font-size: 75%
101
+ line-height: 0
102
+ position: relative
103
+ vertical-align: baseline
104
+
105
+ sup
106
+ top: -0.5em
107
+
108
+ sub
109
+ bottom: -0.25em
110
+
111
+ mark
112
+ background: #ff0
113
+ color: #000
114
+
115
+ abbr, acronym
116
+ text-transform: uppercase
117
+ font-size: 90%
118
+ border-bottom: 1px dotted #ddd
119
+ cursor: help
120
+
121
+ abbr
122
+ text-transform: none
123
+
124
+ abbr[title]
125
+ border-bottom: 1px dotted
126
+
127
+ hr
128
+ border: $m-type-hr-border
129
+ margin: $m-type-hr-margin
130
+ clear: both
131
+ height: 0
132
+ -moz-box-sizing: content-box
133
+ box-sizing: content-box
134
+
135
+ svg:not(:root)
136
+ overflow: hidden
137
+
138
+ figure
139
+ margin: 0
140
+
141
+ /* Headers
142
+ ----------------------------------------------------------------------------------------------------------------------
143
+
144
+ h1, h2, h3, h4, h5, h6
145
+ margin: $m-type-h-margin
146
+ line-height: $m-type-h-line-height
147
+ small
148
+ color: $m-type-h-small-font-color
149
+
150
+ h1
151
+ font-size: $m-type-h1-font-size
152
+ h2
153
+ font-size: $m-type-h2-font-size
154
+ h3
155
+ font-size: $m-type-h3-font-size
156
+ h4
157
+ font-size: $m-type-h4-font-size
158
+ h5
159
+ font-size: $m-type-h5-font-size
160
+ h6
161
+ font-size: $m-type-h6-font-size
162
+
163
+ /* Links
164
+ ----------------------------------------------------------------------------------------------------------------------
165
+
166
+ a
167
+ text-decoration: $m-type-a-text-decoration
168
+ color: $m-type-a-color-base
169
+ &:hover, &:focus
170
+ outline: none
171
+ color: $m-type-a-color-hover
172
+ img
173
+ border: none
174
+
175
+ /* Lists
176
+ ----------------------------------------------------------------------------------------------------------------------
177
+
178
+ ul, ol, dl
179
+ margin-bottom: $m-type-list-margin-bottom
180
+
181
+ ul, ol
182
+ line-height: $m-type-list-line-height
183
+ margin-#{$m-global-float-base}: $m-type-list-margin-side
184
+ li
185
+ ul, ol
186
+ margin-bottom: 0
187
+
188
+ ul
189
+ &.square, &.circle, &.disc
190
+ li ul
191
+ list-style: inherit
192
+ &.square
193
+ list-style-type: square
194
+ &.circle
195
+ list-style-type: circle
196
+ &.disc
197
+ list-style-type: disc
198
+ &.no-bullet
199
+ list-style: none
200
+ &.inline
201
+ +m-type-list-inline
202
+
203
+ dl
204
+ dt
205
+ margin-bottom: .3em
206
+ font-weight: bold
207
+ dd
208
+ margin-bottom: em(12px)
209
+
210
+ /* Images
211
+ ----------------------------------------------------------------------------------------------------------------------
212
+
213
+ img
214
+ display: inline-block
215
+ vertical-align: middle