mai 0.0.3 → 0.0.5

Sign up to get free protection for your applications and to get access to all the features.
Files changed (41) hide show
  1. data/README.md +1 -1
  2. data/lib/mai/version.rb +1 -1
  3. data/sass/mai/_base.sass +21 -0
  4. data/sass/mai/_config.sass +23 -2
  5. data/sass/mai/base/_base.sass +23 -13
  6. data/sass/mai/base/_helpers.sass +19 -6
  7. data/sass/mai/config/_base.sass +11 -5
  8. data/sass/mai/config/_colors.sass +42 -11
  9. data/sass/mai/config/_global.sass +13 -15
  10. data/sass/mai/config/_media.sass +49 -13
  11. data/sass/mai/config/modules/_grid.sass +181 -0
  12. data/sass/mai/modules/_grid.sass +12 -3
  13. data/sass/mai/modules/_transitions.sass +29 -0
  14. data/sass/mai/modules/_ui.sass +21 -0
  15. data/sass/mai/modules/grid/_base.sass +23 -143
  16. data/sass/mai/modules/grid/_block.sass +3 -0
  17. data/sass/mai/modules/grid/_media.sass +2 -1
  18. data/sass/mai/modules/grid/media/_base.sass +14 -88
  19. data/sass/mai/modules/grid/media/_block.sass +9 -0
  20. data/sass/mai/modules/transitions/_base.sass +38 -0
  21. data/sass/mai/modules/transitions/_bounce.sass +38 -0
  22. data/sass/mai/modules/transitions/_fade.sass +143 -0
  23. data/sass/mai/modules/transitions/_flash.sass +25 -0
  24. data/sass/mai/modules/transitions/_flip.sass +117 -0
  25. data/sass/mai/modules/transitions/_pulse.sass +44 -0
  26. data/sass/mai/modules/transitions/_scale.sass +61 -0
  27. data/sass/mai/modules/transitions/_shake.sass +38 -0
  28. data/sass/mai/modules/transitions/_slide.sass +82 -0
  29. data/sass/mai/modules/transitions/_tada.sass +52 -0
  30. data/sass/mai/themes/_pinky.sass +10 -0
  31. data/sass/mai/themes/pinky/_colors.sass +0 -1
  32. data/sass/mai/utils/_context.sass +44 -12
  33. data/sass/mai/utils/_global.sass +9 -5
  34. data/sass/mai/utils/_media.sass +33 -17
  35. data/sass/mai/utils/_mobile.sass +8 -4
  36. data/sass/mai/utils/_rgba.sass +37 -8
  37. data/sass/mai/utils/_ui.sass +11 -26
  38. metadata +25 -7
  39. checksums.yaml +0 -15
  40. data/sass/mai/config/_grid.sass +0 -17
  41. data/sass/mai/modules/grid/_functions.sass +0 -11
@@ -1,6 +1,15 @@
1
-
2
- /* Requires
3
- /* - Configs: global, grid
1
+ /*
2
+ * Grid
3
+ *
4
+ * Requires
5
+ * - Modules: mai/base
6
+ * - Configs: global, modules/grid
7
+ *
8
+ * @package Mai/UI
9
+ * @copyright 2013-2014 Muyo
10
+ * @link http://github.com/muyo/mai
11
+ * ------------------------------------------------------------------------------------------------------------------- /
4
12
 
5
13
  @import grid/base
14
+ @import grid/block
6
15
  @import grid/media
@@ -0,0 +1,29 @@
1
+ /*
2
+ * Tranisitions
3
+ *
4
+ * The Transitions module provides numerous CSS transitions which can be used via CSS alone or triggered using
5
+ * JavaScript.
6
+ *
7
+ * The 'transitions/base' module is not being imported here as each specific transition imports it already
8
+ * to make it easier to include just a subset of them and avoid bloating your stylesheets. Some of the JS-related
9
+ * modules of Mai (mai/ui/dropdown for instance) required specific transition definitions to be present in your
10
+ * stylesheet.
11
+ *
12
+ * Requires
13
+ * - Modules: mai/base
14
+ * - Configs: global
15
+ *
16
+ * @package Mai/Transitions
17
+ * @copyright 2013-2014 Muyo
18
+ * @link http://github.com/muyo/mai
19
+ * ------------------------------------------------------------------------------------------------------------------- /
20
+
21
+ @import transitions/bounce
22
+ @import transitions/fade
23
+ @import transitions/flash
24
+ @import transitions/flip
25
+ @import transitions/pulse
26
+ @import transitions/scale
27
+ @import transitions/shake
28
+ @import transitions/slide
29
+ @import transitions/tada
@@ -0,0 +1,21 @@
1
+ /*
2
+ * UI
3
+ *
4
+ * Requires
5
+ * - Modules: mai/base
6
+ * - Configs: global
7
+ *
8
+ * @package Mai/UI
9
+ * @copyright 2013-2014 Muyo
10
+ * @link http://github.com/muyo/mai
11
+ * ------------------------------------------------------------------------------------------------------------------- /
12
+
13
+ @import ui/buttons
14
+ @import ui/dimmer
15
+ @import ui/dropdown
16
+ @import ui/forms
17
+ @import ui/icons
18
+ @import ui/labels
19
+ @import ui/messages
20
+ @import ui/modal
21
+ @import ui/popup
@@ -1,153 +1,33 @@
1
1
 
2
- @import functions
2
+ // Grid defaults to get images and embeds to work properly
3
+ img, object, embed
4
+ max-width: 100%
5
+ height: auto
3
6
 
4
- *, *:before, *:after
5
- +box-sizing
7
+ object, embed
8
+ height: 100%
9
+
10
+ img
11
+ -ms-interpolation-mode: bicubic
6
12
 
13
+ // Actual grid
7
14
  .row
8
- width: $m-grid-width
9
- max-width: 100%
10
- min-width: $m-grid-breakpoint
11
- margin: 0 auto
15
+ +m-grid-row()
12
16
  &.collapse
13
- .column, .columns
14
- padding: 0
17
+ > .columns
18
+ +m-grid-column($collapse: true)
19
+ .row
20
+ margin-left: 0
21
+ margin-right: 0
15
22
  .row
16
- width: auto
17
- max-width: none
18
- min-width: 0
19
- margin: 0 (-$m-grid-gutter-single)
23
+ +m-grid-row($behavior: nest)
20
24
  &.collapse
21
- margin: 0
22
-
23
- .row.as-column
24
- padding: 0 $m-grid-gutter-single
25
-
26
- /* Columns
27
-
28
- .column, .columns
29
- float: $m-global-float-base
30
- min-height: 1px
31
- padding: 0 $m-grid-gutter-single
32
- position: relative
33
- &.centered
34
- float: none
35
- margin: 0 auto
36
-
37
- [class*="column"] + [class*="column"]:last-child
38
- float: right
39
-
40
- [class*="column"] + [class*="column"].end
41
- float: left
42
-
43
- // Batch - .one, .two, .three (...)
44
- @for $i from 1 through $m-grid-columns
45
- .#{gridVerbalize($i)}
46
- width: gridColumnWidth($i, $m-grid-columns)
47
-
48
- // Batch - .row .one, .row .two, .row .three (...)
49
- @for $i from 1 through $m-grid-columns
50
- $num: gridVerbalize($i)
51
- .row
52
- .#{$num}
53
- @extend .#{$num}
54
-
55
- .row .offset-by-one
56
- margin-left: 8.33333%
57
-
58
- .row .offset-by-two
59
- margin-left: 16.66667%
60
-
61
- .row .offset-by-three
62
- margin-left: 25%
63
-
64
- .row .offset-by-four
65
- margin-left: 33.33333%
66
-
67
- .row .offset-by-five
68
- margin-left: 41.66667%
69
-
70
- .row .offset-by-six
71
- margin-left: 50%
72
-
73
- .row .offset-by-seven
74
- margin-left: 58.33333%
75
-
76
- .row .offset-by-eight
77
- margin-left: 66.66667%
78
-
79
- .row .offset-by-nine
80
- margin-left: 75%
81
-
82
- .row .offset-by-ten
83
- margin-left: 83.33333%
84
-
85
- .push-two
86
- left: 16.66667%
25
+ +m-grid-row($behavior: nest-collapse)
26
+ &.single
27
+ padding-right: $m-grid-gutter-single
28
+ padding-left: $m-grid-gutter-single
87
29
 
88
- .pull-two
89
- right: 16.66667%
30
+ .columns
31
+ +m-grid-column($columns: $m-grid-columns)
90
32
 
91
- .push-three
92
- left: 25%
93
33
 
94
- .pull-three
95
- right: 25%
96
-
97
- .push-four
98
- left: 33.33333%
99
-
100
- .pull-four
101
- right: 33.33333%
102
-
103
- .push-five
104
- left: 41.66667%
105
-
106
- .pull-five
107
- right: 41.66667%
108
-
109
- .push-six
110
- left: 50%
111
-
112
- .pull-six
113
- right: 50%
114
-
115
- .push-seven
116
- left: 58.33333%
117
-
118
- .pull-seven
119
- right: 58.33333%
120
-
121
- .push-eight
122
- left: 66.66667%
123
-
124
- .pull-eight
125
- right: 66.66667%
126
-
127
- .push-nine
128
- left: 75%
129
-
130
- .pull-nine
131
- right: 75%
132
-
133
- .push-ten
134
- left: 83.33333%
135
-
136
- .pull-ten
137
- right: 83.33333%
138
-
139
- // Micro-clearfix
140
- .row
141
- +cf()
142
-
143
-
144
- // Grid Defaults to get images and embeds to work properly
145
- img, object, embed
146
- max-width: 100%
147
- height: auto
148
-
149
- object, embed
150
- height: 100%
151
-
152
- img
153
- -ms-interpolation-mode: bicubic
@@ -0,0 +1,3 @@
1
+
2
+ [class*="block-grid-"]
3
+ +m-block-grid
@@ -1,2 +1,3 @@
1
1
 
2
- @import media/base
2
+ @import media/base
3
+ @import media/block
@@ -1,89 +1,15 @@
1
1
 
2
- @media #{$m-media-query-breakpoint}
3
- .left, .right
4
- float: none
5
- body
6
- -webkit-text-size-adjust: none
7
- -ms-text-size-adjust: none
8
- width: 100%
9
- min-width: 0
10
- margin-left: 0
11
- margin-right: 0
12
- padding-left: 0
13
- padding-right: 0
14
- .row
15
- width: auto
16
- min-width: 320px
17
- margin-left: 0
18
- margin-right: 0
19
- .column, .columns
20
- width: auto !important
21
- float: none
22
- .column:last-child, .columns:last-child
23
- float: none
24
- [class*="column"] + [class*="column"]:last-child
25
- float: none
26
- .column:before, .columns:before, .column:after, .columns:after
27
- content: ""
28
- display: table
29
- .column:after, .columns:after
30
- clear: both
31
- .offset-by-one, .offset-by-two, .offset-by-three, .offset-by-four, .offset-by-five, .offset-by-six, .offset-by-seven, .offset-by-eight, .offset-by-nine, .offset-by-ten
32
- margin-left: 0 !important
33
- .push-two, .push-three, .push-four, .push-five, .push-six, .push-seven, .push-eight, .push-nine, .push-ten
34
- left: auto
35
- .pull-two, .pull-three, .pull-four, .pull-five, .pull-six, .pull-seven, .pull-eight, .pull-nine, .pull-ten
36
- right: auto
37
- /* Mobile 4-column Grid
38
- .row .mobile-one
39
- width: 25% !important
40
- float: left
41
- padding: 0 15px
42
- .row .mobile-one:last-child
43
- float: right
44
- .row .mobile-one.end
45
- float: left
46
- .row.collapse .mobile-one
47
- padding: 0
48
- .row .mobile-two
49
- width: 50% !important
50
- float: left
51
- padding: 0 15px
52
- .row .mobile-two:last-child
53
- float: right
54
- .row .mobile-two.end
55
- float: left
56
- .row.collapse .mobile-two
57
- padding: 0
58
- .row .mobile-three
59
- width: 75% !important
60
- float: left
61
- padding: 0 15px
62
- .row .mobile-three:last-child
63
- float: right
64
- .row .mobile-three.end
65
- float: left
66
- .row.collapse .mobile-three
67
- padding: 0
68
- .row .mobile-four
69
- width: 100% !important
70
- float: left
71
- padding: 0 15px
72
- .row .mobile-four:last-child
73
- float: right
74
- .row .mobile-four.end
75
- float: left
76
- .row.collapse .mobile-four
77
- padding: 0
78
- .push-one-mobile
79
- left: 25%
80
- .pull-one-mobile
81
- right: 25%
82
- .push-two-mobile
83
- left: 50%
84
- .pull-two-mobile
85
- right: 50%
86
- .push-three-mobile
87
- left: 75%
88
- .pull-three-mobile
89
- right: 75%
2
+ @media #{$m-media-query-s-up}
3
+ +m-grid-html-classes($size: small)
4
+
5
+ @media #{$m-media-query-m-up}
6
+ +m-grid-html-classes($size: medium)
7
+
8
+ @media #{$m-media-query-l-up}
9
+ +m-grid-html-classes($size: large)
10
+
11
+ @media #{$m-media-query-xl-up}
12
+ +m-grid-html-classes($size: xlarge)
13
+
14
+ @media #{$m-media-query-xxl-up}
15
+ +m-grid-html-classes($size: xxlarge)
@@ -0,0 +1,9 @@
1
+
2
+ @media #{$m-media-query-s-up}
3
+ +m-block-grid-html-classes($size: small)
4
+
5
+ @media #{$m-media-query-m-up}
6
+ +m-block-grid-html-classes($size: medium)
7
+
8
+ @media #{$m-media-query-l-up}
9
+ +m-block-grid-html-classes($size: large)
@@ -0,0 +1,38 @@
1
+
2
+ /* Base transition definition
3
+ ----------------------------------------------------------------------------------------------------------------------
4
+
5
+ .transition
6
+ -webkit-animation-iteration-count: 1
7
+ animation-iteration-count: 1
8
+ -webkit-animation-duration: 1s
9
+ animation-duration: 1s
10
+ -webkit-animation-timing-function: ease
11
+ animation-timing-function: ease
12
+ -webkit-animation-fill-mode: both
13
+ animation-fill-mode: both
14
+
15
+ &.animating
16
+ -webkit-backface-visibility: hidden
17
+ -ms-backface-visibility: hidden
18
+ backface-visibility: hidden
19
+ -webkit-transform: translateZ(0)
20
+ -ms-transform: translateZ(0)
21
+ transform: translateZ(0)
22
+
23
+ &.loading
24
+ position: absolute
25
+ top: -99999px
26
+ left: -99999px
27
+
28
+ &.visible
29
+ display: block
30
+ visibility: visible
31
+
32
+ &.disabled
33
+ -webkit-animation-play-state: paused
34
+ animation-play-state: paused
35
+
36
+ &.looping
37
+ -webkit-animation-iteration-count: infinite
38
+ animation-iteration-count: infinite
@@ -0,0 +1,38 @@
1
+
2
+ @import base
3
+
4
+ /* Definition
5
+ ----------------------------------------------------------------------------------------------------------------------
6
+
7
+ .transition.bounce
8
+ -webkit-animation-name: bounce
9
+ animation-name: bounce
10
+
11
+
12
+ /* Keyframes
13
+ ----------------------------------------------------------------------------------------------------------------------
14
+
15
+ @-webkit-keyframes bounce
16
+ 0%, 20%, 50%, 80%, 100%
17
+ -webkit-transform: translateY(0)
18
+ transform: translateY(0)
19
+ 40%
20
+ -webkit-transform: translateY(-30px)
21
+ transform: translateY(-30px)
22
+ 60%
23
+ -webkit-transform: translateY(-15px)
24
+ transform: translateY(-15px)
25
+
26
+ @keyframes bounce
27
+ 0%, 20%, 50%, 80%, 100%
28
+ -webkit-transform: translateY(0)
29
+ -ms-transform: translateY(0)
30
+ transform: translateY(0)
31
+ 40%
32
+ -webkit-transform: translateY(-30px)
33
+ -ms-transform: translateY(-30px)
34
+ transform: translateY(-30px)
35
+ 60%
36
+ -webkit-transform: translateY(-15px)
37
+ -ms-transform: translateY(-15px)
38
+ transform: translateY(-15px)