lloydk-compass-jazen 0.1.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (49) hide show
  1. data/.gitignore +5 -0
  2. data/README.rdoc +4 -0
  3. data/Rakefile +58 -0
  4. data/VERSION +1 -0
  5. data/compass-jazen.gemspec +128 -0
  6. data/lib/compass-jazen.rb +2 -0
  7. data/lib/jazen/compass_plugin.rb +5 -0
  8. data/lib/jazen/sass_extensions.rb +22 -0
  9. data/sass/_forms.sass +4 -0
  10. data/sass/_grid.sass +81 -0
  11. data/sass/_links.sass +1 -0
  12. data/sass/_typography.sass +10 -0
  13. data/sass/_utilities.sass +24 -0
  14. data/sass/forms/_label-after-input.sass +36 -0
  15. data/sass/forms/_on-same-line.sass +38 -0
  16. data/sass/forms/ie/_fix-legend.sass +17 -0
  17. data/sass/jazen.sass +7 -0
  18. data/sass/links/_link-colors.sass +28 -0
  19. data/sass/typography/_bold.sass +2 -0
  20. data/sass/typography/_capitalize.sass +2 -0
  21. data/sass/typography/_caps.sass +8 -0
  22. data/sass/typography/_italic.sass +4 -0
  23. data/sass/typography/_lowercase.sass +2 -0
  24. data/sass/typography/_regular.sass +3 -0
  25. data/sass/typography/_shadow.sass +16 -0
  26. data/sass/typography/_text-align.sass +11 -0
  27. data/sass/typography/_uppercase.sass +2 -0
  28. data/sass/typography/_vertical-rhythm.sass +19 -0
  29. data/sass/utilities/_border.sass +29 -0
  30. data/sass/utilities/_boxed.sass +67 -0
  31. data/sass/utilities/_bullets.sass +7 -0
  32. data/sass/utilities/_clear.sass +13 -0
  33. data/sass/utilities/_clearfix.sass +21 -0
  34. data/sass/utilities/_display.sass +18 -0
  35. data/sass/utilities/_float.sass +15 -0
  36. data/sass/utilities/_hide.sass +7 -0
  37. data/sass/utilities/_horizontal-list.sass +18 -0
  38. data/sass/utilities/_inline-block.sass +10 -0
  39. data/sass/utilities/_new-context.sass +5 -0
  40. data/sass/utilities/_position.sass +71 -0
  41. data/sass/utilities/_replace-text.sass +16 -0
  42. data/sass/utilities/_reset.sass +64 -0
  43. data/sass/utilities/_round-corners.sass +12 -0
  44. data/sass/utilities/_size.sass +3 -0
  45. data/sass/utilities/_zebra-striping.sass +17 -0
  46. data/sass/utilities/ie/_has-layout.sass +20 -0
  47. data/sass/utilities/safari/_fix-anti-aliasing.sass +10 -0
  48. data/templates/.gitignore +0 -0
  49. metadata +110 -0
data/.gitignore ADDED
@@ -0,0 +1,5 @@
1
+ *.sw?
2
+ .DS_Store
3
+ coverage
4
+ rdoc
5
+ pkg
data/README.rdoc ADDED
@@ -0,0 +1,4 @@
1
+ = compass-jazen
2
+
3
+ A port of Jazen's css framework (http://github.com/jazen/css) for Compass (http://compass-style.org).
4
+
data/Rakefile ADDED
@@ -0,0 +1,58 @@
1
+ require 'rubygems'
2
+ require 'rake'
3
+
4
+ begin
5
+ require 'jeweler'
6
+ Jeweler::Tasks.new do |gem|
7
+ gem.name = "compass-jazen"
8
+ gem.summary = "Port of Jazen's css framework to Compass"
9
+ gem.description = "Port of Jazen's css framework (http://github.com/jazen/css to Compass (http://compass-style.org)."
10
+ gem.email = "lloyd@lloydk.ca"
11
+ gem.homepage = "http://github.com/lloydk/compass-jazen"
12
+ gem.authors = ["lloydk"]
13
+ gem.has_rdoc = false
14
+ gem.add_dependency('chriseppstein-compass', '>= 0.8.9')
15
+ gem.files += Dir.glob("lib/**/*")
16
+ gem.files += Dir.glob("sass/**/*")
17
+ end
18
+ rescue LoadError
19
+ puts "Jeweler (or a dependency) not available. Install it with: sudo gem install jeweler"
20
+ end
21
+
22
+ require 'rake/testtask'
23
+ Rake::TestTask.new(:test) do |test|
24
+ test.libs << 'lib' << 'test'
25
+ test.pattern = 'test/**/*_test.rb'
26
+ test.verbose = true
27
+ end
28
+
29
+ begin
30
+ require 'rcov/rcovtask'
31
+ Rcov::RcovTask.new do |test|
32
+ test.libs << 'test'
33
+ test.pattern = 'test/**/*_test.rb'
34
+ test.verbose = true
35
+ end
36
+ rescue LoadError
37
+ task :rcov do
38
+ abort "RCov is not available. In order to run rcov, you must: sudo gem install spicycode-rcov"
39
+ end
40
+ end
41
+
42
+ task :test => :check_dependencies
43
+
44
+ task :default => :test
45
+
46
+ require 'rake/rdoctask'
47
+ Rake::RDocTask.new do |rdoc|
48
+ if File.exist?('VERSION')
49
+ version = File.read('VERSION')
50
+ else
51
+ version = ""
52
+ end
53
+
54
+ rdoc.rdoc_dir = 'rdoc'
55
+ rdoc.title = "compass-jazen #{version}"
56
+ rdoc.rdoc_files.include('README*')
57
+ rdoc.rdoc_files.include('lib/**/*.rb')
58
+ end
data/VERSION ADDED
@@ -0,0 +1 @@
1
+ 0.1.1
@@ -0,0 +1,128 @@
1
+ # Generated by jeweler
2
+ # DO NOT EDIT THIS FILE
3
+ # Instead, edit Jeweler::Tasks in Rakefile, and run `rake gemspec`
4
+ # -*- encoding: utf-8 -*-
5
+
6
+ Gem::Specification.new do |s|
7
+ s.name = %q{compass-jazen}
8
+ s.version = "0.1.0"
9
+
10
+ s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
11
+ s.authors = ["lloydk"]
12
+ s.date = %q{2009-08-16}
13
+ s.description = %q{Port of Jazen's css framework (http://github.com/jazen/css to Compass (http://compass-style.org).}
14
+ s.email = %q{lloyd@lloydk.ca}
15
+ s.extra_rdoc_files = [
16
+ "README.rdoc"
17
+ ]
18
+ s.files = [
19
+ ".gitignore",
20
+ "README.rdoc",
21
+ "Rakefile",
22
+ "VERSION",
23
+ "compass-jazen.gemspec",
24
+ "lib/compass-jazen.rb",
25
+ "lib/compass-jazen.rb",
26
+ "lib/jazen/compass_plugin.rb",
27
+ "lib/jazen/compass_plugin.rb",
28
+ "lib/jazen/sass_extensions.rb",
29
+ "lib/jazen/sass_extensions.rb",
30
+ "sass/_forms.sass",
31
+ "sass/_forms.sass",
32
+ "sass/_grid.sass",
33
+ "sass/_grid.sass",
34
+ "sass/_links.sass",
35
+ "sass/_links.sass",
36
+ "sass/_typography.sass",
37
+ "sass/_typography.sass",
38
+ "sass/_utilities.sass",
39
+ "sass/_utilities.sass",
40
+ "sass/forms/_label-after-input.sass",
41
+ "sass/forms/_label-after-input.sass",
42
+ "sass/forms/_on-same-line.sass",
43
+ "sass/forms/_on-same-line.sass",
44
+ "sass/forms/ie/_fix-legend.sass",
45
+ "sass/forms/ie/_fix-legend.sass",
46
+ "sass/jazen.sass",
47
+ "sass/jazen.sass",
48
+ "sass/links/_link-colors.sass",
49
+ "sass/links/_link-colors.sass",
50
+ "sass/typography/_bold.sass",
51
+ "sass/typography/_bold.sass",
52
+ "sass/typography/_capitalize.sass",
53
+ "sass/typography/_capitalize.sass",
54
+ "sass/typography/_caps.sass",
55
+ "sass/typography/_caps.sass",
56
+ "sass/typography/_italic.sass",
57
+ "sass/typography/_italic.sass",
58
+ "sass/typography/_lowercase.sass",
59
+ "sass/typography/_lowercase.sass",
60
+ "sass/typography/_regular.sass",
61
+ "sass/typography/_regular.sass",
62
+ "sass/typography/_shadow.sass",
63
+ "sass/typography/_shadow.sass",
64
+ "sass/typography/_text-align.sass",
65
+ "sass/typography/_text-align.sass",
66
+ "sass/typography/_uppercase.sass",
67
+ "sass/typography/_uppercase.sass",
68
+ "sass/typography/_vertical-rhythm.sass",
69
+ "sass/typography/_vertical-rhythm.sass",
70
+ "sass/utilities/_border.sass",
71
+ "sass/utilities/_border.sass",
72
+ "sass/utilities/_boxed.sass",
73
+ "sass/utilities/_boxed.sass",
74
+ "sass/utilities/_bullets.sass",
75
+ "sass/utilities/_bullets.sass",
76
+ "sass/utilities/_clear.sass",
77
+ "sass/utilities/_clear.sass",
78
+ "sass/utilities/_clearfix.sass",
79
+ "sass/utilities/_clearfix.sass",
80
+ "sass/utilities/_display.sass",
81
+ "sass/utilities/_display.sass",
82
+ "sass/utilities/_float.sass",
83
+ "sass/utilities/_float.sass",
84
+ "sass/utilities/_hide.sass",
85
+ "sass/utilities/_hide.sass",
86
+ "sass/utilities/_horizontal-list.sass",
87
+ "sass/utilities/_horizontal-list.sass",
88
+ "sass/utilities/_inline-block.sass",
89
+ "sass/utilities/_inline-block.sass",
90
+ "sass/utilities/_new-context.sass",
91
+ "sass/utilities/_new-context.sass",
92
+ "sass/utilities/_position.sass",
93
+ "sass/utilities/_position.sass",
94
+ "sass/utilities/_replace-text.sass",
95
+ "sass/utilities/_replace-text.sass",
96
+ "sass/utilities/_reset.sass",
97
+ "sass/utilities/_reset.sass",
98
+ "sass/utilities/_round-corners.sass",
99
+ "sass/utilities/_round-corners.sass",
100
+ "sass/utilities/_size.sass",
101
+ "sass/utilities/_size.sass",
102
+ "sass/utilities/_zebra-striping.sass",
103
+ "sass/utilities/_zebra-striping.sass",
104
+ "sass/utilities/ie/_has-layout.sass",
105
+ "sass/utilities/ie/_has-layout.sass",
106
+ "sass/utilities/safari/_fix-anti-aliasing.sass",
107
+ "sass/utilities/safari/_fix-anti-aliasing.sass",
108
+ "templates/.gitignore"
109
+ ]
110
+ s.homepage = %q{http://github.com/lloydk/compass-jazen}
111
+ s.rdoc_options = ["--charset=UTF-8"]
112
+ s.require_paths = ["lib"]
113
+ s.rubygems_version = %q{1.3.5}
114
+ s.summary = %q{Port of Jazen's css framework to Compass}
115
+
116
+ if s.respond_to? :specification_version then
117
+ current_version = Gem::Specification::CURRENT_SPECIFICATION_VERSION
118
+ s.specification_version = 3
119
+
120
+ if Gem::Version.new(Gem::RubyGemsVersion) >= Gem::Version.new('1.2.0') then
121
+ s.add_runtime_dependency(%q<chriseppstein-compass>, [">= 0.8.9"])
122
+ else
123
+ s.add_dependency(%q<chriseppstein-compass>, [">= 0.8.9"])
124
+ end
125
+ else
126
+ s.add_dependency(%q<chriseppstein-compass>, [">= 0.8.9"])
127
+ end
128
+ end
@@ -0,0 +1,2 @@
1
+ require File.join(File.dirname(__FILE__), 'jazen', 'compass_plugin')
2
+ require File.join(File.dirname(__FILE__), 'jazen', 'sass_extensions')
@@ -0,0 +1,5 @@
1
+ options = Hash.new
2
+ options[:stylesheets_directory] = File.expand_path(File.join(File.dirname(__FILE__), '..', '..', 'sass'))
3
+ options[:templates_directory] = File.expand_path(File.join(File.dirname(__FILE__), '..', '..', 'templates'))
4
+
5
+ Compass::Frameworks.register('jazen', options)
@@ -0,0 +1,22 @@
1
+ require 'sass'
2
+
3
+ module Sass::Script::Functions
4
+
5
+ # Return the width of an image in pixels
6
+ def width(path)
7
+ Sass::Script::Number.new(identify(path, "w").to_i, ["px"])
8
+ end
9
+
10
+ # Returns the height of an image in pixels
11
+ def height(path)
12
+ Sass::Script::Number.new(identify(path, "h").to_i, ["px"])
13
+ end
14
+
15
+ private
16
+
17
+ def identify(path, what)
18
+ path = path.to_s
19
+ `identify -format %#{what} #{path}`
20
+ end
21
+
22
+ end
data/sass/_forms.sass ADDED
@@ -0,0 +1,4 @@
1
+ @import forms/label-after-input.sass
2
+ @import forms/on-same-line.sass
3
+
4
+ @import forms/ie/fix-legend.sass
data/sass/_grid.sass ADDED
@@ -0,0 +1,81 @@
1
+ // TODO: Comments!
2
+
3
+ !grid_width ||= 960px
4
+ !grid_cols ||= 16
5
+ !grid_gutter_width ||= 20px
6
+
7
+ =grid-padding(!left_and_right = !grid_gutter_width, !top_and_bottom = false)
8
+ :padding
9
+ :left= !left_and_right
10
+ :right= !left_and_right
11
+
12
+ @if !top_and_bottom
13
+ :padding
14
+ :top= !top_and_bottom
15
+ :bottom= !top_and_bottom
16
+
17
+
18
+ =grid-first-cell
19
+ :margin-left 0
20
+
21
+ =grid-last-cell
22
+ :margin-right 0
23
+
24
+ =grid-container
25
+ :margin
26
+ :left auto
27
+ :right auto
28
+
29
+ // Full margin due to adjacent-margin-collapsing!
30
+ :top= !grid_gutter_width
31
+ :bottom= !grid_gutter_width
32
+
33
+ :width= !grid_width
34
+
35
+
36
+ =grid-cell-width(!n, !adjust_by = 0)
37
+ :width= (!grid_width / !grid_cols) * !n - !grid_gutter_width + !adjust_by
38
+
39
+ =grid-cell-base
40
+ +float-left
41
+ :margin
42
+ :left= !grid_gutter_width/2
43
+ :right= !grid_gutter_width/2
44
+
45
+ =grid-cells(!n, !adjust_by = 0)
46
+ +grid-cell-base
47
+ +grid-cell-width(!n, !adjust_by)
48
+
49
+ =grid-generate-cells
50
+ @for !n from 1 through !grid_cols
51
+ .cells_#{!n}
52
+ +grid-cells(!n)
53
+
54
+
55
+ =grid-prefix(!n)
56
+ :padding-left= (!grid_width / !grid_cols) * !n
57
+
58
+ =grid-generate-prefixes
59
+ @for !n from 1 through !grid_cols - 1
60
+ .prefix_#{!n}
61
+ +grid-prefix(!n)
62
+
63
+
64
+ =grid-suffix(!n)
65
+ :padding-right= (!grid_width / !grid_cols) * !n
66
+
67
+ =grid-generate-suffixes
68
+ @for !n from 1 through !grid_cols - 1
69
+ .suffix_#{!n}
70
+ +grid-suffix(!n)
71
+
72
+ =grid(!width = !grid_width, !cols = !grid_cols, !gutter_width = !grid_gutter_width)
73
+ !grid_width = !width
74
+ !grid_cols = !cols
75
+ !grid_gutter_width = !gutter_width
76
+
77
+ +grid-container
78
+
79
+ +grid-generate-cells
80
+ +grid-generate-prefixes
81
+ +grid-generate-suffixes
data/sass/_links.sass ADDED
@@ -0,0 +1 @@
1
+ @import links/link-colors.sass
@@ -0,0 +1,10 @@
1
+ @import typography/caps.sass
2
+ @import typography/italic.sass
3
+ @import typography/bold.sass
4
+ @import typography/regular.sass
5
+ @import typography/shadow.sass
6
+ @import typography/vertical-rhythm.sass
7
+ @import typography/uppercase.sass
8
+ @import typography/lowercase.sass
9
+ @import typography/capitalize.sass
10
+ @import typography/text-align.sass
@@ -0,0 +1,24 @@
1
+ @import utilities/reset.sass
2
+ @import utilities/clear.sass
3
+ @import utilities/clearfix.sass
4
+ @import utilities/float.sass
5
+
6
+ @import utilities/hide.sass
7
+ @import utilities/display.sass
8
+ @import utilities/border.sass
9
+ @import utilities/size.sass
10
+
11
+ @import utilities/bullets.sass
12
+ @import utilities/horizontal-list.sass
13
+
14
+ @import utilities/new-context.sass
15
+ @import utilities/position.sass
16
+ @import utilities/replace-text.sass
17
+ @import utilities/round-corners.sass
18
+ @import utilities/zebra-striping.sass
19
+
20
+ @import utilities/inline-block.sass
21
+ @import utilities/safari/fix-anti-aliasing.sass
22
+
23
+ @import utilities/ie/has-layout.sass
24
+ @import utilities/boxed.sass
@@ -0,0 +1,36 @@
1
+ // Display the checkbox or radiobutton in front
2
+ // of it's describing label.
3
+ //
4
+ // Expects that your form is marked up as list
5
+ // and uses a label tag for each input.
6
+ //
7
+ // Example:
8
+ //
9
+ // HTML:
10
+ //
11
+ // <form>
12
+ // <ul>
13
+ // <li class="check_me">
14
+ // <label>Check this!</label>
15
+ // <input type="checkbox"></input>
16
+ // </li>
17
+ // ...
18
+ //
19
+ // CSS/Sass:
20
+ //
21
+ // form
22
+ // +label-after-input(".check_me")
23
+ //
24
+
25
+ =label-after-input(!which, !input_width = 24px, !adjust_top = false)
26
+ li#{!which}
27
+ +new-context
28
+
29
+ label
30
+ +move-right(!input_width)
31
+
32
+ @if !adjust_top
33
+ +move-down(!adjust_top)
34
+
35
+ input
36
+ +absolute-top-left
@@ -0,0 +1,38 @@
1
+ // Expects that your form is marked up as list and
2
+ // every list item can be identified by a class.
3
+ //
4
+ // A maximum of four was enough for me so far.
5
+ //
6
+ // Example:
7
+ //
8
+ // HTML:
9
+ //
10
+ // <form>
11
+ // <ul>
12
+ // <li class="salutation">..</li>
13
+ // <li class="first_name">..</li>
14
+ // <li class="last_name">..</li>
15
+ // ...
16
+ //
17
+ // CSS/Sass:
18
+ //
19
+ // form
20
+ // +on-same-line(".salutation", ".first_name", ".last_name")
21
+ //
22
+
23
+ =on-same-line(!first, !second = false, !third = false, !fourth = false)
24
+ li#{!first}
25
+ :clear left
26
+ +float-left
27
+
28
+ @if !second
29
+ li#{!second}
30
+ +float-left
31
+
32
+ @if !third
33
+ li#{!third}
34
+ +float-left
35
+
36
+ @if !fourth
37
+ li#{!fourth}
38
+ +float-left
@@ -0,0 +1,17 @@
1
+ // IE (expect for v8) adds a mysterious left/right
2
+ // margin of 7px to each <legend> ...?
3
+
4
+ =ie-fix-legend(!amount = -7px)
5
+ // Target IE7 and IE<7
6
+ *+html
7
+ legend
8
+ :margin
9
+ :left= !amount
10
+ :right= !amount
11
+
12
+ * html
13
+ legend
14
+ :margin
15
+ :left= !amount
16
+ :right= !amount
17
+
data/sass/jazen.sass ADDED
@@ -0,0 +1,7 @@
1
+ @import utilities.sass
2
+ @import forms.sass
3
+ @import links.sass
4
+ @import typography.sass
5
+ @import grid.sass
6
+
7
+ +global-reset
@@ -0,0 +1,28 @@
1
+ // Sets all colors for a link's states
2
+ //
3
+ // Order is: :link, :visited, :focus, :hover, :active
4
+ //
5
+ // Not my choice - this is the order the rules have
6
+ // to be set to avoid trouble.
7
+ //
8
+ // Just remember "Lord Vaders Former Handle Anakin" ;)
9
+ //
10
+
11
+ =link-colors(!link, !visited = false, !focus = false, !hover = false, !active = false)
12
+ :color = !link
13
+
14
+ @if !visited
15
+ &:visited
16
+ :color= !visited
17
+
18
+ @if !focus
19
+ &:focus
20
+ :color= !focus
21
+
22
+ @if !hover
23
+ &:hover
24
+ :color= !hover
25
+
26
+ @if !active
27
+ &:active
28
+ :color= !active
@@ -0,0 +1,2 @@
1
+ =bold
2
+ :font-weight bold
@@ -0,0 +1,2 @@
1
+ =capitalize
2
+ :text-transform capitalize
@@ -0,0 +1,8 @@
1
+ =no-caps
2
+ :font-variant normal
3
+ :letter-spacing 0
4
+
5
+ =caps(!letter_spacing = 1px)
6
+ :font-variant small-caps
7
+ :letter-spacing= !letter_spacing
8
+
@@ -0,0 +1,4 @@
1
+ // Just for convenience
2
+
3
+ =italic
4
+ :font-style italic
@@ -0,0 +1,2 @@
1
+ =lowercase
2
+ :text-transform lowercase
@@ -0,0 +1,3 @@
1
+ =regular
2
+ :font-weight normal
3
+ :font-style normal
@@ -0,0 +1,16 @@
1
+ // IE doesn't support this!
2
+
3
+ =shadow(!offset_x = 1px, !offset_y = 1px, !blur_radius = 1px, !color = #000)
4
+ :text-shadow= !offset_x !offset_y !blur_radius !color
5
+
6
+ // Shortcut for faking engraved text
7
+ =engrave(!color = #fff)
8
+ +shadow(0, 1px, 1px, !color)
9
+
10
+ // Shortcut for faking embossed text - just an alias for convenience
11
+ =emboss(!color = #000)
12
+ +shadow(0, 1px, 1px, !color)
13
+
14
+ // Another shortcurt/alias for convenience
15
+ =glow(!blur_radius = 5px, !color = #fff)
16
+ +shadow(1px, 1px, !blur_radius, !color)
@@ -0,0 +1,11 @@
1
+ =text-center
2
+ :text-align center
3
+
4
+ =text-left
5
+ :text-align left
6
+
7
+ =text-right
8
+ :text-align right
9
+
10
+ =text-justify
11
+ :text-align justify
@@ -0,0 +1,2 @@
1
+ =uppercase
2
+ :text-transform uppercase
@@ -0,0 +1,19 @@
1
+ !base_font_size ||= 12px
2
+ !base_line_height ||= 1.5
3
+
4
+ =vertical-rhythm(!font_size)
5
+ !space = ((!base_font_size * !base_line_height) / !font_size)
6
+
7
+ :font-size= !font_size
8
+ :line-height= !space
9
+ :margin-top= !space + "em"
10
+ :margin-bottom= !space + "em"
11
+
12
+ =asymmetrical-vertical-rhythm(!font_size, !top_factor = 1.5, !bottom_factor = 0.5)
13
+ !space = ((!base_font_size * !base_line_height) / !font_size)
14
+
15
+ :font-size= !font_size
16
+ :line-height= !space
17
+ :margin-top= !space * !top_factor + "em"
18
+ :margin-bottom= !space * !bottom_factor + "em"
19
+
@@ -0,0 +1,29 @@
1
+ =no-border-top
2
+ :border-top 0
3
+
4
+ =no-border-right
5
+ :border-right 0
6
+
7
+ =no-border-bottom
8
+ :border-bottom 0
9
+
10
+ =no-border-left
11
+ :border-left 0
12
+
13
+ =no-border
14
+ :border 0
15
+
16
+ =border-top(!color, !size = 1px, !style = "solid")
17
+ :border-top= !size !style !color
18
+
19
+ =border-right(!color, !size = 1px, !style = "solid")
20
+ :border-right= !size !style !color
21
+
22
+ =border-bottom(!color, !size = 1px, !style = "solid")
23
+ :border-bottom= !size !style !color
24
+
25
+ =border-left(!color, !size = 1px, !style = "solid")
26
+ :border-left= !size !style !color
27
+
28
+ =border(!color, !size = 1px, !style = "solid")
29
+ :border= !size !style !color
@@ -0,0 +1,67 @@
1
+ =boxed-top(!border_color, !bg_color, !top_color = "grey", !border_radius = 6px)
2
+ .hd
3
+ +new-context
4
+ +border(!border_color)
5
+ +no-border-bottom
6
+ :background-color= !bg_color
7
+
8
+ .tl, .tr
9
+ :width= !border_radius
10
+ :height= !border_radius
11
+ :background-image= url("../images/bg-box-#{!top_color}.png")
12
+
13
+ .tl
14
+ +absolute-top-left(-1px, -1px)
15
+ :background-position left top
16
+
17
+ .tr
18
+ +absolute-top-right(-1px, -1px)
19
+ :background-position right top
20
+
21
+ // IE fixes
22
+ .hd, .tl, .tr
23
+ :font-size 0
24
+
25
+ .hd
26
+ +ie-gain-layout
27
+ :height= !border_radius
28
+
29
+ =boxed-bottom(!border_color, !bg_color, !bottom_color = "grey", !border_radius = 6px)
30
+ .ft
31
+ +new-context
32
+ +border(!border_color)
33
+ +no-border-top
34
+ :background-color= !bg_color
35
+
36
+ .bl, .br
37
+ :width= !border_radius
38
+ :height= !border_radius
39
+ :background-image= url("../images/bg-box-#{!bottom_color}.png")
40
+
41
+ .bl
42
+ +absolute-bottom-left(-1px, -1px)
43
+ :background-position left bottom
44
+
45
+ .br
46
+ +absolute-bottom-right(-1px, -1px)
47
+ :background-position right bottom
48
+
49
+ // IE fixes
50
+ .ft, .bl, .br
51
+ :font-size 0
52
+
53
+ .ft
54
+ +ie-gain-layout
55
+ :height= !border_radius
56
+
57
+ =boxed(!border_color, !bg_color, !top_color = "grey", !bottom_color = "grey", !border_radius = 6px)
58
+ +boxed-top(!border_color, !bg_color, !top_color, !border_radius)
59
+ +boxed-bottom(!border_color, !bg_color, !bottom_color, !border_radius)
60
+ :background-color= !bg_color
61
+
62
+ .bd
63
+ +clearfix
64
+ +border-left(!border_color)
65
+ +border-right(!border_color)
66
+ // IE fix
67
+ +ie-gain-layout
@@ -0,0 +1,7 @@
1
+ =no-bullet
2
+ :list-style-type none
3
+ :margin-left 0
4
+
5
+ =no-bullets
6
+ li
7
+ +no-bullet
@@ -0,0 +1,13 @@
1
+ =clear
2
+ :clear both
3
+
4
+ =no-clear
5
+ :clear none
6
+
7
+ =clear-left
8
+ :clear left
9
+
10
+ =clear-right
11
+ :clear right
12
+
13
+
@@ -0,0 +1,21 @@
1
+ // The (in)famous clearfix trick
2
+ =clearfix
3
+ :display inline-block // FF3 supports this now
4
+
5
+ &:after
6
+ :content " "
7
+ :display block
8
+ :height 0
9
+ :clear both
10
+ :visibility hidden
11
+ :font-size 0
12
+
13
+
14
+ * html>body &
15
+ :display inline-block
16
+ :width 100%
17
+
18
+ * html &
19
+ /* Hide from IE/mac \*/
20
+ :height 1%
21
+ /* End hide from IE/mac
@@ -0,0 +1,18 @@
1
+ =block
2
+ :display block
3
+
4
+ =inline
5
+ :display inline
6
+
7
+ =inline-block
8
+ :display inline-block
9
+
10
+ =list-item
11
+ :display list-item
12
+
13
+ =run-in
14
+ :display run-in
15
+
16
+ =remove
17
+ :display none
18
+
@@ -0,0 +1,15 @@
1
+ // Implementation of float:left/right with fix
2
+ // for IE's double margin bug.
3
+
4
+ =float(!side = "left")
5
+ :display inline
6
+ :float= !side
7
+
8
+ =float-left
9
+ +float("left")
10
+
11
+ =float-right
12
+ +float("right")
13
+
14
+ =no-float
15
+ +float("none")
@@ -0,0 +1,7 @@
1
+ =hide
2
+ :display hidden
3
+
4
+ =hide-text
5
+ :overflow hidden
6
+ :text-indent -9999em
7
+
@@ -0,0 +1,18 @@
1
+ =horizontal-list(!padding_left = 0, !padding_right = 0)
2
+ +reset-box-model
3
+ +no-bullets
4
+ :display inline
5
+
6
+ li
7
+ :display inline
8
+ :white-space nowrap
9
+
10
+ :padding
11
+ :left= !padding_left
12
+ :right= !padding_right
13
+
14
+ &.first
15
+ :padding-left 0
16
+
17
+ &.last
18
+ :padding-right 0
@@ -0,0 +1,10 @@
1
+ // Cross-browser inline-block support
2
+
3
+ =inline-block
4
+ +ie-gain-layout
5
+
6
+ :display inline
7
+ :display -moz-inline-box
8
+ :display inline-block
9
+ :vertical-align top
10
+
@@ -0,0 +1,5 @@
1
+ // Sets a new context for positioning
2
+ // child elements in it
3
+
4
+ =new-context(!mode = "relative")
5
+ :position= !mode
@@ -0,0 +1,71 @@
1
+ // Positions the element relative to its
2
+ // surrounding context (Set a new one using
3
+ // new-context mixin)
4
+
5
+ =position(!mode = "absolute", !top = false, !right = false, !bottom = false, !left = false)
6
+ :position= !mode
7
+
8
+ @if !top
9
+ :top= !top
10
+
11
+ @if !right
12
+ :right= !right
13
+
14
+ @if !bottom
15
+ :bottom= !bottom
16
+
17
+ @if !left
18
+ :left= !left
19
+
20
+ // Mixins for convenience
21
+
22
+ =absolute(!top = false, !right = false, !bottom = false, !left = false)
23
+ +position("absolute", !top, !right, !bottom, !left)
24
+
25
+ =relative(!top = false, !right = false, !bottom = false, !left = false)
26
+ +position("relative", !top, !right, !bottom, !left)
27
+
28
+ // Even more convenience
29
+
30
+ =absolute-top-left(!top = 0, !left = 0)
31
+ +absolute(!top, false, false, !left)
32
+
33
+ =absolute-top(!top = 0)
34
+ +absolute(!top, false, false, false)
35
+
36
+ =absolute-top-right(!top = 0, !right = 0)
37
+ +absolute(!top, !right, false, false)
38
+
39
+ =absolute-right(!right = 0)
40
+ +absolute(false, !right, false, false)
41
+
42
+ =absolute-bottom-right(!bottom = 0, !right = 0)
43
+ +absolute(false, !right, !bottom, false)
44
+
45
+ =absolute-bottom(!bottom = 0)
46
+ +absolute(false, false, !bottom, false)
47
+
48
+ =absolute-bottom-left(!bottom = 0, !left = 0)
49
+ +absolute(false, false, !bottom, !left)
50
+
51
+ =absolute-left(!left = 0)
52
+ +absolute(false, false, false, !left)
53
+
54
+
55
+ // Mixins for convenient relative positioning
56
+ // *Note* the minus signs..
57
+
58
+ =move(!top = false, !right = false, !bottom = false, !left = false)
59
+ +relative(!top, !right, !bottom, !left)
60
+
61
+ =move-up(!up = 0)
62
+ +move(-!up)
63
+
64
+ =move-right(!right = 0)
65
+ +move(false, -!right)
66
+
67
+ =move-down(!down = 0)
68
+ +move(false, false, -!down)
69
+
70
+ =move-left(!left = 0)
71
+ +move(false, false, false, -!left)
@@ -0,0 +1,16 @@
1
+ // Replaces text with an image -
2
+ //
3
+ // Text will be hidden by moving it
4
+ // out of the window, so it stays
5
+ // indexable for Google and Co.
6
+ //
7
+
8
+ =replace-text(!img, !x = 50%, !y = 50%)
9
+ +hide-text
10
+
11
+ :background
12
+ :image= url(!img)
13
+ :position= !x !y
14
+ :repeat no-repeat
15
+
16
+
@@ -0,0 +1,64 @@
1
+ =reset-box-model
2
+ :border 0
3
+ :margin 0
4
+ :padding 0
5
+
6
+ =reset
7
+ +reset-box-model
8
+ :font
9
+ :family inherit
10
+ :size 100%
11
+ :style inherit
12
+ :weight inherit
13
+
14
+ :outline 0
15
+ :vertical-align baseline
16
+
17
+ =reset-quotes
18
+ +reset
19
+ :quotes "" ""
20
+ &:before, &:after
21
+ :content ""
22
+
23
+ =reset-table-cell
24
+ +reset
25
+ :text-align left
26
+ :font-weight normal
27
+ :vertical-align middle
28
+
29
+ =reset-table
30
+ +reset
31
+ :border-collapse separate
32
+ :border-spacing 0
33
+ :vertical-align middle
34
+
35
+ =reset-list
36
+ :list-style none
37
+
38
+ =global-reset
39
+ html, body, div, span, applet, object, iframe,
40
+ h1, h2, h3, h4, h5, h6, p, blockquote, pre,
41
+ a, abbr, acronym, address, big, cite, code,
42
+ del, dfn, em, font, img, ins, kbd, q, s, samp,
43
+ small, strike, strong, sub, sup, tt, var,
44
+ dl, dt, dd, ol, ul, li,
45
+ fieldset, form, label, legend,
46
+ table, caption, tbody, tfoot, thead, tr, th, td
47
+ +reset
48
+
49
+ body
50
+ :line-height 1
51
+ :color black
52
+ :background white
53
+
54
+ ol, ul
55
+ +reset-list
56
+
57
+ caption, th, td
58
+ +reset-table-cell
59
+
60
+ table
61
+ +reset-table
62
+
63
+ blockquote, q
64
+ +reset-quotes
@@ -0,0 +1,12 @@
1
+ // No IE-support for now!
2
+
3
+ =round-corners(!topright = 5px, !bottomright = 5px, !bottomleft = 5px, !topleft = 5px)
4
+ :-moz-border-radius-topright= !topright
5
+ :-moz-border-radius-bottomright= !bottomright
6
+ :-moz-border-radius-bottomleft= !bottomleft
7
+ :-moz-border-radius-topleft= !topleft
8
+
9
+ :-webkit-border-top-right-radius= !topright
10
+ :-webkit-border-bottom-right-radius= !bottomright
11
+ :-webkit-border-bottom-left-radius= !bottomleft
12
+ :-webkit-border-top-left-radius= !topleft
@@ -0,0 +1,3 @@
1
+ =size(!width, !height)
2
+ :width= !width
3
+ :height= !height
@@ -0,0 +1,17 @@
1
+ // Zebra-striping -
2
+ //
3
+ // "even" and "odd" classes must be set when
4
+ // targeting browsers which do not support
5
+ // the pseudo-class :nth-child.
6
+
7
+ =zebra-striping(!even, !odd = "transparent")
8
+ :nth-child(even)
9
+ :background-color= !even
10
+ :nth-child(odd)
11
+ :background-color= !odd
12
+
13
+ li.even
14
+ :background-color= !even
15
+ li.odd
16
+ :background-color= !odd
17
+
@@ -0,0 +1,20 @@
1
+ // IE's render-engine has an internal flag
2
+ // named "hasLayout" for each element.
3
+ //
4
+ // Several bugs can be resolved by triggering it.
5
+ //
6
+ // More information:
7
+ // http://www.satzansatz.de/cssd/onhavinglayout.html
8
+
9
+
10
+ // This seems to be the best option nowadays -
11
+ // just ignore IE5.0..
12
+
13
+ =ie-gain-layout
14
+ :zoom 1
15
+
16
+ // Resetting hasLayout is possible unless it has
17
+ // been triggered by another rule too.
18
+
19
+ =ie-reset-layout
20
+ :zoom normal
@@ -0,0 +1,10 @@
1
+ // Safari renders type on dark backgrounds
2
+ // a bit too bold - this fix let it appear
3
+ // lighter.
4
+ //
5
+ // More information:
6
+ // http://24ways.org/2006/knockout-type
7
+ //
8
+
9
+ =safari-fix-anti-aliasing
10
+ :text-shadow 0 0 0 #000
File without changes
metadata ADDED
@@ -0,0 +1,110 @@
1
+ --- !ruby/object:Gem::Specification
2
+ name: lloydk-compass-jazen
3
+ version: !ruby/object:Gem::Version
4
+ version: 0.1.0
5
+ platform: ruby
6
+ authors:
7
+ - lloydk
8
+ autorequire:
9
+ bindir: bin
10
+ cert_chain: []
11
+
12
+ date: 2009-08-16 00:00:00 -07:00
13
+ default_executable:
14
+ dependencies:
15
+ - !ruby/object:Gem::Dependency
16
+ name: chriseppstein-compass
17
+ type: :runtime
18
+ version_requirement:
19
+ version_requirements: !ruby/object:Gem::Requirement
20
+ requirements:
21
+ - - ">="
22
+ - !ruby/object:Gem::Version
23
+ version: 0.8.9
24
+ version:
25
+ description: Port of Jazen's css framework (http://github.com/jazen/css to Compass (http://compass-style.org).
26
+ email: lloyd@lloydk.ca
27
+ executables: []
28
+
29
+ extensions: []
30
+
31
+ extra_rdoc_files:
32
+ - README.rdoc
33
+ files:
34
+ - .gitignore
35
+ - README.rdoc
36
+ - Rakefile
37
+ - VERSION
38
+ - compass-jazen.gemspec
39
+ - lib/compass-jazen.rb
40
+ - lib/jazen/compass_plugin.rb
41
+ - lib/jazen/sass_extensions.rb
42
+ - sass/_forms.sass
43
+ - sass/_grid.sass
44
+ - sass/_links.sass
45
+ - sass/_typography.sass
46
+ - sass/_utilities.sass
47
+ - sass/forms/_label-after-input.sass
48
+ - sass/forms/_on-same-line.sass
49
+ - sass/forms/ie/_fix-legend.sass
50
+ - sass/jazen.sass
51
+ - sass/links/_link-colors.sass
52
+ - sass/typography/_bold.sass
53
+ - sass/typography/_capitalize.sass
54
+ - sass/typography/_caps.sass
55
+ - sass/typography/_italic.sass
56
+ - sass/typography/_lowercase.sass
57
+ - sass/typography/_regular.sass
58
+ - sass/typography/_shadow.sass
59
+ - sass/typography/_text-align.sass
60
+ - sass/typography/_uppercase.sass
61
+ - sass/typography/_vertical-rhythm.sass
62
+ - sass/utilities/_border.sass
63
+ - sass/utilities/_boxed.sass
64
+ - sass/utilities/_bullets.sass
65
+ - sass/utilities/_clear.sass
66
+ - sass/utilities/_clearfix.sass
67
+ - sass/utilities/_display.sass
68
+ - sass/utilities/_float.sass
69
+ - sass/utilities/_hide.sass
70
+ - sass/utilities/_horizontal-list.sass
71
+ - sass/utilities/_inline-block.sass
72
+ - sass/utilities/_new-context.sass
73
+ - sass/utilities/_position.sass
74
+ - sass/utilities/_replace-text.sass
75
+ - sass/utilities/_reset.sass
76
+ - sass/utilities/_round-corners.sass
77
+ - sass/utilities/_size.sass
78
+ - sass/utilities/_zebra-striping.sass
79
+ - sass/utilities/ie/_has-layout.sass
80
+ - sass/utilities/safari/_fix-anti-aliasing.sass
81
+ - templates/.gitignore
82
+ has_rdoc: false
83
+ homepage: http://github.com/lloydk/compass-jazen
84
+ licenses:
85
+ post_install_message:
86
+ rdoc_options:
87
+ - --charset=UTF-8
88
+ require_paths:
89
+ - lib
90
+ required_ruby_version: !ruby/object:Gem::Requirement
91
+ requirements:
92
+ - - ">="
93
+ - !ruby/object:Gem::Version
94
+ version: "0"
95
+ version:
96
+ required_rubygems_version: !ruby/object:Gem::Requirement
97
+ requirements:
98
+ - - ">="
99
+ - !ruby/object:Gem::Version
100
+ version: "0"
101
+ version:
102
+ requirements: []
103
+
104
+ rubyforge_project:
105
+ rubygems_version: 1.3.5
106
+ signing_key:
107
+ specification_version: 3
108
+ summary: Port of Jazen's css framework to Compass
109
+ test_files: []
110
+