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
@@ -0,0 +1,52 @@
1
+
2
+ @import base
3
+
4
+ /* Definition
5
+ ----------------------------------------------------------------------------------------------------------------------
6
+
7
+ .transition.tada
8
+ -webkit-animation-name: tada
9
+ animation-name: tada
10
+
11
+
12
+ /* Keyframes
13
+ ----------------------------------------------------------------------------------------------------------------------
14
+
15
+ @-webkit-keyframes tada
16
+ 0%
17
+ -webkit-transform: scale(1)
18
+ transform: scale(1)
19
+ 10%, 20%
20
+ -webkit-transform: scale(0.9) rotate(-3deg)
21
+ transform: scale(0.9) rotate(-3deg)
22
+ 30%, 50%, 70%, 90%
23
+ -webkit-transform: scale(1.1) rotate(3deg)
24
+ transform: scale(1.1) rotate(3deg)
25
+ 40%, 60%, 80%
26
+ -webkit-transform: scale(1.1) rotate(-3deg)
27
+ transform: scale(1.1) rotate(-3deg)
28
+ 100%
29
+ -webkit-transform: scale(1) rotate(0)
30
+ transform: scale(1) rotate(0)
31
+
32
+ @keyframes tada
33
+ 0%
34
+ -webkit-transform: scale(1)
35
+ -ms-transform: scale(1)
36
+ transform: scale(1)
37
+ 10%, 20%
38
+ -webkit-transform: scale(0.9) rotate(-3deg)
39
+ -ms-transform: scale(0.9) rotate(-3deg)
40
+ transform: scale(0.9) rotate(-3deg)
41
+ 30%, 50%, 70%, 90%
42
+ -webkit-transform: scale(1.1) rotate(3deg)
43
+ -ms-transform: scale(1.1) rotate(3deg)
44
+ transform: scale(1.1) rotate(3deg)
45
+ 40%, 60%, 80%
46
+ -webkit-transform: scale(1.1) rotate(-3deg)
47
+ -ms-transform: scale(1.1) rotate(-3deg)
48
+ transform: scale(1.1) rotate(-3deg)
49
+ 100%
50
+ -webkit-transform: scale(1) rotate(0)
51
+ -ms-transform: scale(1) rotate(0)
52
+ transform: scale(1) rotate(0)
@@ -1,2 +1,12 @@
1
+ /*
2
+ * Pinky
3
+ *
4
+ * Example theme for Mai intended to demonstrate when and how configuration variables should be set in order to
5
+ * properly overwrite the default in a consistent manner across all modules.
6
+ *
7
+ * @package Mai/Themes
8
+ * @copyright 2013-2014 Muyo
9
+ * @link http://github.com/muyo/mai
10
+ * ------------------------------------------------------------------------------------------------------------------- /
1
11
 
2
12
  @import pinky/colors
@@ -1,4 +1,3 @@
1
-
2
1
  /* Pinky Theme colors
3
2
  ----------------------------------------------------------------------------------------------------------------------
4
3
 
@@ -1,25 +1,35 @@
1
+ /*
2
+ * Context switcher for targeted stylesheets.
3
+ *
4
+ * Currently a near-copypasta from Jacket (git://github.com/Team-Sass/jacket.git).
5
+ *
6
+ * @package Mai/Utils
7
+ * @copyright 2013-2014 Muyo
8
+ * @link http://github.com/muyo/mai
9
+ * ------------------------------------------------------------------------------------------------------------------- /
1
10
 
2
- /* Context switcher for targeted stylesheets.
3
- ----------------------------------------------------------------------------------------------------------------------
4
- Currently a copypasta from Jacket (git://github.com/Team-Sass/jacket.git).
11
+ $context: null !default // Default list of contexts.
12
+ $_context: null // Private variable.
5
13
 
6
14
 
7
- $m-context: null !default
8
- $m-_context: null
15
+ /* -------------------------------------------------------------------------------------------------------------------
16
+ * Context mixin
17
+ * Takes a list of contexts and outputs a block of styles if a context is set.
18
+ * ------------------------------------------------------------------------------------------------------------------- /
9
19
 
10
- =context($args...)
20
+ @mixin context($contexts...)
11
21
  $matches: false
12
22
  $selectors: ()
13
23
  $filtered: ()
14
24
  $selector-string: ''
15
25
 
16
- $m-_context: $args
26
+ $_context: $contexts !global
17
27
 
18
- @if list-separator($m-context) == 'space'
19
- $m-context: $m-context, null
28
+ @if list-separator($context) == 'space'
29
+ $m-context: $context, null !global
20
30
 
21
- @each $item in $m-context
22
- @each $arg in $args
31
+ @each $item in $context
32
+ @each $arg in $contexts
23
33
  @if index($arg, nth($item, 1))
24
34
  @if length($item) == 1
25
35
  $matches: true
@@ -42,5 +52,27 @@ $m-_context: null
42
52
  #{$selector-string}
43
53
  @content
44
54
 
55
+
56
+ /* -------------------------------------------------------------------------------------------------------------------
57
+ * Context function
58
+ * Takes a list of contexts and outputs a value if a context is set.
59
+ * ------------------------------------------------------------------------------------------------------------------- /
60
+
61
+ @function context($value, $contexts...)
62
+
63
+ @each $item in $context
64
+ @each $context in $contexts
65
+ @if index($context, nth($item, 1))
66
+ @return $value
67
+
68
+ // Else return null. If null is the only value for a selector, the selector will not be printed.
69
+ @return null
70
+
71
+
72
+ /* -------------------------------------------------------------------------------------------------------------------
73
+ * Mai-context function
74
+ * Takes a context value. Use when code inside a context needs to know if a specific context is set.
75
+ * ------------------------------------------------------------------------------------------------------------------- /
76
+
45
77
  @function mai-context($arg)
46
- @return if(index($m-_context, $arg), true, false)
78
+ @return if(index($_context, $arg), true, false)
@@ -1,8 +1,12 @@
1
-
2
- /* Global mixins
3
- ----------------------------------------------------------------------------------------------------------------------
4
- Mixins that are generic enough to be easily used outside of Mai, even if prefixed with 'm-'.
5
-
1
+ /*
2
+ * Global utilities
3
+ *
4
+ * Utilities that are generic enough to be easily used outside of Mai.
5
+ *
6
+ * @package Mai/Utils
7
+ * @copyright 2013-2014 Muyo
8
+ * @link http://github.com/muyo/mai
9
+ * ------------------------------------------------------------------------------------------------------------------- /
6
10
 
7
11
  =box-sizing($type: border-box)
8
12
  -moz-box-sizing: $type
@@ -1,23 +1,39 @@
1
+ /*
2
+ * Media query helper utilities
3
+ *
4
+ * @package Mai/Utils
5
+ * @copyright 2013-2014 Muyo
6
+ * @link http://github.com/muyo/mai
7
+ * ------------------------------------------------------------------------------------------------------------------- /
1
8
 
2
- /* Media query helper utilities
3
- ----------------------------------------------------------------------------------------------------------------------
4
- Requires
5
- - Configs: media, grid
6
-
7
-
8
- =for($size, $type: 'screen')
9
- @if $size == 'breakpoint'
10
- @media #{$m-media-query-breakpoint}
9
+ =for($size, $type: 'up')
10
+ @if $size == 'small' and $type == 'up'
11
+ @media #{$m-media-query-s-up}
12
+ @content
13
+ @else if $size == 'small' and $type == 'only'
14
+ @media #{$m-media-query-s-only}
15
+ @content
16
+ @else if $size == 'medium' and $type == 'up'
17
+ @media #{$m-media-query-m-up}
18
+ @content
19
+ @else if $size == 'medium' and $type == 'only'
20
+ @media #{$m-media-query-m-only}
21
+ @content
22
+ @else if $size == 'large' and $type == 'up'
23
+ @media #{$m-media-query-l-up}
24
+ @content
25
+ @else if $size == 'large' and $type == 'only'
26
+ @media #{$m-media-query-l-only}
11
27
  @content
12
- @if $size == 'small' and $type == 'screen'
13
- @media #{$m-media-query-small}
28
+ @else if $size == 'xlarge' and $type == 'up'
29
+ @media #{$m-media-query-xl-up}
14
30
  @content
15
- @else if $size == 'medium' and $type == 'screen'
16
- @media #{$m-media-query-medium}
31
+ @else if $size == 'xlarge' and $type == 'only'
32
+ @media #{$m-media-query-xl-only}
17
33
  @content
18
- @else if $size == 'large' and $type == 'screen'
19
- @media #{$m-media-query-large}
34
+ @else if $size == 'xxlarge' and $type == 'up'
35
+ @media #{$m-media-query-xxl-up}
20
36
  @content
21
- @else if $size == 'xlarge' and $type == 'screen'
22
- @media #{$m-media-query-xlarge}
37
+ @else if $size == 'xxlarge' and $type == 'only'
38
+ @media #{$m-media-query-xxl-only}
23
39
  @content
@@ -1,10 +1,14 @@
1
-
2
- /* Utils for mobile browsers
3
- ----------------------------------------------------------------------------------------------------------------------
1
+ /*
2
+ * Utilities for mobile devices
3
+ *
4
+ * @package Mai/Utils
5
+ * @copyright 2013-2014 Muyo
6
+ * @link http://github.com/muyo/mai
7
+ * ------------------------------------------------------------------------------------------------------------------- /
4
8
 
5
9
  =kill-mobile-zoom
6
10
  -webkit-text-size-adjust: 100%
7
11
  -ms-text-size-adjust: none
8
12
 
9
13
  =kill-tap-highlight
10
- -webkit-tap-highlight-color: rgba(0,0,0,0)
14
+ -webkit-tap-highlight-color: rgba(black, 0)
@@ -1,18 +1,47 @@
1
+ /*
2
+ * RGBA Utilities
3
+ *
4
+ * Requires the 'compass-rgbapng' gem (https://github.com/aaronrussell/compass-rgbapng) to be installed.
5
+ *
6
+ * @package Mai/Utils
7
+ * @copyright 2013-2014 Muyo
8
+ * @link http://github.com/muyo/mai
9
+ * ------------------------------------------------------------------------------------------------------------------- /
1
10
 
2
11
  @import rgbapng
3
12
 
13
+ $rgba-bg-img-path: 'png' !default
14
+ $rgba-bg-img-size: 5 !default
15
+ $rgba-bg-opacity: .75 !default
4
16
 
5
- /* RGBA utilities
17
+ /* Functions
6
18
  ----------------------------------------------------------------------------------------------------------------------
7
- Requires
8
- - Gems: rgbapng
9
19
 
20
+ @function rgba-png($color, $opacity: $rgba-bg-opacity, $path: $rgba-bg-img-path, $size: $rgba-bg-img-size)
21
+ @return image_url(png_pixelate(rgba($color, $opacity), $path, $size))
10
22
 
11
- $path-in-img-rgba-png: 'png' !default
12
- $rgbapng_path: $path-in-img-rgba-png !default
23
+ @function rgba-inline($color, $opacity: $rgba-bg-opacity, $size: $rgba-bg-img-size)
24
+ @return png_base64(rgba($color, $opacity), $size)
13
25
 
14
26
 
15
- =bg-rgba-fallback($color, $opacity: $bg-opacity-base)
27
+ /* -------------------------------------------------------------------------------------------------------------------
28
+ * Mixin: RGBA Background
29
+ * Mixes in a RGBA background with fallback to a base color and an opaque, external .png image.
30
+ * ------------------------------------------------------------------------------------------------------------------- /
31
+
32
+ @mixin rgba-bg($color, $opacity: $rgba-bg-opacity, $path: $rgba-bg-img-path, $size: $rgba-bg-img-size)
33
+ background: $color
34
+ background: rgba-png($color, $opacity, $path, $size)
35
+ background: rgba($color, $opacity)
36
+
37
+
38
+ /* -------------------------------------------------------------------------------------------------------------------
39
+ * Mixin: RGBA Background (inline)
40
+ * Mixes in a RGBA background with fallback to a base color and an opaque, inline (base64 encoded) .png image.
41
+ * ------------------------------------------------------------------------------------------------------------------- /
42
+
43
+ @mixin rgba-bg-inline($color, $opacity: $rgba-bg-opacity, $size: $rgba-bg-img-size)
16
44
  background: $color
17
- background: image-url((png_pixelate(rgba($color, $opacity), $path-in-img-rgba-png)))
18
- background: rgba($color, $opacity)
45
+ background: rgba-inline($color, $opacity, $size)
46
+ background: rgba($color, $opacity)
47
+
@@ -1,14 +1,12 @@
1
-
2
- @import "media"
3
-
4
-
5
- /* UI utilities
6
- ----------------------------------------------------------------------------------------------------------------------
7
- Requires
8
- - Utils: media
9
-
10
-
11
- =cf()
1
+ /*
2
+ * UI Utilities
3
+ *
4
+ * @package Mai/Utils
5
+ * @copyright 2013-2014 Muyo
6
+ * @link http://github.com/muyo/mai
7
+ * ------------------------------------------------------------------------------------------------------------------- /
8
+
9
+ @mixin cf()
12
10
  *zoom: 1
13
11
  &:before, &:after
14
12
  content: " "
@@ -16,18 +14,5 @@
16
14
  &:after
17
15
  clear: both
18
16
 
19
- =clearfix()
20
- +cf()
21
-
22
- =cfBreakpoint()
23
- +for('breakpoint')
24
- &:before, &:after
25
- content: " "
26
- display: table
27
- &:after
28
- clear: both
29
- &:last-child
30
- float: none
31
-
32
- =clearfixBreakpoint()
33
- +cfBreakpoint()
17
+ @mixin clearfix()
18
+ +cf()
metadata CHANGED
@@ -1,18 +1,20 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: mai
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.3
4
+ version: 0.0.5
5
+ prerelease:
5
6
  platform: ruby
6
7
  authors:
7
8
  - Muyo
8
9
  autorequire:
9
10
  bindir: bin
10
11
  cert_chain: []
11
- date: 2013-06-06 00:00:00.000000000 Z
12
+ date: 2014-07-03 00:00:00.000000000 Z
12
13
  dependencies:
13
14
  - !ruby/object:Gem::Dependency
14
15
  name: sass
15
16
  requirement: !ruby/object:Gem::Requirement
17
+ none: false
16
18
  requirements:
17
19
  - - ! '>='
18
20
  - !ruby/object:Gem::Version
@@ -20,6 +22,7 @@ dependencies:
20
22
  type: :runtime
21
23
  prerelease: false
22
24
  version_requirements: !ruby/object:Gem::Requirement
25
+ none: false
23
26
  requirements:
24
27
  - - ! '>='
25
28
  - !ruby/object:Gem::Version
@@ -49,14 +52,27 @@ files:
49
52
  - sass/mai/config/_base.sass
50
53
  - sass/mai/config/_colors.sass
51
54
  - sass/mai/config/_global.sass
52
- - sass/mai/config/_grid.sass
53
55
  - sass/mai/config/_media.sass
56
+ - sass/mai/config/modules/_grid.sass
54
57
  - sass/mai/media/_print.sass
55
58
  - sass/mai/modules/_grid.sass
59
+ - sass/mai/modules/_transitions.sass
60
+ - sass/mai/modules/_ui.sass
56
61
  - sass/mai/modules/grid/_base.sass
57
- - sass/mai/modules/grid/_functions.sass
62
+ - sass/mai/modules/grid/_block.sass
58
63
  - sass/mai/modules/grid/_media.sass
59
64
  - sass/mai/modules/grid/media/_base.sass
65
+ - sass/mai/modules/grid/media/_block.sass
66
+ - sass/mai/modules/transitions/_base.sass
67
+ - sass/mai/modules/transitions/_bounce.sass
68
+ - sass/mai/modules/transitions/_fade.sass
69
+ - sass/mai/modules/transitions/_flash.sass
70
+ - sass/mai/modules/transitions/_flip.sass
71
+ - sass/mai/modules/transitions/_pulse.sass
72
+ - sass/mai/modules/transitions/_scale.sass
73
+ - sass/mai/modules/transitions/_shake.sass
74
+ - sass/mai/modules/transitions/_slide.sass
75
+ - sass/mai/modules/transitions/_tada.sass
60
76
  - sass/mai/themes/_pinky.sass
61
77
  - sass/mai/themes/pinky/_colors.sass
62
78
  - sass/mai/utils/_context.sass
@@ -71,25 +87,27 @@ files:
71
87
  homepage: https://github.com/muyo/mai
72
88
  licenses:
73
89
  - MIT
74
- metadata: {}
75
90
  post_install_message:
76
91
  rdoc_options: []
77
92
  require_paths:
78
93
  - lib
79
94
  required_ruby_version: !ruby/object:Gem::Requirement
95
+ none: false
80
96
  requirements:
81
97
  - - ! '>='
82
98
  - !ruby/object:Gem::Version
83
99
  version: '0'
84
100
  required_rubygems_version: !ruby/object:Gem::Requirement
101
+ none: false
85
102
  requirements:
86
103
  - - ! '>='
87
104
  - !ruby/object:Gem::Version
88
105
  version: '0'
89
106
  requirements: []
90
107
  rubyforge_project:
91
- rubygems_version: 2.0.3
108
+ rubygems_version: 1.8.24
92
109
  signing_key:
93
- specification_version: 4
110
+ specification_version: 3
94
111
  summary: Mai CSS skeleton built on Compass
95
112
  test_files: []
113
+ has_rdoc:
checksums.yaml DELETED
@@ -1,15 +0,0 @@
1
- ---
2
- !binary "U0hBMQ==":
3
- metadata.gz: !binary |-
4
- NGM3MGQyMjA2MzA5OWQyNWYyOGVhZDhhYzM0NTI3OGM4NzAxMTZjMA==
5
- data.tar.gz: !binary |-
6
- MTc1ODc1MjgxMzMwMTEwNGE3YWIzZWVhYzFiNGFlNjNiNWQ1NTQ4Zg==
7
- !binary "U0hBNTEy":
8
- metadata.gz: !binary |-
9
- NjRjZTY1YTg1YjI4NzAwYWZjOTA3OWQ4ZWJiNjVlM2FlMWM0MDVjOGQ0ZTQ4
10
- YjE0MDBkMGRhZGI0ZWI0NmNjODY3MDA4MmNhZDY5MTA1NzhhYTQ2YWMxYjRl
11
- YzViYTFjNTdiZjI3NWQ5Y2RiNmIwNzg1OWFiOTdjNjhkZGZhMDg=
12
- data.tar.gz: !binary |-
13
- ZjBiZWIyZWUwODRiOTRmZDhkYTE3MWEzZWQ1ZTJlMTk5N2NjMTQ5Njc5ODU0
14
- NTBiY2Y0MGMzZWZlZDllYTM2M2RhYzJmNDVjODdjODc1Mzg5MDI3NDU5ZTFl
15
- OWQzMTdhMTBmNTIzNDllMGVkMTg2ZTE4OTczZTUwZDBhYzNjNzY=