cinnamon 0.0.1

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.
@@ -0,0 +1,9 @@
1
+ @import cinnamon/core_additions
2
+ @import cinnamon/default_settings
3
+ @import cinnamon/utilities
4
+ @import cinnamon/type
5
+ @import cinnamon/grid
6
+ @import cinnamon/layout
7
+ @import cinnamon/graphics
8
+ @import cinnamon/fx
9
+ @import cinnamon/reset
@@ -0,0 +1,29 @@
1
+ $base_text_font: Helvetica, Arial, Verdana, sans-serif !default
2
+ $base_text_color: hsl(0,0,10%) !default
3
+
4
+ $base_text_size: 12px !default
5
+ $unitless_base_text_size: $base_text_size / 1px
6
+
7
+ $px2em: 1em / $base_text_size
8
+
9
+ $base_leading: 8px !default
10
+ $unitless_base_leading: $base_leading / 1px
11
+
12
+ $base_line_height: $base_text_size + $base_leading
13
+ //$unitless_base_line_height: $base_line_height / 1px
14
+
15
+ $vertical_rhythm: $px2em * $base_line_height
16
+ $unitless_vertical_rhythm: $vertical_rhythm / 1em
17
+
18
+ $grid: $base_line_height
19
+ $gutter: $grid / 4 !default
20
+
21
+
22
+ $faster: 150ms !default
23
+ $fast: 250ms !default
24
+ $normal: 500ms !default
25
+ $slow: 750ms !default
26
+
27
+
28
+ $default_vertical_alignment: top
29
+ $override_string: !important
@@ -0,0 +1,2 @@
1
+ @import core_additions/css3
2
+ @import core_additions/reset
@@ -0,0 +1,2 @@
1
+ @import fx/hover
2
+ @import fx/skin
@@ -0,0 +1 @@
1
+ @import graphics/shapes
@@ -0,0 +1,2 @@
1
+ @import grid/sizing
2
+ @import grid/translations
@@ -0,0 +1,3 @@
1
+ @import layout/utilities
2
+ @import layout/effects
3
+ @import layout/flow
@@ -0,0 +1 @@
1
+ @import type/type
@@ -0,0 +1 @@
1
+ @import utilities/misc
@@ -0,0 +1,2 @@
1
+ =user-select($value)
2
+ +experimental("user-select",$value)
@@ -0,0 +1,21 @@
1
+ a
2
+ +unstyled-link
3
+ cursor: pointer
4
+
5
+ p, h1, h2, h3, h4, h5, h6, ul
6
+ +flush("y")
7
+
8
+ p,ul
9
+ +push-top(1)
10
+
11
+ ul
12
+ list-style: square
13
+ ol
14
+ list-style: decimal
15
+
16
+ textarea
17
+ border: none
18
+ *
19
+ outline: none !important
20
+ mark
21
+ background: none
@@ -0,0 +1,84 @@
1
+ @mixin fx-indirect-model($indirect_target,$property,$normal: false,$hover:false,$active:false,$speed:$fast)
2
+ #{$indirect_target}
3
+ #{$property}: $normal
4
+
5
+ @if $speed
6
+ #{$indirect_target}
7
+ +transition($property,$speed)
8
+
9
+ @if $hover
10
+ &:hover
11
+ #{$indirect_target}
12
+ #{$property}: $hover
13
+
14
+ @if $active
15
+ &:active
16
+ #{$indirect_target}
17
+ #{$property}: $active
18
+
19
+ @mixin fx-model($property,$normal: false,$hover:false,$active:false,$speed:$fast)
20
+ #{$property}: $normal
21
+
22
+ @if $speed
23
+ +transition($property,$speed)
24
+
25
+ @if $hover
26
+ &:hover
27
+ #{$property}: $hover
28
+
29
+
30
+ @if $active
31
+ &:active
32
+ #{$property}: $active
33
+
34
+ @mixin fx-block-color( $bg_color, $text_color )
35
+ color: $text_color
36
+ background-color: $bg_color
37
+
38
+ @mixin fx-text-decorate( $text_color, $decoration: "underline")
39
+ color: $text_color
40
+ text-decoration: $decoration
41
+
42
+ @mixin fx-block-color-hover($bg_color,$text_color, $padding: 1/3, $radius: 1/10) //todo create option to animate padding or set left backward
43
+ display: block
44
+ +transition("background-color, color",$faster)
45
+ +pad($padding, $padding*1.25)
46
+ +push(-$padding*1.25)
47
+ +border-radius($grid*$radius)
48
+ &:hover
49
+ +fx-block-color($bg_color,$text_color)
50
+
51
+ @mixin decoration-hover($color, $decoration: underline)
52
+ color: $color
53
+ &:hover
54
+ text-decoration: $decoration
55
+
56
+ @mixin colored-hover($color, $speed: $faster)
57
+ +transition("color",$speed)
58
+ &:hover
59
+ color: $color!important
60
+
61
+ @mixin colored-interaction($hover_color, $active_color, $speed: $faster)
62
+ +colored-hover($hover_color, $speed)
63
+ &:active
64
+ // a click occurs over a very short time, if you want to try to see the transition color to its climax then the duration should be no longer than what a click is
65
+ +transition("color",10ms)
66
+ color: $active_color!important
67
+
68
+ @mixin colored-link($normal_color, $active_color, $speed: $faster)
69
+ color: $normal_color
70
+ +colored-interaction($active_color,$normal_color, $speed)
71
+
72
+ @mixin fx-opacity($normal, $hover, $active: false, $speed:$fast)
73
+ +fx-model("opacity",$normal,$hover,$active,$speed)
74
+
75
+ @mixin fx-indirect-opacity($indirect_target,$normal, $hover, $active: false, $speed:$fast)
76
+ +fx-indirect-model($indirect_target,"opacity",$normal,$hover,$active,$speed)
77
+
78
+ @mixin fx($e, $aspect, $a, $b, $animate: false, $speed: $fast)
79
+ @if $animate
80
+ +transition($aspect, $speed)
81
+ #{$aspect}: $a
82
+ &:#{$e}
83
+ #{$aspect}: $b
84
+
@@ -0,0 +1,27 @@
1
+ @mixin unstyled-list
2
+ margin: 0
3
+ padding: 0
4
+ li
5
+ list-style: none
6
+
7
+ @mixin unstyled-button
8
+ border: none
9
+ background: none
10
+ padding: 0
11
+ +box-sizing("content-box")
12
+
13
+ @mixin frame($bg_color: $base_tone, $pady:1, $padx: false)
14
+ background-color: $bg_color
15
+ @if $padx == false
16
+ +pad($pady)
17
+ @else
18
+ +pad($pady,$padx)
19
+
20
+ @mixin overlay($z: 100 )
21
+ z-index: $z
22
+ position: absolute
23
+
24
+ @mixin overlay-container($selector, $z:100)
25
+ position: relative
26
+ #{$selector}
27
+ +overlay($z)
@@ -0,0 +1,20 @@
1
+ =rect($x, $y:false, $override:"")
2
+ @if $y == $override_string
3
+ $override: $y
4
+ $y: $x
5
+ @else if not $y
6
+ $y: $x
7
+
8
+ +span($x, $override)
9
+ +peak($y, $override)
10
+
11
+ =circ($x, $y:false, $override:"")
12
+ @if $y == $override_string
13
+ $override: $y
14
+ $y: $x
15
+ @else if not $y
16
+ $y: $x
17
+
18
+ +span($x, $override)
19
+ +peak($y, $override)
20
+ +border-radius($x,$y)
@@ -0,0 +1,14 @@
1
+ =grid-unit-base($type,$side,$n,$override:"")
2
+ $property: $type
3
+ @if $side
4
+ $property: #{$type}-#{$side}
5
+ @if unitless($n)
6
+ #{$property}: ($grid * $n) + ( ($n * $gutter) - $gutter ) #{$override}
7
+ @else
8
+ #{$property}: $n #{$override}
9
+
10
+ =span($n, $override:"")
11
+ +grid-unit-base("width",false,$n,$override)
12
+
13
+ =peak($n, $override:"")
14
+ +grid-unit-base("height",false,$n,$override)
@@ -0,0 +1,103 @@
1
+ =translate-base($type, $t:false, $r: false, $b: false, $l: false, $override: "")
2
+ @if $t
3
+ +grid-unit-base($type, top, $t, $override)
4
+ @if $r
5
+ +grid-unit-base($type, right, $r, $override)
6
+ @if $b
7
+ +grid-unit-base($type, bottom, $b, $override)
8
+ @if $l
9
+ +grid-unit-base($type, left, $l, $override)
10
+
11
+ =translate-corner($type, $corner, $m, $n:false, $override: "")
12
+ @if not $n
13
+ $n: $m
14
+ @else if $n == $override_string
15
+ $override: $n
16
+ $n: $m
17
+
18
+ @if $corner == tl
19
+ +translate-base($type, $m,false,false,$n,$override)
20
+ @if $corner == tr
21
+ +translate-base($type, $m,$n,false,false,$override)
22
+ @if $corner == bl
23
+ +translate-base($type, false,$n,$m,false,$override)
24
+ @if $corner == bl
25
+ +translate-base($type, false,false,$m,$n,$override)
26
+
27
+ =translate-group($type, $t, $r:false, $b:false, $l:false, $override: "")
28
+ @if $r == $override_string
29
+ $override: $r
30
+ $r: $t
31
+ $b: $t
32
+ $l: $t
33
+ @else if not $r and not $b and not $l
34
+ $r: $t
35
+ $b: $t
36
+ $l: $t
37
+ @else if $b == $override_string
38
+ $override: $b
39
+ $b: $t
40
+ $l: $r
41
+ @else if not $b and not $l
42
+ $b: $t
43
+ $l: $r
44
+ +translate-base($type,$t,$r,$b,$l,$override)
45
+
46
+
47
+ // PUSH INTERFACE
48
+
49
+ =push-top($n, $override:"")
50
+ +grid-unit-base("margin","top",$n,$override)
51
+
52
+ =push-right($n, $override: "")
53
+ +grid-unit-base("margin","right",$n,$override)
54
+
55
+ =push-bottom($n, $override: "")
56
+ +grid-unit-base("margin","bottom",$n,$override)
57
+
58
+ =push-left($n, $override: "")
59
+ +grid-unit-base("margin","left",$n,$override)
60
+
61
+ =push-tr($m, $n:false, $override: "")
62
+ +translate-corner("margin","tr",$m,$n,$override)
63
+
64
+ =push-tl($m, $n:false, $override: "")
65
+ +translate-corner("margin","tl",$m,$n,$override)
66
+
67
+ =push-br($m, $n:false, $override: "")
68
+ +translate-corner("margin","br",$m,$n,$override)
69
+
70
+ =push-bl($m, $n:false, $override: "")
71
+ +translate-corner("margin","bl",$m,$n,$override)
72
+
73
+ =push($t, $r:false, $b:false, $l:false, $override: "")
74
+ +translate-group("margin",$t,$r,$b,$l,$override)
75
+
76
+ // PADDING INTERFACE
77
+
78
+ =pad-top($n, $override: "")
79
+ +grid-unit-base("padding", "top",$n,$override)
80
+
81
+ =pad-right($n, $override: "")
82
+ +grid-unit-base("padding", "right",$n,$override)
83
+
84
+ =pad-bottom($n, $override: "")
85
+ +grid-unit-base("padding", "bottom",$n,$override)
86
+
87
+ =pad-left($n, $override: "")
88
+ +grid-unit-base("padding", "left",$n,$override)
89
+
90
+ =pad-tr($m, $n:false, $override: "")
91
+ +translate-corner("padding","tr",$m,$n,$override)
92
+
93
+ =pad-tl($m, $n:false, $override: "")
94
+ +translate-corner("padding","tl",$m,$n,$override)
95
+
96
+ =pad-br($m, $n:false, $override: "")
97
+ +translate-corner("padding","br",$m,$n,$override)
98
+
99
+ =pad-bl($m, $n:false, $override: "")
100
+ +translate-corner("padding","bl",$m,$n,$override)
101
+
102
+ =pad($t, $r:false, $b:false, $l:false, $override:"")
103
+ +translate-group("padding",$t,$r,$b,$l,$override)
@@ -0,0 +1,6 @@
1
+ =hang($side, $x:false, $y:false)
2
+ float: $side
3
+ @if $x
4
+ +push-left($x)
5
+ @if $y
6
+ +push-top($y)
@@ -0,0 +1,88 @@
1
+ // SPACING
2
+
3
+ =flush($axis:"x",$type:"margin",$override: "")
4
+ $side_a: "left"
5
+ $side_b: "right"
6
+ @if $axis == "y"
7
+ $side_a: "top"
8
+ $side_b: "bottom"
9
+
10
+ &:first-child
11
+ +grid-unit-base($type,$side_a,0px,$override)
12
+ &:last-child
13
+ +grid-unit-base($type,$side_b,0px,$override)
14
+
15
+ =flush-queue($type: "margin", $override:"")
16
+ +flush("x", $type, $override)
17
+
18
+ =flush-stack($type: "margin", $override:"")
19
+ +flush("y", $type, $override)
20
+
21
+ =space($axis, $type, $side, $spacing, $is_flush:true, $override:"")
22
+ +grid-unit-base($type,$side,$spacing, $override)
23
+ @if is_flush
24
+ +flush($axis,$type, $override)
25
+
26
+ =space-stack($spacing, $is_flush: true, $override:"")
27
+ +space("y","margin","top",$spacing,$is_flush,$override)
28
+
29
+ =space-queue($spacing)
30
+ +space("x","margin","left",$spacing,$is_flush,$override)
31
+
32
+ =matrix-container($col,$x_space,$y_space, $child: false)
33
+ +inblock-container
34
+ $all: "> *"
35
+ $first_row: "> *:nth-child(-n+#{$col})"
36
+ $first_column: "> *:nth-child(#{$col}n+1)"
37
+ @if $child
38
+ $all: "#{$all} #{$child}"
39
+ $first_row: "#{$first_row} #{$child}"
40
+ $first_column: "#{$first_column} #{$child}"
41
+
42
+ #{$all}
43
+ +push-top($y_space)
44
+ +push-left($x_space)
45
+ #{$first_row}
46
+ margin-top: 0
47
+ #{$first_column}
48
+ margin-left: 0
49
+
50
+ // LAYOUTS
51
+
52
+ =stack-container($spacing, $is_flush, $override)
53
+ +inblock-container
54
+ > *
55
+ +space-stack($spacing,$is_flush, $override)
56
+
57
+ =queue-container($spacing, $is_flush, $override)
58
+ +inblock-container
59
+ > *
60
+ +space-queue($spacing, $is_flush, $override)
61
+
62
+ =two-column-container($a, $b, $flush_top: true)
63
+ +inblock-container
64
+ > *
65
+ @if $flush_top
66
+ &:first-child, &:nth-child(2)
67
+ margin-top: 0
68
+ &:nth-child(odd)
69
+ +span($a)
70
+ &:nth-child(even)
71
+ +span($b)
72
+
73
+
74
+ =three-columns-container($a, $b, $c, $flush_top: true)
75
+ +inblock-container
76
+ > *
77
+ &:first-child
78
+ +span($a)
79
+ @if $flush_top
80
+ margin-top: 0
81
+ &:nth-child(2)
82
+ +span($b)
83
+ @if $flush_top
84
+ margin-top: 0
85
+ &:last-child
86
+ +span($c)
87
+ @if $flush_top
88
+ margin-top: 0
@@ -0,0 +1,13 @@
1
+ =inblock($vertical_alignment: $default_vertical_alignment)
2
+ +inline-block
3
+ vertical-align: $vertical_alignment
4
+
5
+ =inblock-container($vertical_alignment: $default_vertical_alignment)
6
+ > *
7
+ +inblock( $vertical_alignment )
8
+
9
+ =pos($x,$y:false,$override:"")
10
+ @if not $y
11
+ $y: $x
12
+ +grid-unit-base("left",false,$x,$override)
13
+ +grid-unit-base("top",false,$y,$override)
@@ -0,0 +1,25 @@
1
+ /*
2
+ • 6pt nonpareil
3
+ • 7pt minion
4
+ • 8pt brevier or small text
5
+ • 9pt bourgeois or galliard
6
+ • 10pt long primer or garamond
7
+ • 12pt pica
8
+ • 14pt english or augustin
9
+ • 18pt great primer
10
+ • 21pt double small pica or double pica
11
+ • 24pt double pica or two-line pica
12
+ • 36pt double great primer or 2-line great primer
13
+ *///
14
+
15
+ =text-size( $text_size: $base_text_size, $line_height: false)
16
+ @if not $line_height
17
+ $line_height: $base_line_height * ceil($text_size / $base_line_height)
18
+
19
+ font-size: $px2em * $text_size
20
+ line-height: $line_height
21
+
22
+ =apply-base-typography
23
+ +text-size
24
+ font-family: $base_text_font
25
+ color: $base_text_color
@@ -0,0 +1,28 @@
1
+ @mixin no-cascade-align($alignment, $cascade_alignment: left)
2
+ +no-cascade("text-align", $alignment, $cascade_alignment)
3
+
4
+ @mixin no-cascade($property,$value,$cascade_value)
5
+ #{$property}: $value
6
+ *
7
+ #{$property}: $cascade_value
8
+
9
+
10
+ @mixin add-space-flow($items, $space: 1, $override:"")
11
+ #{unquote($items)}
12
+ +push-top($space, $override)
13
+ +flush("y", "margin", $override)
14
+
15
+
16
+ @mixin safe-rgba($property,$color,$fallback: false)
17
+ @if $fallback == false
18
+ #{$property}: rgb(red($color),green($color),blue($color))
19
+ @else
20
+ #{$property}: $fallback
21
+ #{$property}: $color
22
+
23
+ @mixin safe-hsla($property,$color,$fallback: false)
24
+ @if $fallback == false
25
+ #{$property}: hsl(hue($color),saturation($color),lightness($color))
26
+ @else
27
+ #{$property}: $fallback
28
+ #{$property}: $color
metadata ADDED
@@ -0,0 +1,103 @@
1
+ --- !ruby/object:Gem::Specification
2
+ name: cinnamon
3
+ version: !ruby/object:Gem::Version
4
+ hash: 29
5
+ prerelease: false
6
+ segments:
7
+ - 0
8
+ - 0
9
+ - 1
10
+ version: 0.0.1
11
+ platform: ruby
12
+ authors:
13
+ - Jason Kuhrt
14
+ autorequire:
15
+ bindir: bin
16
+ cert_chain: []
17
+
18
+ date: 2010-10-07 00:00:00 -04:00
19
+ default_executable:
20
+ dependencies:
21
+ - !ruby/object:Gem::Dependency
22
+ name: compass
23
+ prerelease: false
24
+ requirement: &id001 !ruby/object:Gem::Requirement
25
+ none: false
26
+ requirements:
27
+ - - ">="
28
+ - !ruby/object:Gem::Version
29
+ hash: 977940508
30
+ segments:
31
+ - 0
32
+ - 10
33
+ - 0
34
+ - rc3
35
+ version: 0.10.0.rc3
36
+ type: :runtime
37
+ version_requirements: *id001
38
+ description: A framework for grid-driven construction in the browser.
39
+ email: jasonkuhrt@me.com
40
+ executables: []
41
+
42
+ extensions: []
43
+
44
+ extra_rdoc_files: []
45
+
46
+ files:
47
+ - stylesheets/_cinnamon.sass
48
+ - stylesheets/cinnamon/_base.sass
49
+ - stylesheets/cinnamon/_core_additions.sass
50
+ - stylesheets/cinnamon/_fx.sass
51
+ - stylesheets/cinnamon/_graphics.sass
52
+ - stylesheets/cinnamon/_grid.sass
53
+ - stylesheets/cinnamon/_layout.sass
54
+ - stylesheets/cinnamon/_type.sass
55
+ - stylesheets/cinnamon/_utilities.sass
56
+ - stylesheets/cinnamon/core_additions/_css3.sass
57
+ - stylesheets/cinnamon/core_additions/_reset.sass
58
+ - stylesheets/cinnamon/fx/_hover.sass
59
+ - stylesheets/cinnamon/fx/_skin.sass
60
+ - stylesheets/cinnamon/graphics/_shapes.sass
61
+ - stylesheets/cinnamon/grid/_sizing.sass
62
+ - stylesheets/cinnamon/grid/_translations.sass
63
+ - stylesheets/cinnamon/layout/_effects.sass
64
+ - stylesheets/cinnamon/layout/_flow.sass
65
+ - stylesheets/cinnamon/layout/_utilities.sass
66
+ - stylesheets/cinnamon/type/_type.sass
67
+ - stylesheets/cinnamon/utilities/_misc.sass
68
+ has_rdoc: true
69
+ homepage: http://www.jasonkuhrt.com/
70
+ licenses: []
71
+
72
+ post_install_message:
73
+ rdoc_options: []
74
+
75
+ require_paths:
76
+ - lib
77
+ required_ruby_version: !ruby/object:Gem::Requirement
78
+ none: false
79
+ requirements:
80
+ - - ">="
81
+ - !ruby/object:Gem::Version
82
+ hash: 3
83
+ segments:
84
+ - 0
85
+ version: "0"
86
+ required_rubygems_version: !ruby/object:Gem::Requirement
87
+ none: false
88
+ requirements:
89
+ - - ">="
90
+ - !ruby/object:Gem::Version
91
+ hash: 3
92
+ segments:
93
+ - 0
94
+ version: "0"
95
+ requirements: []
96
+
97
+ rubyforge_project:
98
+ rubygems_version: 1.3.7
99
+ signing_key:
100
+ specification_version: 3
101
+ summary: A framework for grid-driven construction in the browser.
102
+ test_files: []
103
+