compass 1.0.0.alpha.15 → 1.0.0.alpha.16
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/RELEASE_VERSION +1 -1
- data/VERSION +1 -1
- data/lib/compass/commands/update_project.rb +5 -0
- data/lib/compass/compiler.rb +50 -11
- data/lib/compass/configuration/serialization.rb +4 -0
- data/lib/compass/sass_extensions/functions/sprites.rb +31 -29
- data/lib/compass/sass_extensions/sprites/image.rb +4 -3
- data/lib/compass/sass_extensions/sprites/image_methods.rb +2 -2
- data/lib/compass/sass_extensions/sprites/sprite_map.rb +6 -5
- data/lib/compass/stats.rb +1 -1
- data/lib/compass/watcher/compiler.rb +3 -2
- data/lib/compass/watcher/project_watcher.rb +4 -4
- data/test/fixtures/stylesheets/compass/config.rb +1 -0
- data/test/fixtures/stylesheets/compass/css/lists.css +4 -4
- data/test/fixtures/stylesheets/compass/css/vertical_rhythm.css +0 -169
- data/test/fixtures/stylesheets/compass/css/vertical_rhythm_with_ems.css +51 -0
- data/test/fixtures/stylesheets/compass/css/vertical_rhythm_with_px.css +50 -0
- data/test/fixtures/stylesheets/compass/css/vertical_rhythm_with_rems.css +65 -0
- data/test/fixtures/stylesheets/compass/sass/vertical_rhythm.scss +0 -157
- data/test/fixtures/stylesheets/compass/sass/vertical_rhythm_with_ems.scss +52 -0
- data/test/fixtures/stylesheets/compass/sass/vertical_rhythm_with_px.scss +50 -0
- data/test/fixtures/stylesheets/compass/sass/vertical_rhythm_with_rems.scss +50 -0
- data/test/fixtures/stylesheets/envtest/tmp/env.css +2 -2
- data/test/helpers/command_line.rb +1 -1
- data/test/units/configuration_test.rb +6 -0
- data/test/units/sass_extensions_test.rb +9 -3
- data/test/units/sass_extenstions/gradients_test.rb +8 -11
- metadata +41 -13
@@ -0,0 +1,52 @@
|
|
1
|
+
/* New test using em output */
|
2
|
+
$base-font-size: 18px;
|
3
|
+
$base-line-height: $base-font-size * 1.4;
|
4
|
+
$rhythm-unit: em;
|
5
|
+
$default-rhythm-border-style: solid #aaa;
|
6
|
+
|
7
|
+
@import "compass/typography/vertical_rhythm";
|
8
|
+
|
9
|
+
@include establish-baseline;
|
10
|
+
|
11
|
+
.container {
|
12
|
+
@include debug-vertical-alignment;
|
13
|
+
}
|
14
|
+
|
15
|
+
p {
|
16
|
+
@include margin-leader;
|
17
|
+
@include margin-trailer;
|
18
|
+
}
|
19
|
+
|
20
|
+
th,
|
21
|
+
td {
|
22
|
+
@include rhythm-padding(.25);
|
23
|
+
}
|
24
|
+
|
25
|
+
// Incremental leading made easy!
|
26
|
+
.caption {
|
27
|
+
@include adjust-font-size-to(13px, 4/5);
|
28
|
+
}
|
29
|
+
|
30
|
+
.spaced-out {
|
31
|
+
@include adjust-leading-to(1.5);
|
32
|
+
}
|
33
|
+
|
34
|
+
blockquote {
|
35
|
+
@include rhythm-margins;
|
36
|
+
padding: 0 rhythm();
|
37
|
+
}
|
38
|
+
|
39
|
+
.fig-quote {
|
40
|
+
> blockquote {
|
41
|
+
@include trailer(.5);
|
42
|
+
}
|
43
|
+
.source {
|
44
|
+
@include adjust-font-size-to(13px, auto);
|
45
|
+
@include trailer(.5, 13px);
|
46
|
+
}
|
47
|
+
}
|
48
|
+
|
49
|
+
.panel {
|
50
|
+
@include adjust-font-size-to(16px);
|
51
|
+
@include rhythm-borders($font-size: 16px);
|
52
|
+
}
|
@@ -0,0 +1,50 @@
|
|
1
|
+
/* New using px output */
|
2
|
+
$base-font-size: 18px;
|
3
|
+
$base-line-height: $base-font-size * 1.4;
|
4
|
+
$rhythm-unit: px;
|
5
|
+
$default-rhythm-border-style: solid #aaa;
|
6
|
+
@import "compass/typography/vertical_rhythm";
|
7
|
+
|
8
|
+
@include establish-baseline;
|
9
|
+
|
10
|
+
.container {
|
11
|
+
@include debug-vertical-alignment;
|
12
|
+
}
|
13
|
+
|
14
|
+
p {
|
15
|
+
@include margin-leader;
|
16
|
+
@include margin-trailer;
|
17
|
+
}
|
18
|
+
|
19
|
+
th,
|
20
|
+
td {
|
21
|
+
@include rhythm-padding(.25);
|
22
|
+
}
|
23
|
+
|
24
|
+
/* Incremental leading made easy! */
|
25
|
+
.caption {
|
26
|
+
@include adjust-font-size-to(.85rem, 4/5);
|
27
|
+
}
|
28
|
+
|
29
|
+
.spaced-out {
|
30
|
+
@include adjust-leading-to(1.5);
|
31
|
+
}
|
32
|
+
|
33
|
+
blockquote {
|
34
|
+
@include rhythm-margins;
|
35
|
+
padding: 0 rhythm();
|
36
|
+
}
|
37
|
+
|
38
|
+
.fig-quote {
|
39
|
+
> blockquote {
|
40
|
+
@include trailer(.5);
|
41
|
+
}
|
42
|
+
.source {
|
43
|
+
@include adjust-font-size-to(.85rem, auto);
|
44
|
+
@include trailer(.5);
|
45
|
+
}
|
46
|
+
}
|
47
|
+
|
48
|
+
.panel {
|
49
|
+
@include rhythm-borders;
|
50
|
+
}
|
@@ -0,0 +1,50 @@
|
|
1
|
+
/* New using rem output with pixel fallbacks */
|
2
|
+
$base-font-size: 18px;
|
3
|
+
$base-line-height: $base-font-size * 1.4;
|
4
|
+
$rhythm-unit: rem;
|
5
|
+
$default-rhythm-border-style: solid #aaa;
|
6
|
+
@import "compass/typography/vertical_rhythm";
|
7
|
+
|
8
|
+
@include establish-baseline;
|
9
|
+
|
10
|
+
.container {
|
11
|
+
@include debug-vertical-alignment;
|
12
|
+
}
|
13
|
+
|
14
|
+
p {
|
15
|
+
@include margin-leader;
|
16
|
+
@include margin-trailer;
|
17
|
+
}
|
18
|
+
|
19
|
+
th,
|
20
|
+
td {
|
21
|
+
@include rhythm-padding(.25);
|
22
|
+
}
|
23
|
+
|
24
|
+
/* Incremental leading made easy! */
|
25
|
+
.caption {
|
26
|
+
@include adjust-font-size-to(.85rem, 4/5);
|
27
|
+
}
|
28
|
+
|
29
|
+
.spaced-out {
|
30
|
+
@include adjust-leading-to(1.5);
|
31
|
+
}
|
32
|
+
|
33
|
+
blockquote {
|
34
|
+
@include rhythm-margins;
|
35
|
+
padding: 0 rhythm();
|
36
|
+
}
|
37
|
+
|
38
|
+
.fig-quote {
|
39
|
+
> blockquote {
|
40
|
+
@include trailer(.5);
|
41
|
+
}
|
42
|
+
.source {
|
43
|
+
@include adjust-font-size-to(.85rem, auto);
|
44
|
+
@include trailer(.5);
|
45
|
+
}
|
46
|
+
}
|
47
|
+
|
48
|
+
.panel {
|
49
|
+
@include rhythm-borders;
|
50
|
+
}
|
@@ -92,7 +92,7 @@ module Compass::CommandLineHelper
|
|
92
92
|
end
|
93
93
|
message = "Action #{action.inspect} was not performed on: #{path}."
|
94
94
|
message += "The following actions were performed: #{actions_found.map{|a|a.inspect}.join(", ")}" if actions_found.any?
|
95
|
-
|
95
|
+
puts @last_result
|
96
96
|
fail message
|
97
97
|
end
|
98
98
|
|
@@ -22,6 +22,7 @@ class ConfigurationTest < Test::Unit::TestCase
|
|
22
22
|
def test_parse_and_serialize
|
23
23
|
contents = StringIO.new(<<-CONFIG)
|
24
24
|
require 'compass'
|
25
|
+
require 'compass/import-once/activate'
|
25
26
|
# Require any additional compass plugins here.
|
26
27
|
|
27
28
|
project_type = :stand_alone
|
@@ -353,6 +354,7 @@ CONFIG
|
|
353
354
|
assert_equal "/home/chris/my_compass_project/css/foo", plugin_opts[:template_location].find{|s,c| s == "/home/chris/my_compass_project/../foo"}[1]
|
354
355
|
|
355
356
|
expected_serialization = <<EXPECTED
|
357
|
+
require 'compass/import-once/activate'
|
356
358
|
# Require any additional compass plugins here.
|
357
359
|
project_path = "/home/chris/my_compass_project"
|
358
360
|
|
@@ -415,6 +417,7 @@ EXPECTED
|
|
415
417
|
assert_equal "/home/chris/my_compass_project/css/foo", Compass.configuration.to_sass_plugin_options[:template_location].find{|s,c| s == "/home/chris/my_compass_project/../foo"}[1]
|
416
418
|
|
417
419
|
expected_serialization = <<EXPECTED
|
420
|
+
require 'compass/import-once/activate'
|
418
421
|
# Require any additional compass plugins here.
|
419
422
|
project_path = "/home/chris/my_compass_project"
|
420
423
|
|
@@ -453,6 +456,7 @@ EXPECTED
|
|
453
456
|
assert_equal 'bar', Compass.configuration.to_sass_plugin_options[:foo]
|
454
457
|
|
455
458
|
expected_serialization = <<EXPECTED
|
459
|
+
require 'compass/import-once/activate'
|
456
460
|
# Require any additional compass plugins here.
|
457
461
|
|
458
462
|
# Set this to the root of your project when deployed:
|
@@ -488,6 +492,7 @@ EXPECTED
|
|
488
492
|
assert_equal ["/Users/chris/Projects/my_compass_project/images/sprites"], Compass.configuration.sprite_load_path.to_a
|
489
493
|
|
490
494
|
expected_serialization = <<EXPECTED
|
495
|
+
require 'compass/import-once/activate'
|
491
496
|
# Require any additional compass plugins here.
|
492
497
|
|
493
498
|
# Set this to the root of your project when deployed:
|
@@ -558,6 +563,7 @@ EXPECTED
|
|
558
563
|
|
559
564
|
assert_equal "baz", Compass.configuration.foobar
|
560
565
|
expected_serialization = <<EXPECTED
|
566
|
+
require 'compass/import-once/activate'
|
561
567
|
# Require any additional compass plugins here.
|
562
568
|
|
563
569
|
# Set this to the root of your project when deployed:
|
@@ -109,8 +109,8 @@ class SassExtensionsTest < Test::Unit::TestCase
|
|
109
109
|
assert_equal "25px", evaluate("pow(5px, 2)")
|
110
110
|
assert_equal "25px", evaluate("pow($number: 5px, $exponent: 2)")
|
111
111
|
assert_equal "79.43236px", evaluate("pow(5px, e())")
|
112
|
-
assert
|
113
|
-
assert
|
112
|
+
assert((0..2).include?(evaluate("random(2)").to_i))
|
113
|
+
assert((4..16).include?(evaluate("random(4, 16)").to_i))
|
114
114
|
end
|
115
115
|
|
116
116
|
def test_blank
|
@@ -210,6 +210,12 @@ class SassExtensionsTest < Test::Unit::TestCase
|
|
210
210
|
|
211
211
|
protected
|
212
212
|
def evaluate(value)
|
213
|
-
Sass::Script::Parser.parse(value, 0, 0).perform(Sass::Environment.new)
|
213
|
+
result = Sass::Script::Parser.parse(value, 0, 0).perform(Sass::Environment.new)
|
214
|
+
begin
|
215
|
+
result.to_s
|
216
|
+
rescue Sass::SyntaxError => e
|
217
|
+
raise e unless e.message =~ /isn't a valid CSS value/
|
218
|
+
result.inspect
|
219
|
+
end
|
214
220
|
end
|
215
221
|
end
|
@@ -1,32 +1,29 @@
|
|
1
1
|
class GradientTestClass
|
2
2
|
extend Compass::Core::SassExtensions::Functions::Constants
|
3
3
|
extend Compass::Core::SassExtensions::Functions::GradientSupport::Functions
|
4
|
+
def self.options
|
5
|
+
{}
|
6
|
+
end
|
4
7
|
end
|
5
8
|
|
6
9
|
require 'test_helper'
|
7
10
|
require 'compass'
|
8
11
|
|
9
12
|
class GradientsTest < Test::Unit::TestCase
|
10
|
-
|
13
|
+
include Sass::Script::Value::Helpers
|
14
|
+
|
11
15
|
def klass
|
12
16
|
GradientTestClass
|
13
17
|
end
|
14
18
|
|
15
|
-
def sass_string(s)
|
16
|
-
Sass::Script::String.new(s)
|
17
|
-
end
|
18
|
-
|
19
|
-
def sass_list(array)
|
20
|
-
Sass::Script::List.new(array, :space)
|
21
|
-
end
|
22
|
-
|
23
19
|
test "should return correct angle" do
|
24
|
-
assert_equal
|
20
|
+
assert_equal number(330, 'deg'), klass.convert_angle_from_offical(number(120, 'deg'))
|
25
21
|
end
|
26
22
|
|
27
23
|
test "Should convert old to new" do
|
28
24
|
[:top => ['to', 'bottom'], :bottom => ['to', 'top'], :left => ['to', 'right'], :right => ['to', 'left']].each do |test_value|
|
29
|
-
assert_equal
|
25
|
+
assert_equal list(identifier(test_value.keys.first.to_s), :space), klass.convert_angle_from_offical(
|
26
|
+
list(identifier(test_value.values[0].first), identifier(test_value.values[0].last), :space))
|
30
27
|
end
|
31
28
|
end
|
32
29
|
|
metadata
CHANGED
@@ -1,15 +1,15 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: compass
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
hash:
|
4
|
+
hash: 915323291
|
5
5
|
prerelease: 6
|
6
6
|
segments:
|
7
7
|
- 1
|
8
8
|
- 0
|
9
9
|
- 0
|
10
10
|
- alpha
|
11
|
-
-
|
12
|
-
version: 1.0.0.alpha.
|
11
|
+
- 16
|
12
|
+
version: 1.0.0.alpha.16
|
13
13
|
platform: ruby
|
14
14
|
authors:
|
15
15
|
- Chris Eppstein
|
@@ -21,7 +21,7 @@ autorequire:
|
|
21
21
|
bindir: bin
|
22
22
|
cert_chain: []
|
23
23
|
|
24
|
-
date: 2013-12-
|
24
|
+
date: 2013-12-11 00:00:00 Z
|
25
25
|
dependencies:
|
26
26
|
- !ruby/object:Gem::Dependency
|
27
27
|
version_requirements: &id001 !ruby/object:Gem::Requirement
|
@@ -29,7 +29,7 @@ dependencies:
|
|
29
29
|
requirements:
|
30
30
|
- - ~>
|
31
31
|
- !ruby/object:Gem::Version
|
32
|
-
hash: -
|
32
|
+
hash: -2745595092
|
33
33
|
segments:
|
34
34
|
- 3
|
35
35
|
- 3
|
@@ -47,20 +47,36 @@ dependencies:
|
|
47
47
|
requirements:
|
48
48
|
- - ~>
|
49
49
|
- !ruby/object:Gem::Version
|
50
|
-
hash:
|
50
|
+
hash: 915323291
|
51
51
|
segments:
|
52
52
|
- 1
|
53
53
|
- 0
|
54
54
|
- 0
|
55
55
|
- alpha
|
56
|
-
-
|
57
|
-
version: 1.0.0.alpha.
|
56
|
+
- 16
|
57
|
+
version: 1.0.0.alpha.16
|
58
58
|
name: compass-core
|
59
59
|
prerelease: false
|
60
60
|
type: :runtime
|
61
61
|
requirement: *id002
|
62
62
|
- !ruby/object:Gem::Dependency
|
63
63
|
version_requirements: &id003 !ruby/object:Gem::Requirement
|
64
|
+
none: false
|
65
|
+
requirements:
|
66
|
+
- - ~>
|
67
|
+
- !ruby/object:Gem::Version
|
68
|
+
hash: 21
|
69
|
+
segments:
|
70
|
+
- 1
|
71
|
+
- 0
|
72
|
+
- 1
|
73
|
+
version: 1.0.1
|
74
|
+
name: compass-import-once
|
75
|
+
prerelease: false
|
76
|
+
type: :runtime
|
77
|
+
requirement: *id003
|
78
|
+
- !ruby/object:Gem::Dependency
|
79
|
+
version_requirements: &id004 !ruby/object:Gem::Requirement
|
64
80
|
none: false
|
65
81
|
requirements:
|
66
82
|
- - ~>
|
@@ -73,9 +89,9 @@ dependencies:
|
|
73
89
|
name: chunky_png
|
74
90
|
prerelease: false
|
75
91
|
type: :runtime
|
76
|
-
requirement: *
|
92
|
+
requirement: *id004
|
77
93
|
- !ruby/object:Gem::Dependency
|
78
|
-
version_requirements: &
|
94
|
+
version_requirements: &id005 !ruby/object:Gem::Requirement
|
79
95
|
none: false
|
80
96
|
requirements:
|
81
97
|
- - ~>
|
@@ -89,9 +105,9 @@ dependencies:
|
|
89
105
|
name: listen
|
90
106
|
prerelease: false
|
91
107
|
type: :runtime
|
92
|
-
requirement: *
|
108
|
+
requirement: *id005
|
93
109
|
- !ruby/object:Gem::Dependency
|
94
|
-
version_requirements: &
|
110
|
+
version_requirements: &id006 !ruby/object:Gem::Requirement
|
95
111
|
none: false
|
96
112
|
requirements:
|
97
113
|
- - ">="
|
@@ -103,7 +119,7 @@ dependencies:
|
|
103
119
|
name: json
|
104
120
|
prerelease: false
|
105
121
|
type: :runtime
|
106
|
-
requirement: *
|
122
|
+
requirement: *id006
|
107
123
|
description: Compass is a Sass-based Stylesheet Framework that streamlines the creation and maintenance of CSS.
|
108
124
|
email: chris@eppsteins.net
|
109
125
|
executables:
|
@@ -298,6 +314,9 @@ files:
|
|
298
314
|
- test/fixtures/stylesheets/compass/css/user-interface.css
|
299
315
|
- test/fixtures/stylesheets/compass/css/utilities.css
|
300
316
|
- test/fixtures/stylesheets/compass/css/vertical_rhythm.css
|
317
|
+
- test/fixtures/stylesheets/compass/css/vertical_rhythm_with_ems.css
|
318
|
+
- test/fixtures/stylesheets/compass/css/vertical_rhythm_with_px.css
|
319
|
+
- test/fixtures/stylesheets/compass/css/vertical_rhythm_with_rems.css
|
301
320
|
- test/fixtures/stylesheets/compass/images/100x150.gif
|
302
321
|
- test/fixtures/stylesheets/compass/images/100x150.jpeg
|
303
322
|
- test/fixtures/stylesheets/compass/images/100x150.jpg
|
@@ -601,6 +620,9 @@ files:
|
|
601
620
|
- test/fixtures/stylesheets/compass/sass/user-interface.scss
|
602
621
|
- test/fixtures/stylesheets/compass/sass/utilities.scss
|
603
622
|
- test/fixtures/stylesheets/compass/sass/vertical_rhythm.scss
|
623
|
+
- test/fixtures/stylesheets/compass/sass/vertical_rhythm_with_ems.scss
|
624
|
+
- test/fixtures/stylesheets/compass/sass/vertical_rhythm_with_px.scss
|
625
|
+
- test/fixtures/stylesheets/compass/sass/vertical_rhythm_with_rems.scss
|
604
626
|
- test/fixtures/stylesheets/envtest/config.rb
|
605
627
|
- test/fixtures/stylesheets/envtest/css/env.css
|
606
628
|
- test/fixtures/stylesheets/envtest/sass/env.scss
|
@@ -797,6 +819,9 @@ test_files:
|
|
797
819
|
- test/fixtures/stylesheets/compass/css/user-interface.css
|
798
820
|
- test/fixtures/stylesheets/compass/css/utilities.css
|
799
821
|
- test/fixtures/stylesheets/compass/css/vertical_rhythm.css
|
822
|
+
- test/fixtures/stylesheets/compass/css/vertical_rhythm_with_ems.css
|
823
|
+
- test/fixtures/stylesheets/compass/css/vertical_rhythm_with_px.css
|
824
|
+
- test/fixtures/stylesheets/compass/css/vertical_rhythm_with_rems.css
|
800
825
|
- test/fixtures/stylesheets/compass/images/100x150.gif
|
801
826
|
- test/fixtures/stylesheets/compass/images/100x150.jpeg
|
802
827
|
- test/fixtures/stylesheets/compass/images/100x150.jpg
|
@@ -1100,6 +1125,9 @@ test_files:
|
|
1100
1125
|
- test/fixtures/stylesheets/compass/sass/user-interface.scss
|
1101
1126
|
- test/fixtures/stylesheets/compass/sass/utilities.scss
|
1102
1127
|
- test/fixtures/stylesheets/compass/sass/vertical_rhythm.scss
|
1128
|
+
- test/fixtures/stylesheets/compass/sass/vertical_rhythm_with_ems.scss
|
1129
|
+
- test/fixtures/stylesheets/compass/sass/vertical_rhythm_with_px.scss
|
1130
|
+
- test/fixtures/stylesheets/compass/sass/vertical_rhythm_with_rems.scss
|
1103
1131
|
- test/fixtures/stylesheets/envtest/config.rb
|
1104
1132
|
- test/fixtures/stylesheets/envtest/css/env.css
|
1105
1133
|
- test/fixtures/stylesheets/envtest/sass/env.scss
|