compass 0.10.4 → 0.10.5.pre.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.
- data/VERSION.yml +2 -2
- data/examples/compass/src/bp_layout.scss +18 -0
- data/frameworks/compass/stylesheets/compass/layout/_floated.scss +111 -0
- data/frameworks/compass/stylesheets/compass/reset/_utilities.scss +1 -1
- data/frameworks/compass/stylesheets/compass/utilities/_lists.scss +1 -0
- data/frameworks/compass/stylesheets/compass/utilities/lists/_inline-block-list.scss +47 -0
- data/lib/compass/commands/update_project.rb +2 -2
- data/lib/compass/configuration/defaults.rb +7 -7
- data/lib/compass/exec.rb +1 -0
- data/lib/compass/exec/project_options_parser.rb +12 -4
- data/lib/compass/sass_extensions/functions/inline_image.rb +1 -1
- data/lib/compass/sass_extensions/functions/urls.rb +4 -5
- data/test/fixtures/stylesheets/compass/css/lists.css +40 -0
- data/test/fixtures/stylesheets/compass/sass/lists.scss +9 -7
- metadata +16 -9
data/VERSION.yml
CHANGED
@@ -0,0 +1,18 @@
|
|
1
|
+
@import "compass/layout/floated";
|
2
|
+
|
3
|
+
// It's easy to build a grid with a floated layout
|
4
|
+
$gutter: $compass-gutter-width;
|
5
|
+
$col-width: 30px;
|
6
|
+
$number-of-columns: 24;
|
7
|
+
$total-width: $number-of-columns * ($col-width + $gutter) - $gutter ;
|
8
|
+
|
9
|
+
@mixin span($n) {
|
10
|
+
width: $n * ($col-width + $gutter) - $gutter;
|
11
|
+
}
|
12
|
+
|
13
|
+
// Provides a number of base classes.
|
14
|
+
@include act-like-blueprint;
|
15
|
+
|
16
|
+
#page { @extend .container; @include span($number-of-columns); }
|
17
|
+
#sidebar { @extend .column; @include span(8); }
|
18
|
+
#content { @extend .column; @include span(16); @extend .last; }
|
@@ -0,0 +1,111 @@
|
|
1
|
+
@import "compass/utilities/general/float";
|
2
|
+
@import "compass/utilities/general/clearfix";
|
3
|
+
|
4
|
+
// Direction of the float
|
5
|
+
$compass-float-direction: left !default;
|
6
|
+
// Set to 0 to disable gutters
|
7
|
+
$compass-gutter-width: 10px !default;
|
8
|
+
$compass-left-gutter-width: ceil($compass-gutter-width / 2);
|
9
|
+
$compass-right-gutter-width: floor($compass-gutter-width / 2);
|
10
|
+
|
11
|
+
// A floated element is generally assigned a width to achieve table-less alignment
|
12
|
+
@mixin floated($side : $compass-float-direction,
|
13
|
+
$left-gutter : $compass-left-gutter-width,
|
14
|
+
$right-gutter : $compass-right-gutter-width) {
|
15
|
+
@include float($side);
|
16
|
+
@if $left-gutter > 0 {
|
17
|
+
margin-left: $left-gutter;
|
18
|
+
}
|
19
|
+
@if $right-gutter > 0 {
|
20
|
+
margin-right: $right-gutter;
|
21
|
+
}
|
22
|
+
}
|
23
|
+
|
24
|
+
// Remove the gutter for a particular side of a floated element
|
25
|
+
// pass `both` to disable the gutter on both sides.
|
26
|
+
@mixin gutterless($side) {
|
27
|
+
margin-#{$side}: 0;
|
28
|
+
@if $side == both {
|
29
|
+
margin-#{opposite-position($side)}: 0;
|
30
|
+
}
|
31
|
+
}
|
32
|
+
|
33
|
+
// provides the base structure required to make an element pushable in
|
34
|
+
// the specified direction (which defaults to `right`).
|
35
|
+
@mixin pushable($side: opposite-position($compass-float-direction)) {
|
36
|
+
@include float($side);
|
37
|
+
position: relative;
|
38
|
+
}
|
39
|
+
|
40
|
+
// provides the base structure required to make an element pullable in
|
41
|
+
// the specified direction (which defaults to `left`).
|
42
|
+
@mixin pullable($side : $compass-float-direction) {
|
43
|
+
@include float($side);
|
44
|
+
position: relative;
|
45
|
+
}
|
46
|
+
|
47
|
+
// push an element in the specified direction by the specified amount.
|
48
|
+
@mixin pushed($side, $amount) {
|
49
|
+
margin-#{$side}: -$amount;
|
50
|
+
margin-#{opposite-position($side)}: $amount;
|
51
|
+
}
|
52
|
+
|
53
|
+
// pull an element in the specified directionn by the specified amount.
|
54
|
+
@mixin pulled($side, $amount) {
|
55
|
+
margin-#{$side}: $amount;
|
56
|
+
}
|
57
|
+
|
58
|
+
// Take an element out of the float if it had been made floated already.
|
59
|
+
// This might be applied to an element to allow it to fill the remainder
|
60
|
+
// of a row, in which case you'll probably want to make that element also
|
61
|
+
// a float container.
|
62
|
+
@mixin sunken {
|
63
|
+
float: none;
|
64
|
+
width: auto;
|
65
|
+
margin-left: auto;
|
66
|
+
margin-right: auto;
|
67
|
+
}
|
68
|
+
|
69
|
+
// make an element centered within its fixed-width parent.
|
70
|
+
// Can be applied to a top level float container to create
|
71
|
+
// a centered layout within the window.
|
72
|
+
@mixin centered {
|
73
|
+
margin-left: auto;
|
74
|
+
margin-right: auto;
|
75
|
+
}
|
76
|
+
|
77
|
+
@mixin act-like-blueprint {
|
78
|
+
.clearfixed { @include pie-clearfix; }
|
79
|
+
.column { @include floated(left, 0, $compass-gutter-width); }
|
80
|
+
.last { @include gutterless(right); }
|
81
|
+
.float-container { @extend .clearfixed; }
|
82
|
+
.container { @extend .float-container; @include centered; }
|
83
|
+
.push { @include pushable; }
|
84
|
+
.pull { @include pullable; }
|
85
|
+
}
|
86
|
+
|
87
|
+
@mixin act-like-960 {
|
88
|
+
.clearfixed { @include pie-clearfix; }
|
89
|
+
.grid { @include floated(left, $compass-gutter-left-width, $compass-gutter-right-width); }
|
90
|
+
.alpha { @include gutterless(left); }
|
91
|
+
.omega { @include gutterless(right); }
|
92
|
+
.container { @extend .clearfixed; }
|
93
|
+
.grid-container { @extend .container; @include centered; }
|
94
|
+
.push { @include pushable; }
|
95
|
+
.pull { @include pullable; }
|
96
|
+
}
|
97
|
+
|
98
|
+
@mixin act-like-oocss {
|
99
|
+
.clearfixed { @include pie-clearfix; }
|
100
|
+
.line { @extend .clearfixed; }
|
101
|
+
.unit { @include floated(left, 0, 0); }
|
102
|
+
.lastUnit { @extend .clearfixed; @include sunken; }
|
103
|
+
.size1of1 { @include sunken; }
|
104
|
+
|
105
|
+
@for $divisions from 2 through 5 {
|
106
|
+
@for $segment from 1 to $divisions {
|
107
|
+
.size#{$segment}of#{$divisions} { width: percentage($segment / $divisions); }
|
108
|
+
}
|
109
|
+
}
|
110
|
+
}
|
111
|
+
|
@@ -104,7 +104,7 @@
|
|
104
104
|
// This reset provides a basic reset for html5 elements
|
105
105
|
// so they are rendered correctly in browsers that don't recognize them.
|
106
106
|
@mixin reset-html5 {
|
107
|
-
|
107
|
+
article, aside, canvas, details, figcaption, figure, footer, header, hgroup, menu, nav, section, summary {
|
108
108
|
display: block; } }
|
109
109
|
|
110
110
|
// Resets the display of inline and block elements to their default display
|
@@ -0,0 +1,47 @@
|
|
1
|
+
// Inline-Block list layout module.
|
2
|
+
//
|
3
|
+
// Easy mode using simple descendant li selectors:
|
4
|
+
//
|
5
|
+
// ul.nav
|
6
|
+
// +inline-block-list
|
7
|
+
//
|
8
|
+
// Advanced mode:
|
9
|
+
// If you need to target the list items using a different selector then use
|
10
|
+
// +inline-block-list-container on your ul/ol and +inline-block-list-item on your li.
|
11
|
+
// This may help when working on layouts involving nested lists. For example:
|
12
|
+
//
|
13
|
+
// ul.nav
|
14
|
+
// +inline-block-list-container
|
15
|
+
// > li
|
16
|
+
// +inline-block-list-item
|
17
|
+
|
18
|
+
@import "bullets";
|
19
|
+
@import "horizontal-list";
|
20
|
+
@import "compass/utilities/general/float";
|
21
|
+
@import "compass/css3/inline-block";
|
22
|
+
|
23
|
+
// Can be mixed into any selector that target a ul or ol that is meant
|
24
|
+
// to have an inline-block layout. Used to implement +inline-block-list.
|
25
|
+
@mixin inline-block-list-container {
|
26
|
+
@include horizontal-list-container; }
|
27
|
+
|
28
|
+
// Can be mixed into any li selector that is meant to participate in a horizontal layout.
|
29
|
+
// Used to implement +inline-block-list.
|
30
|
+
|
31
|
+
@mixin inline-block-list-item($padding: false) {
|
32
|
+
@include no-bullet;
|
33
|
+
@include inline-block;
|
34
|
+
white-space: nowrap;
|
35
|
+
@if $padding {
|
36
|
+
padding: {
|
37
|
+
left: $padding;
|
38
|
+
right: $padding;
|
39
|
+
};
|
40
|
+
}
|
41
|
+
}
|
42
|
+
|
43
|
+
// A list(ol,ul) that is layed out such that the elements are inline-block and won't wrap.
|
44
|
+
@mixin inline-block-list($padding: false) {
|
45
|
+
@include inline-block-list-container;
|
46
|
+
li {
|
47
|
+
@include inline-block-list-item($padding); } }
|
@@ -53,8 +53,8 @@ module Compass
|
|
53
53
|
:dry_run => options[:dry_run])
|
54
54
|
compiler_opts.merge!(additional_options)
|
55
55
|
Compass::Compiler.new(working_path,
|
56
|
-
|
57
|
-
|
56
|
+
Compass.configuration.sass_path,
|
57
|
+
Compass.configuration.css_path,
|
58
58
|
compiler_opts)
|
59
59
|
end
|
60
60
|
|
@@ -44,43 +44,43 @@ module Compass
|
|
44
44
|
|
45
45
|
def default_sass_path
|
46
46
|
if (pp = top_level.project_path) && (dir = top_level.sass_dir)
|
47
|
-
|
47
|
+
Compass.projectize(dir, pp)
|
48
48
|
end
|
49
49
|
end
|
50
50
|
|
51
51
|
def default_css_path
|
52
52
|
if (pp = top_level.project_path) && (dir = top_level.css_dir)
|
53
|
-
|
53
|
+
Compass.projectize(dir, pp)
|
54
54
|
end
|
55
55
|
end
|
56
56
|
|
57
57
|
def default_images_path
|
58
58
|
if (pp = top_level.project_path) && (dir = top_level.images_dir)
|
59
|
-
|
59
|
+
Compass.projectize(dir, pp)
|
60
60
|
end
|
61
61
|
end
|
62
62
|
|
63
63
|
def default_javascripts_path
|
64
64
|
if (pp = top_level.project_path) && (dir = top_level.javascripts_dir)
|
65
|
-
|
65
|
+
Compass.projectize(dir, pp)
|
66
66
|
end
|
67
67
|
end
|
68
68
|
|
69
69
|
def default_extensions_path
|
70
70
|
if (pp = top_level.project_path) && (dir = top_level.extensions_dir)
|
71
|
-
|
71
|
+
Compass.projectize(dir, pp)
|
72
72
|
end
|
73
73
|
end
|
74
74
|
|
75
75
|
def default_fonts_path
|
76
76
|
if (pp = top_level.project_path) && (dir = top_level.fonts_dir)
|
77
|
-
|
77
|
+
Compass.projectize(dir, pp)
|
78
78
|
end
|
79
79
|
end
|
80
80
|
|
81
81
|
def default_cache_path
|
82
82
|
if (pp = top_level.project_path) && (dir = top_level.cache_dir)
|
83
|
-
|
83
|
+
Compass.projectize(dir, pp)
|
84
84
|
end
|
85
85
|
end
|
86
86
|
|
data/lib/compass/exec.rb
CHANGED
@@ -3,6 +3,14 @@ module Compass::Exec::ProjectOptionsParser
|
|
3
3
|
super
|
4
4
|
set_project_options(opts)
|
5
5
|
end
|
6
|
+
def set_dir_or_path(type, dir)
|
7
|
+
if Pathname.new(dir).absolute?
|
8
|
+
self.options[:"#{type}_path"] = dir.tr('\\','/')
|
9
|
+
else
|
10
|
+
self.options[:"#{type}_dir"] = dir.tr('\\','/')
|
11
|
+
end
|
12
|
+
end
|
13
|
+
|
6
14
|
def set_project_options(opts)
|
7
15
|
opts.on('-c', '--config CONFIG_FILE', 'Specify the location of the configuration file explicitly.') do |configuration_file|
|
8
16
|
self.options[:configuration_file] = configuration_file
|
@@ -13,19 +21,19 @@ module Compass::Exec::ProjectOptionsParser
|
|
13
21
|
end
|
14
22
|
|
15
23
|
opts.on('--sass-dir SRC_DIR', "The source directory where you keep your sass stylesheets.") do |sass_dir|
|
16
|
-
|
24
|
+
set_dir_or_path(:sass, sass_dir)
|
17
25
|
end
|
18
26
|
|
19
27
|
opts.on('--css-dir CSS_DIR', "The target directory where you keep your css stylesheets.") do |css_dir|
|
20
|
-
|
28
|
+
set_dir_or_path(:css, css_dir)
|
21
29
|
end
|
22
30
|
|
23
31
|
opts.on('--images-dir IMAGES_DIR', "The directory where you keep your images.") do |images_dir|
|
24
|
-
|
32
|
+
set_dir_or_path(:images, images_dir)
|
25
33
|
end
|
26
34
|
|
27
35
|
opts.on('--javascripts-dir JS_DIR', "The directory where you keep your javascripts.") do |javascripts_dir|
|
28
|
-
|
36
|
+
set_dir_or_path(:javascripts, javascripts_dir)
|
29
37
|
end
|
30
38
|
|
31
39
|
opts.on('-e ENV', '--environment ENV', [:development, :production], 'Use sensible defaults for your current environment.',
|
@@ -46,7 +46,7 @@ private
|
|
46
46
|
|
47
47
|
def data(real_path)
|
48
48
|
if File.readable?(real_path)
|
49
|
-
[File.
|
49
|
+
[File.open(real_path, "rb") {|io| io.read}].pack('m').gsub("\n","")
|
50
50
|
else
|
51
51
|
raise Compass::Error, "File not found or cannot be read: #{real_path}"
|
52
52
|
end
|
@@ -4,7 +4,7 @@ module Compass::SassExtensions::Functions::Urls
|
|
4
4
|
# Compute the path to the stylesheet, either root relative or stylesheet relative
|
5
5
|
# or nil if the http_images_path is not set in the configuration.
|
6
6
|
http_stylesheets_path = if relative?
|
7
|
-
compute_relative_path(Compass.configuration.
|
7
|
+
compute_relative_path(Compass.configuration.css_path)
|
8
8
|
elsif Compass.configuration.http_stylesheets_path
|
9
9
|
Compass.configuration.http_stylesheets_path
|
10
10
|
else
|
@@ -30,7 +30,7 @@ module Compass::SassExtensions::Functions::Urls
|
|
30
30
|
# Compute the path to the font file, either root relative or stylesheet relative
|
31
31
|
# or nil if the http_fonts_path cannot be determined from the configuration.
|
32
32
|
http_fonts_path = if relative?
|
33
|
-
compute_relative_path(Compass.configuration.
|
33
|
+
compute_relative_path(Compass.configuration.fonts_path)
|
34
34
|
else
|
35
35
|
Compass.configuration.http_fonts_path
|
36
36
|
end
|
@@ -59,7 +59,7 @@ module Compass::SassExtensions::Functions::Urls
|
|
59
59
|
# Compute the path to the image, either root relative or stylesheet relative
|
60
60
|
# or nil if the http_images_path is not set in the configuration.
|
61
61
|
http_images_path = if relative?
|
62
|
-
compute_relative_path(Compass.configuration.
|
62
|
+
compute_relative_path(Compass.configuration.images_path)
|
63
63
|
elsif Compass.configuration.http_images_path
|
64
64
|
Compass.configuration.http_images_path
|
65
65
|
else
|
@@ -118,9 +118,8 @@ module Compass::SassExtensions::Functions::Urls
|
|
118
118
|
path[0..0] == "/" || path[0..3] == "http"
|
119
119
|
end
|
120
120
|
|
121
|
-
def compute_relative_path(
|
121
|
+
def compute_relative_path(path)
|
122
122
|
if (target_css_file = options[:css_filename])
|
123
|
-
path = File.join(Compass.configuration.project_path, dir)
|
124
123
|
Pathname.new(path).relative_path_from(Pathname.new(File.dirname(target_css_file))).to_s
|
125
124
|
end
|
126
125
|
end
|
@@ -61,6 +61,46 @@ ul.right-horizontal {
|
|
61
61
|
ul.right-horizontal li:last-child, ul.right-horizontal li.last {
|
62
62
|
padding-left: 0px; }
|
63
63
|
|
64
|
+
ul.inline-block {
|
65
|
+
margin: 0;
|
66
|
+
padding: 0;
|
67
|
+
border: 0;
|
68
|
+
outline: 0;
|
69
|
+
overflow: hidden;
|
70
|
+
*zoom: 1; }
|
71
|
+
ul.inline-block li {
|
72
|
+
list-style-image: none;
|
73
|
+
list-style-type: none;
|
74
|
+
margin-left: 0px;
|
75
|
+
display: -moz-inline-box;
|
76
|
+
-moz-box-orient: vertical;
|
77
|
+
display: inline-block;
|
78
|
+
vertical-align: middle;
|
79
|
+
*display: inline;
|
80
|
+
*vertical-align: auto;
|
81
|
+
white-space: nowrap; }
|
82
|
+
|
83
|
+
ul.wide-inline-block {
|
84
|
+
margin: 0;
|
85
|
+
padding: 0;
|
86
|
+
border: 0;
|
87
|
+
outline: 0;
|
88
|
+
overflow: hidden;
|
89
|
+
*zoom: 1; }
|
90
|
+
ul.wide-inline-block li {
|
91
|
+
list-style-image: none;
|
92
|
+
list-style-type: none;
|
93
|
+
margin-left: 0px;
|
94
|
+
display: -moz-inline-box;
|
95
|
+
-moz-box-orient: vertical;
|
96
|
+
display: inline-block;
|
97
|
+
vertical-align: middle;
|
98
|
+
*display: inline;
|
99
|
+
*vertical-align: auto;
|
100
|
+
white-space: nowrap;
|
101
|
+
padding-left: 10px;
|
102
|
+
padding-right: 10px; }
|
103
|
+
|
64
104
|
ul.inline {
|
65
105
|
list-style-type: none; }
|
66
106
|
ul.inline, ul.inline li {
|
@@ -1,9 +1,11 @@
|
|
1
1
|
@import "compass/utilities/lists";
|
2
2
|
|
3
|
-
ul.horizontal
|
4
|
-
ul.wide-horizontal
|
5
|
-
ul.right-horizontal
|
6
|
-
ul.inline
|
7
|
-
ul.
|
8
|
-
ul.
|
9
|
-
ul.
|
3
|
+
ul.horizontal { @include horizontal-list; }
|
4
|
+
ul.wide-horizontal { @include horizontal-list(10px); }
|
5
|
+
ul.right-horizontal { @include horizontal-list(4px, right); }
|
6
|
+
ul.inline-block { @include inline-block-list; }
|
7
|
+
ul.wide-inline-block { @include inline-block-list(10px); }
|
8
|
+
ul.inline { @include inline-list; }
|
9
|
+
ul.comma { @include comma-delimited-list; }
|
10
|
+
ul.no-bullets { @include no-bullets; }
|
11
|
+
ul.pretty { @include pretty-bullets("4x6.png"); }
|
metadata
CHANGED
@@ -1,13 +1,15 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: compass
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
hash:
|
5
|
-
prerelease:
|
4
|
+
hash: 1923831843
|
5
|
+
prerelease: true
|
6
6
|
segments:
|
7
7
|
- 0
|
8
8
|
- 10
|
9
|
-
-
|
10
|
-
|
9
|
+
- 5
|
10
|
+
- pre
|
11
|
+
- 1
|
12
|
+
version: 0.10.5.pre.1
|
11
13
|
platform: ruby
|
12
14
|
authors:
|
13
15
|
- Chris Eppstein
|
@@ -17,7 +19,7 @@ autorequire:
|
|
17
19
|
bindir: bin
|
18
20
|
cert_chain: []
|
19
21
|
|
20
|
-
date: 2010-08-
|
22
|
+
date: 2010-08-27 00:00:00 -07:00
|
21
23
|
default_executable: compass
|
22
24
|
dependencies:
|
23
25
|
- !ruby/object:Gem::Dependency
|
@@ -117,6 +119,7 @@ files:
|
|
117
119
|
- examples/compass/compass.html.haml
|
118
120
|
- examples/compass/config.rb
|
119
121
|
- examples/compass/images/blue_arrow.gif
|
122
|
+
- examples/compass/src/bp_layout.scss
|
120
123
|
- examples/compass/src/compass.scss
|
121
124
|
- examples/compass/src/images/blue_arrow.gif
|
122
125
|
- examples/compass/src/sticky_footer.scss
|
@@ -318,6 +321,7 @@ files:
|
|
318
321
|
- frameworks/compass/stylesheets/compass/css3/_text-shadow.scss
|
319
322
|
- frameworks/compass/stylesheets/compass/css3/_transform.scss
|
320
323
|
- frameworks/compass/stylesheets/compass/css3/_transition.scss
|
324
|
+
- frameworks/compass/stylesheets/compass/layout/_floated.scss
|
321
325
|
- frameworks/compass/stylesheets/compass/layout/_sticky-footer.scss
|
322
326
|
- frameworks/compass/stylesheets/compass/reset/_utilities.scss
|
323
327
|
- frameworks/compass/stylesheets/compass/utilities/_general.scss
|
@@ -339,6 +343,7 @@ files:
|
|
339
343
|
- frameworks/compass/stylesheets/compass/utilities/links/_unstyled-link.scss
|
340
344
|
- frameworks/compass/stylesheets/compass/utilities/lists/_bullets.scss
|
341
345
|
- frameworks/compass/stylesheets/compass/utilities/lists/_horizontal-list.scss
|
346
|
+
- frameworks/compass/stylesheets/compass/utilities/lists/_inline-block-list.scss
|
342
347
|
- frameworks/compass/stylesheets/compass/utilities/lists/_inline-list.scss
|
343
348
|
- frameworks/compass/stylesheets/compass/utilities/sprites/_sprite-img.scss
|
344
349
|
- frameworks/compass/stylesheets/compass/utilities/tables/_alternating-rows-and-columns.scss
|
@@ -582,12 +587,14 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
582
587
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
583
588
|
none: false
|
584
589
|
requirements:
|
585
|
-
- - "
|
590
|
+
- - ">"
|
586
591
|
- !ruby/object:Gem::Version
|
587
|
-
hash:
|
592
|
+
hash: 25
|
588
593
|
segments:
|
589
|
-
-
|
590
|
-
|
594
|
+
- 1
|
595
|
+
- 3
|
596
|
+
- 1
|
597
|
+
version: 1.3.1
|
591
598
|
requirements: []
|
592
599
|
|
593
600
|
rubyforge_project:
|