curry-powder 0.4.0

Sign up to get free protection for your applications and to get access to all the features.
@@ -0,0 +1,38 @@
1
+ # -*- encoding: utf-8 -*-
2
+
3
+ Gem::Specification.new do |s|
4
+ s.name = %q{curry-powder}
5
+ s.version = "0.4.0"
6
+
7
+ s.required_rubygems_version = Gem::Requirement.new(">= 1.3.5")
8
+ s.authors = ["Andrea Campi"]
9
+ s.date = %q{2011-03-18}
10
+ s.description = %q{A Compass plugin to provide basic styles for treesaver.js.}
11
+ s.email = %w{andrea.campi@zephirworks.com}
12
+ s.has_rdoc = false
13
+ s.files = [
14
+ "curry-powder.gemspec",
15
+ "lib/curry.rb",
16
+ "stylesheets/_curry.scss",
17
+ "stylesheets/curry/_basic.scss",
18
+ "stylesheets/curry/_chrome.scss",
19
+ "stylesheets/curry/_config.scss",
20
+ "stylesheets/curry/_grid.scss",
21
+ "stylesheets/curry/_layout.scss",
22
+ "stylesheets/curry/_reset.scss",
23
+ "stylesheets/curry/basic/_base.scss",
24
+ "stylesheets/curry/chrome/_base.scss",
25
+ "stylesheets/curry/chrome/_controls.scss",
26
+ "stylesheets/curry/chrome/_viewer.scss",
27
+ "stylesheets/curry/grid/_base.scss",
28
+ "stylesheets/curry/layout/_base.scss",
29
+ "templates/project/_use_curry.scss",
30
+ "templates/project/manifest.rb"
31
+ ]
32
+ s.homepage = %q{http://zephirworks.com/}
33
+ s.require_paths = ["lib"]
34
+ s.rubyforge_project = %q{curry-powder}
35
+ s.rubygems_version = %q{1.3.6}
36
+ s.summary = %q{Compass stylesheets for treesaver.js.}
37
+ s.add_dependency(%q<compass>, ["~> 0.11"])
38
+ end
data/lib/curry.rb ADDED
@@ -0,0 +1,3 @@
1
+ require 'compass'
2
+
3
+ Compass::Frameworks.register("curry", :path => File.expand_path("..", File.dirname(__FILE__)))
@@ -0,0 +1,6 @@
1
+ @import "curry/config";
2
+ @import "curry/reset";
3
+ @import "curry/basic";
4
+ @import "curry/chrome";
5
+ @import "curry/grid";
6
+ @import "curry/layout";
@@ -0,0 +1,26 @@
1
+ /*
2
+ * Basic module:
3
+ *
4
+ * Basic styling for the whole "site".
5
+ *
6
+ * These macros provide basic styling: setting `overflow: hidden` on the `body` and
7
+ * Treesaver containers, establishing a `line-height` grid and so on. They are
8
+ * automatically included when the plugin is loaded.
9
+ */
10
+
11
+ @import "curry/config";
12
+ @import "curry/basic/base";
13
+
14
+ @mixin curry-basic-setup {
15
+ @include -curry-basic-setup;
16
+ @include -curry-basic-setup-group;
17
+ @include -curry-basic-error-and-loading;
18
+
19
+ // FIXME
20
+ .fill {
21
+ left: 0;
22
+ top: 0;
23
+ }
24
+ }
25
+
26
+ @include curry-basic-setup;
@@ -0,0 +1,44 @@
1
+ /*
2
+ * Chrome module:
3
+ *
4
+ * These macros aid in setting up chromes.
5
+ */
6
+
7
+ @import "curry/config";
8
+ @import "curry/chrome/base";
9
+ @import "curry/chrome/viewer";
10
+ @import "curry/chrome/controls";
11
+
12
+ /*
13
+ * Sets up the "viewer" to take up the whole screen. Use it when you don't want
14
+ * a controls bar, perhaps because you are using a native shell to provide
15
+ * navigation.
16
+ */
17
+ @mixin curry-chrome-viewer {
18
+ @include -curry-chrome-viewer(0);
19
+ @include -curry-chrome-controls-hide;
20
+ }
21
+
22
+ /*
23
+ * Sets up a controls bar at the top of the screen, with the provided height
24
+ * (30px by default), with the viewer taking up the remaining height.
25
+ * Minimal styling is provided for the controls, aligning `left` and `right`
26
+ * buttons to their respective sides.
27
+ */
28
+ @mixin curry-chrome-viewer-with-top-controls($controls-height: 30px) {
29
+ @include -curry-chrome-viewer($controls-height, "top");
30
+ @include -curry-chrome-controls($controls-height, "top");
31
+ }
32
+
33
+ /*
34
+ * Sets up a controls bar at the bottom of the screen, with the provided height
35
+ * (30px by default), with the viewer taking up the remaining height.
36
+ * Minimal styling is provided for the controls, aligning `left` and `right`
37
+ * buttons to their respective sides.
38
+ */
39
+ @mixin curry-chrome-viewer-with-bottom-controls($controls-height: 30px) {
40
+ @include -curry-chrome-viewer($controls-height);
41
+ @include -curry-chrome-controls($controls-height);
42
+ }
43
+
44
+ @include -curry-chrome-size;
@@ -0,0 +1,17 @@
1
+ //
2
+ // Basic module
3
+ //
4
+
5
+ $curry-line-height: 24px !default; // Vertical grid
6
+
7
+ //
8
+ // Chrome module
9
+ //
10
+
11
+ $curry-chrome-maximum-smallscreen-width: 480px !default; // Any device wider
12
+ // than this will use "normal" grids, anything smaller will use "small" chromes.
13
+
14
+ //
15
+ // Grid module
16
+ //
17
+ $curry-grid-smallscreen-width: 300px !default;
@@ -0,0 +1,18 @@
1
+ /*
2
+ * Grid module:
3
+ *
4
+ * This set of macros takes care of the minimal styles necessary to set up
5
+ * grids of different sizes, while retaining control over their use on big- and
6
+ * small-screen devices. They are automatically called when the plugin is loaded.
7
+ */
8
+
9
+ @import "curry/config";
10
+ @import "curry/grid/base";
11
+
12
+ @mixin curry-grid-default {
13
+ @include -curry-grid-base;
14
+ @include -curry-grid-support-smallscreen-mobile;
15
+ @include -curry-grid-fixed;
16
+ }
17
+
18
+ @include curry-grid-default;
@@ -0,0 +1,27 @@
1
+ /*
2
+ * Layout module:
3
+ *
4
+ * NOTE: these macros are experimental, they may change or be removed in a future
5
+ * release. The mix of "full" and "half" widths is also very confusing.
6
+ */
7
+
8
+ @import "curry/layout/base";
9
+
10
+ /*
11
+ * Sets up a set of classes that can be applied to columns and containers to
12
+ * determine their width and position.
13
+ */
14
+ @mixin curry-layout-setup($width, $margin, $steps) {
15
+ .grid {
16
+ width: $width;
17
+ }
18
+
19
+ .column, .container {
20
+ width: $width;
21
+ top: 0;
22
+ bottom: 0;
23
+ }
24
+
25
+ @include -curry-layout-column-widths($steps, $width, $margin);
26
+ @include -curry-layout-columns($steps, $width, $margin);
27
+ }
@@ -0,0 +1,9 @@
1
+ @import "compass/reset/utilities";
2
+
3
+ html, body, h1, h2, h3, h4, h5, h6 {
4
+ @include reset-box-model;
5
+ }
6
+
7
+ p {
8
+ margin: 0;
9
+ }
@@ -0,0 +1,58 @@
1
+ //
2
+ // Basic styling for the whole "site"; they are pretty much mandatory.
3
+ //
4
+ @mixin -curry-basic-setup {
5
+ .treesaver {
6
+ body {
7
+ overflow: hidden;
8
+ }
9
+ }
10
+
11
+ .chrome, .viewer, .grid, .column, .container {
12
+ position: absolute;
13
+ overflow: hidden;
14
+ line-height: $curry-line-height;
15
+ }
16
+
17
+ div, p, button {
18
+ line-height: $curry-line-height;
19
+ }
20
+
21
+ h1, h2, h3, h4, h5, h6 {
22
+ line-height: $curry-line-height;
23
+ }
24
+
25
+ .hidden, .microdata {
26
+ display: none !important;
27
+ }
28
+ }
29
+
30
+ // XXX is this really generic?
31
+ @mixin -curry-basic-setup-group {
32
+ .group {
33
+ top: 0;
34
+ bottom: 0;
35
+ padding: 0;
36
+ position: absolute;
37
+ }
38
+ }
39
+
40
+ //
41
+ // Basic styling for the error and loading floats.
42
+ // This may be stretching our goal of "structure, not presentation", but
43
+ // without them the loader would be just too damn ugly.
44
+ //
45
+ // XXX replace magic values
46
+ //
47
+ @mixin -curry-basic-error-and-loading {
48
+ .error, .loading {
49
+ position: absolute;
50
+ width: 160px;
51
+ height: 100px;
52
+ letter-spacing: 2px;
53
+ margin: 0 0 0 20px;
54
+ img {
55
+ display: inline;
56
+ }
57
+ }
58
+ }
@@ -0,0 +1,14 @@
1
+ //
2
+ // Generates styles that make sure that "normal" chromes are only used on
3
+ // devices bigger than the given width (480px by default), and small chromes
4
+ // are used on smaller devices.
5
+ //
6
+ @mixin -curry-chrome-size {
7
+ .chrome {
8
+ min-width: $curry-chrome-maximum-smallscreen-width;
9
+ &.small {
10
+ min-width: 0;
11
+ max-width: $curry-chrome-maximum-smallscreen-width;
12
+ }
13
+ }
14
+ }
@@ -0,0 +1,47 @@
1
+ @mixin -curry-chrome-controls-top-or-bottom($side) {
2
+ @if $side == "top" { top: 0; }
3
+ @if $side == "bottom" { bottom: 0; }
4
+ }
5
+
6
+ //
7
+ // A basic controls bar, anchored to either to bottom or top edges of the
8
+ // viewspace. Use it in conjunction with -curry-chrome-viewer to ensure
9
+ // viewer and controls will not overlap.
10
+ //
11
+ @mixin -curry-chrome-controls($height, $side: "bottom") {
12
+ .controls {
13
+ position: absolute;
14
+ @include -curry-chrome-controls-top-or-bottom($side);
15
+ left: 0;
16
+ right: 0;
17
+ height: $height;
18
+ line-height: $height;
19
+
20
+ .prev, .next {
21
+ border: none;
22
+ margin: 0;
23
+ padding: 0;
24
+
25
+ &:disabled {
26
+ display: none;
27
+ }
28
+ }
29
+
30
+ .prev {
31
+ position: absolute;
32
+ left: 0;
33
+ }
34
+
35
+ .next {
36
+ position: absolute;
37
+ right: 0;
38
+ }
39
+ }
40
+ }
41
+
42
+ @mixin -curry-chrome-controls-hide {
43
+ .controls {
44
+ display: none;
45
+ }
46
+ }
47
+
@@ -0,0 +1,17 @@
1
+ @mixin -curry-chrome-viewer-top-and-bottom($height, $side) {
2
+ @if $side == "top" { top: $height; bottom: 0; }
3
+ @if $side == "bottom" { top: 0; bottom: $height; }
4
+ }
5
+
6
+ //
7
+ // The main viewer area, set up to fill the whole viewport. You can optionally
8
+ // ask it to reserve some space either at the top or the bottom, mostly for
9
+ // use in conjunction with -curry-chrome-controls.
10
+ //
11
+ @mixin -curry-chrome-viewer($height, $side: "bottom") {
12
+ .viewer {
13
+ @include -curry-chrome-viewer-top-and-bottom($height, $side);
14
+ left: 0;
15
+ right: 0;
16
+ }
17
+ }
@@ -0,0 +1,48 @@
1
+ @mixin -curry-grid-hide {
2
+ min-width: 9001px;
3
+ width: 9001px;
4
+ }
5
+
6
+ // XXX slightly magical, do not change
7
+ @mixin -curry-grid-base {
8
+ .grid {
9
+ top: 50%;
10
+ z-index: 1;
11
+ }
12
+ }
13
+
14
+ //
15
+ // Ensure mobile grids cannot be used by mistake on big screens, and that
16
+ // small-screen mobile devices can only used grids marked for mobiles.
17
+ // Note that you still have to add size-specific classes to specify grid sizes.
18
+ //
19
+ @mixin -curry-grid-support-smallscreen-mobile {
20
+ .grid.mobile {
21
+ @include -curry-grid-hide;
22
+ }
23
+
24
+ .smallscreen.mobile .grid {
25
+ @include -curry-grid-hide;
26
+
27
+ &.mobile {
28
+ width: $curry-grid-smallscreen-width;
29
+ min-width: $curry-grid-smallscreen-width;
30
+ }
31
+ }
32
+ }
33
+
34
+ //
35
+ // A fixed grid has exact sizes and has no padding.
36
+ // You will need to specify the size with other classes.
37
+ //
38
+ // FIXME .fixed vs .full vs other?
39
+ //
40
+ @mixin -curry-grid-fixed {
41
+ .grid.fixed {
42
+ max-width: none;
43
+ max-height: none;
44
+ min-width: none;
45
+ min-height: none;
46
+ padding: 0;
47
+ }
48
+ }
@@ -0,0 +1,15 @@
1
+ @mixin -curry-layout-column-widths($colgroups, $width, $margin) {
2
+ @for $n from 1 through $colgroups {
3
+ .cols-#{$n} {
4
+ width: ($n - 1) * ($width + $margin) + $width;
5
+ }
6
+ }
7
+ }
8
+
9
+ @mixin -curry-layout-columns($cols, $width, $margin) {
10
+ @for $n from 1 through $cols {
11
+ .col-#{$n} {
12
+ margin-left: ($n - 1) * ($width + $margin);
13
+ }
14
+ }
15
+ }
@@ -0,0 +1 @@
1
+ @import "curry";
@@ -0,0 +1 @@
1
+ stylesheet '_use_curry.scss', :media => 'screen'
metadata ADDED
@@ -0,0 +1,83 @@
1
+ --- !ruby/object:Gem::Specification
2
+ name: curry-powder
3
+ version: !ruby/object:Gem::Version
4
+ prerelease:
5
+ version: 0.4.0
6
+ platform: ruby
7
+ authors:
8
+ - Andrea Campi
9
+ autorequire:
10
+ bindir: bin
11
+ cert_chain: []
12
+
13
+ date: 2011-03-18 00:00:00 +01:00
14
+ default_executable:
15
+ dependencies:
16
+ - !ruby/object:Gem::Dependency
17
+ name: compass
18
+ prerelease: false
19
+ requirement: &id001 !ruby/object:Gem::Requirement
20
+ none: false
21
+ requirements:
22
+ - - ~>
23
+ - !ruby/object:Gem::Version
24
+ version: "0.11"
25
+ type: :runtime
26
+ version_requirements: *id001
27
+ description: A Compass plugin to provide basic styles for treesaver.js.
28
+ email:
29
+ - andrea.campi@zephirworks.com
30
+ executables: []
31
+
32
+ extensions: []
33
+
34
+ extra_rdoc_files: []
35
+
36
+ files:
37
+ - curry-powder.gemspec
38
+ - lib/curry.rb
39
+ - stylesheets/_curry.scss
40
+ - stylesheets/curry/_basic.scss
41
+ - stylesheets/curry/_chrome.scss
42
+ - stylesheets/curry/_config.scss
43
+ - stylesheets/curry/_grid.scss
44
+ - stylesheets/curry/_layout.scss
45
+ - stylesheets/curry/_reset.scss
46
+ - stylesheets/curry/basic/_base.scss
47
+ - stylesheets/curry/chrome/_base.scss
48
+ - stylesheets/curry/chrome/_controls.scss
49
+ - stylesheets/curry/chrome/_viewer.scss
50
+ - stylesheets/curry/grid/_base.scss
51
+ - stylesheets/curry/layout/_base.scss
52
+ - templates/project/_use_curry.scss
53
+ - templates/project/manifest.rb
54
+ has_rdoc: true
55
+ homepage: http://zephirworks.com/
56
+ licenses: []
57
+
58
+ post_install_message:
59
+ rdoc_options: []
60
+
61
+ require_paths:
62
+ - lib
63
+ required_ruby_version: !ruby/object:Gem::Requirement
64
+ none: false
65
+ requirements:
66
+ - - ">="
67
+ - !ruby/object:Gem::Version
68
+ version: "0"
69
+ required_rubygems_version: !ruby/object:Gem::Requirement
70
+ none: false
71
+ requirements:
72
+ - - ">="
73
+ - !ruby/object:Gem::Version
74
+ version: 1.3.5
75
+ requirements: []
76
+
77
+ rubyforge_project: curry-powder
78
+ rubygems_version: 1.5.2
79
+ signing_key:
80
+ specification_version: 3
81
+ summary: Compass stylesheets for treesaver.js.
82
+ test_files: []
83
+