compass 0.10.0.pre5 → 0.10.0.pre6
Sign up to get free protection for your applications and to get access to all the features.
- data/CHANGELOG.markdown +48 -0
- data/VERSION.yml +1 -1
- data/examples/css3/extensions/compass-colors/README.markdown +50 -0
- data/examples/css3/extensions/compass-colors/VERSION.yml +5 -0
- data/examples/css3/extensions/compass-colors/example/config.rb +13 -0
- data/examples/css3/extensions/compass-colors/example/src/_split_compliment_theme.sass +28 -0
- data/examples/css3/extensions/compass-colors/example/src/screen.sass +40 -0
- data/examples/css3/extensions/compass-colors/lib/compass-colors.rb +9 -0
- data/examples/css3/extensions/compass-colors/lib/compass-colors/compass_extension.rb +7 -0
- data/examples/css3/extensions/compass-colors/lib/compass-colors/hsl.rb +109 -0
- data/examples/css3/extensions/compass-colors/lib/compass-colors/sass_extensions.rb +112 -0
- data/examples/css3/extensions/compass-colors/spec/approximate_color_matching.rb +43 -0
- data/examples/css3/extensions/compass-colors/spec/sass_extensions_spec.rb +54 -0
- data/examples/css3/extensions/compass-colors/templates/analogous/_theme.sass +28 -0
- data/examples/css3/extensions/compass-colors/templates/analogous/manifest.rb +1 -0
- data/examples/css3/extensions/compass-colors/templates/basic/_theme.sass +7 -0
- data/examples/css3/extensions/compass-colors/templates/basic/manifest.rb +1 -0
- data/examples/css3/extensions/compass-colors/templates/complementary/_theme.sass +20 -0
- data/examples/css3/extensions/compass-colors/templates/complementary/manifest.rb +1 -0
- data/examples/css3/extensions/compass-colors/templates/split_complement/_theme.sass +28 -0
- data/examples/css3/extensions/compass-colors/templates/split_complement/manifest.rb +1 -0
- data/examples/css3/extensions/compass-colors/templates/triadic/_theme.sass +28 -0
- data/examples/css3/extensions/compass-colors/templates/triadic/manifest.rb +1 -0
- data/examples/css3/gradients.html.haml +60 -0
- data/examples/css3/index.html.haml +10 -8
- data/examples/css3/src/fancy-fonts.sass +1 -1
- data/examples/css3/src/gradients.sass +69 -0
- data/examples/css3/src/main.sass +38 -10
- data/frameworks/blueprint/stylesheets/blueprint/_liquid.sass +12 -10
- data/frameworks/blueprint/stylesheets/blueprint/modules/_buttons.sass +1 -1
- data/frameworks/blueprint/stylesheets/blueprint/modules/_colors.sass +1 -1
- data/frameworks/blueprint/stylesheets/blueprint/modules/_debug.sass +1 -1
- data/frameworks/blueprint/stylesheets/blueprint/modules/_fancy_type.sass +1 -1
- data/frameworks/blueprint/stylesheets/blueprint/modules/_form.sass +1 -1
- data/frameworks/blueprint/stylesheets/blueprint/modules/_grid.sass +1 -1
- data/frameworks/blueprint/stylesheets/blueprint/modules/_interaction.sass +1 -1
- data/frameworks/blueprint/stylesheets/blueprint/modules/_link_icons.sass +1 -1
- data/frameworks/blueprint/stylesheets/blueprint/modules/_liquid.sass +1 -1
- data/frameworks/blueprint/stylesheets/blueprint/modules/_reset.sass +1 -1
- data/frameworks/blueprint/stylesheets/blueprint/modules/_rtl.sass +1 -1
- data/frameworks/blueprint/stylesheets/blueprint/modules/_scaffolding.sass +1 -1
- data/frameworks/blueprint/stylesheets/blueprint/modules/_typography.sass +1 -1
- data/frameworks/blueprint/stylesheets/blueprint/modules/_utilities.sass +1 -1
- data/frameworks/compass/stylesheets/compass/css3/_gradient.sass +54 -36
- data/frameworks/compass/stylesheets/compass/layout/_sticky_footer.sass +1 -0
- data/frameworks/compass/stylesheets/compass/utilities/general/_hacks.sass +7 -7
- data/frameworks/compass/stylesheets/compass/utilities/lists/_horizontal_list.sass +6 -2
- data/lib/compass.rb +1 -1
- data/lib/compass/app_integration/rails.rb +6 -0
- data/lib/compass/app_integration/rails/{action_controller.rb → actionpack2/action_controller.rb} +0 -0
- data/lib/compass/app_integration/rails/{sass_plugin.rb → actionpack2/sass_plugin.rb} +0 -0
- data/lib/compass/app_integration/rails/{urls.rb → actionpack2/urls.rb} +0 -0
- data/lib/compass/app_integration/rails/installer.rb +8 -5
- data/lib/compass/app_integration/rails/runtime.rb +8 -4
- data/lib/compass/commands/installer_command.rb +1 -3
- data/lib/compass/commands/project_base.rb +1 -3
- data/lib/compass/commands/write_configuration.rb +5 -2
- data/lib/compass/compiler.rb +7 -0
- data/lib/compass/configuration/adapters.rb +3 -3
- data/lib/compass/configuration/defaults.rb +4 -0
- data/lib/compass/configuration/helpers.rb +16 -0
- data/lib/compass/configuration/inheritance.rb +6 -2
- data/lib/compass/configuration/serialization.rb +8 -3
- data/lib/compass/exec.rb +5 -1
- data/lib/compass/frameworks.rb +15 -5
- data/lib/compass/logger.rb +8 -4
- data/lib/compass/sass_extensions/functions.rb +3 -2
- data/lib/compass/sass_extensions/functions/gradient_support.rb +186 -0
- data/lib/compass/sass_extensions/functions/image_size.rb +97 -0
- data/test/compass_test.rb +1 -1
- data/test/configuration_test.rb +30 -0
- data/test/fixtures/stylesheets/compass/100x150.jpg +0 -0
- data/test/fixtures/stylesheets/compass/css/gradients.css +71 -0
- data/test/fixtures/stylesheets/compass/css/image_size.css +15 -0
- data/test/fixtures/stylesheets/compass/css/layout.css +1 -0
- data/test/fixtures/stylesheets/compass/images/100x150.gif +0 -0
- data/test/fixtures/stylesheets/compass/images/100x150.jpeg +0 -0
- data/test/fixtures/stylesheets/compass/images/100x150.jpg +0 -0
- data/test/fixtures/stylesheets/compass/images/100x150.png +0 -0
- data/test/fixtures/stylesheets/compass/sass/gradients.sass +48 -0
- data/test/fixtures/stylesheets/compass/sass/image_size.sass +12 -0
- metadata +70 -15
- data/examples/css3/src/gradient.sass +0 -10
- data/lib/compass/sass_extensions/functions/color_stop.rb +0 -10
@@ -0,0 +1,43 @@
|
|
1
|
+
module BeApproximatelyTheSameColorAsMatcher
|
2
|
+
class BeApproximatelyTheSameColorAs
|
3
|
+
def initialize(expected)
|
4
|
+
@expected = expected
|
5
|
+
end
|
6
|
+
|
7
|
+
def matches?(target)
|
8
|
+
@target = target
|
9
|
+
@target.rgb.zip(@expected.rgb).all?{|e,t| (e-t).abs <= 1}
|
10
|
+
end
|
11
|
+
|
12
|
+
def failure_message
|
13
|
+
"expected <#{to_string(@target)}> to " +
|
14
|
+
"be approximately the same as <#{to_string(@expected)}>"
|
15
|
+
end
|
16
|
+
|
17
|
+
def negative_failure_message
|
18
|
+
"expected <#{to_string(@target)}> not to " +
|
19
|
+
"be approximately the same as <#{to_string(@expected)}>"
|
20
|
+
end
|
21
|
+
|
22
|
+
# Returns string representation of an object.
|
23
|
+
def to_string(value)
|
24
|
+
# indicate a nil
|
25
|
+
if value.nil?
|
26
|
+
'nil'
|
27
|
+
end
|
28
|
+
|
29
|
+
# join arrays
|
30
|
+
if value.class == Array
|
31
|
+
return value.join(", ")
|
32
|
+
end
|
33
|
+
|
34
|
+
# otherwise return to_s() instead of inspect()
|
35
|
+
return value.to_s
|
36
|
+
end
|
37
|
+
end
|
38
|
+
|
39
|
+
# Actual matcher that is exposed.
|
40
|
+
def be_approximately_the_same_color_as(expected)
|
41
|
+
BeApproximatelyTheSameColorAs.new(expected)
|
42
|
+
end
|
43
|
+
end
|
@@ -0,0 +1,54 @@
|
|
1
|
+
$:.unshift(File.join(File.dirname(__FILE__), '..', 'lib'))
|
2
|
+
|
3
|
+
require File.join(File.dirname(__FILE__), 'approximate_color_matching')
|
4
|
+
|
5
|
+
Spec::Runner.configure do |config|
|
6
|
+
config.include(BeApproximatelyTheSameColorAsMatcher)
|
7
|
+
end
|
8
|
+
|
9
|
+
require 'compass-colors'
|
10
|
+
|
11
|
+
describe "sass extensions" do
|
12
|
+
it "should lighten red into pink" do
|
13
|
+
pink = invoke(:lighten, color(255,0,0), number(25))
|
14
|
+
pink.should be_approximately_the_same_color_as(color(255,127,127))
|
15
|
+
end
|
16
|
+
|
17
|
+
it "should lighten red into pink (percentage)" do
|
18
|
+
pink = invoke(:lighten_percent, color(255,0,0), number(50))
|
19
|
+
pink.should be_approximately_the_same_color_as(color(255,127,127))
|
20
|
+
end
|
21
|
+
|
22
|
+
it "should darken red into maroon" do
|
23
|
+
maroon = invoke(:darken, color(255,0,0), number(25))
|
24
|
+
maroon.should be_approximately_the_same_color_as(color(127,0,0))
|
25
|
+
end
|
26
|
+
|
27
|
+
it "should darken red into maroon (percentage)" do
|
28
|
+
maroon = invoke(:darken_percent, color(255,0,0), number(50))
|
29
|
+
maroon.should be_approximately_the_same_color_as(color(127,0,0))
|
30
|
+
end
|
31
|
+
|
32
|
+
it "should darken white into gray and back again" do
|
33
|
+
darker = invoke(:darken, color(0xff, 0xff, 0xff), number(50))
|
34
|
+
lighter_again = invoke(:lighten, darker, number(100))
|
35
|
+
color(0xff, 0xff, 0xff).should be_approximately_the_same_color_as(lighter_again)
|
36
|
+
end
|
37
|
+
|
38
|
+
it "shouldn't saturate fully saturated colors" do
|
39
|
+
saturated = invoke(:saturate, color(0, 127, 127), number(50))
|
40
|
+
saturated.should be_approximately_the_same_color_as(color(0, 127, 127))
|
41
|
+
end
|
42
|
+
|
43
|
+
def invoke(name, *args)
|
44
|
+
Sass::Script::Functions::EvaluationContext.new({}).send(name, *args)
|
45
|
+
end
|
46
|
+
|
47
|
+
def color(r,g,b)
|
48
|
+
Sass::Script::Color.new([r,g,b])
|
49
|
+
end
|
50
|
+
|
51
|
+
def number(num)
|
52
|
+
Sass::Script::Number.new(num)
|
53
|
+
end
|
54
|
+
end
|
@@ -0,0 +1,28 @@
|
|
1
|
+
// In theory the lightness and saturation values of corresponding colors should not change.
|
2
|
+
// In reality, these values should be adjusted to create a more pleasant color combination.
|
3
|
+
// There is not any mathematical formula for this, but you can use the lighten, darken,
|
4
|
+
// saturate and desaturate functions to adjust your main colors.
|
5
|
+
!base_color ||= red
|
6
|
+
!support_color = adjust_hue(!base_color, 30)
|
7
|
+
!accent_color = adjust_hue(!base_color, -30)
|
8
|
+
|
9
|
+
!dark_base_color = darken(!base_color, 25)
|
10
|
+
!darker_base_color = darken(!base_color, 50)
|
11
|
+
!darkest_base_color = darken(!base_color, 75)
|
12
|
+
!light_base_color = lighten(!base_color, 25)
|
13
|
+
!lighter_base_color = lighten(!base_color, 50)
|
14
|
+
!lightest_base_color = lighten(!base_color, 75)
|
15
|
+
|
16
|
+
!dark_support_color = darken(!support_color, 25)
|
17
|
+
!darker_support_color = darken(!support_color, 50)
|
18
|
+
!darkest_support_color = darken(!support_color, 75)
|
19
|
+
!light_support_color = lighten(!support_color, 25)
|
20
|
+
!lighter_support_color = lighten(!support_color, 50)
|
21
|
+
!lightest_support_color = lighten(!support_color, 75)
|
22
|
+
|
23
|
+
!dark_accent_color = darken(!accent_color, 25)
|
24
|
+
!darker_accent_color = darken(!accent_color, 50)
|
25
|
+
!darkest_accent_color = darken(!accent_color, 75)
|
26
|
+
!light_accent_color = lighten(!accent_color, 25)
|
27
|
+
!lighter_accent_color = lighten(!accent_color, 50)
|
28
|
+
!lightest_accent_color = lighten(!accent_color, 75)
|
@@ -0,0 +1 @@
|
|
1
|
+
stylesheet '_theme.sass'
|
@@ -0,0 +1,7 @@
|
|
1
|
+
!base_color ||= red
|
2
|
+
!dark_base_color = darken(!base_color, 25)
|
3
|
+
!darker_base_color = darken(!base_color, 50)
|
4
|
+
!darkest_base_color = darken(!base_color, 75)
|
5
|
+
!light_base_color = lighten(!base_color, 25)
|
6
|
+
!lighter_base_color = lighten(!base_color, 75)
|
7
|
+
!lightest_base_color = lighten(!base_color, 50)
|
@@ -0,0 +1 @@
|
|
1
|
+
stylesheet '_theme.sass'
|
@@ -0,0 +1,20 @@
|
|
1
|
+
// In theory the lightness and saturation values of corresponding colors should not change.
|
2
|
+
// In reality, these values should be adjusted to create a more pleasant color combination.
|
3
|
+
// There is not any mathematical formula for this, but you can use the lighten, darken,
|
4
|
+
// saturate and desaturate functions to adjust your main colors.
|
5
|
+
!base_color ||= red
|
6
|
+
!complementary_color = complement(!base_color)
|
7
|
+
|
8
|
+
!dark_base_color = darken(!base_color, 25)
|
9
|
+
!darker_base_color = darken(!base_color, 50)
|
10
|
+
!darkest_base_color = darken(!base_color, 75)
|
11
|
+
!light_base_color = lighten(!base_color, 25)
|
12
|
+
!lighter_base_color = lighten(!base_color, 50)
|
13
|
+
!lightest_base_color = lighten(!base_color, 75)
|
14
|
+
|
15
|
+
!dark_complementary_color = darken(!complementary_color, 25)
|
16
|
+
!darker_complementary_color = darken(!complementary_color, 50)
|
17
|
+
!darkest_complementary_color = darken(!complementary_color, 75)
|
18
|
+
!light_complementary_color = lighten(!complementary_color, 25)
|
19
|
+
!lighter_complementary_color = lighten(!complementary_color, 50)
|
20
|
+
!lightest_complementary_color = lighten(!complementary_color, 75)
|
@@ -0,0 +1 @@
|
|
1
|
+
stylesheet '_theme.sass'
|
@@ -0,0 +1,28 @@
|
|
1
|
+
// In theory the lightness and saturation values of corresponding colors should not change.
|
2
|
+
// In reality, these values should be adjusted to create a more pleasant color combination.
|
3
|
+
// There is not any mathematical formula for this, but you can use the lighten, darken,
|
4
|
+
// saturate and desaturate functions to adjust your main colors.
|
5
|
+
!base_color ||= red
|
6
|
+
!complement_support_color = adjust_hue(!base_color, 180 + 30)
|
7
|
+
!complement_accent_color = adjust_hue(!base_color, 180 - 30)
|
8
|
+
|
9
|
+
!dark_base_color = darken(!base_color, 25)
|
10
|
+
!darker_base_color = darken(!base_color, 50)
|
11
|
+
!darkest_base_color = darken(!base_color, 75)
|
12
|
+
!light_base_color = lighten(!base_color, 25)
|
13
|
+
!lighter_base_color = lighten(!base_color, 50)
|
14
|
+
!lightest_base_color = lighten(!base_color, 75)
|
15
|
+
|
16
|
+
!dark_complement_support_color = darken(!complement_support_color, 25)
|
17
|
+
!darker_complement_support_color = darken(!complement_support_color, 50)
|
18
|
+
!darkest_complement_support_color = darken(!complement_support_color, 75)
|
19
|
+
!light_complement_support_color = lighten(!complement_support_color, 25)
|
20
|
+
!lighter_complement_support_color = lighten(!complement_support_color, 50)
|
21
|
+
!lightest_complement_support_color = lighten(!complement_support_color, 75)
|
22
|
+
|
23
|
+
!dark_complement_accent_color = darken(!complement_accent_color, 25)
|
24
|
+
!darker_complement_accent_color = darken(!complement_accent_color, 50)
|
25
|
+
!darkest_complement_accent_color = darken(!complement_accent_color, 75)
|
26
|
+
!light_complement_accent_color = lighten(!complement_accent_color, 25)
|
27
|
+
!lighter_complement_accent_color = lighten(!complement_accent_color, 50)
|
28
|
+
!lightest_complement_accent_color = lighten(!complement_accent_color, 75)
|
@@ -0,0 +1 @@
|
|
1
|
+
stylesheet '_theme.sass'
|
@@ -0,0 +1,28 @@
|
|
1
|
+
// In theory the lightness and saturation values of corresponding colors should not change.
|
2
|
+
// In reality, these values should be adjusted to create a more pleasant color combination.
|
3
|
+
// There is not any mathematical formula for this, but you can use the lighten, darken,
|
4
|
+
// saturate and desaturate functions to adjust your main colors.
|
5
|
+
!base_color ||= red
|
6
|
+
!support_color = adjust_hue(!base_color, 120)
|
7
|
+
!accent_color = adjust_hue(!base_color, -120)
|
8
|
+
|
9
|
+
!dark_base_color = darken(!base_color, 25)
|
10
|
+
!darker_base_color = darken(!base_color, 50)
|
11
|
+
!darkest_base_color = darken(!base_color, 75)
|
12
|
+
!light_base_color = lighten(!base_color, 25)
|
13
|
+
!lighter_base_color = lighten(!base_color, 50)
|
14
|
+
!lightest_base_color = lighten(!base_color, 75)
|
15
|
+
|
16
|
+
!dark_support_color = darken(!support_color, 25)
|
17
|
+
!darker_support_color = darken(!support_color, 50)
|
18
|
+
!darkest_support_color = darken(!support_color, 75)
|
19
|
+
!light_support_color = lighten(!support_color, 25)
|
20
|
+
!lighter_support_color = lighten(!support_color, 50)
|
21
|
+
!lightest_support_color = lighten(!support_color, 75)
|
22
|
+
|
23
|
+
!dark_accent_color = darken(!accent_color, 25)
|
24
|
+
!darker_accent_color = darken(!accent_color, 50)
|
25
|
+
!darkest_accent_color = darken(!accent_color, 75)
|
26
|
+
!light_accent_color = lighten(!accent_color, 25)
|
27
|
+
!lighter_accent_color = lighten(!accent_color, 50)
|
28
|
+
!lightest_accent_color = lighten(!accent_color, 75)
|
@@ -0,0 +1 @@
|
|
1
|
+
stylesheet '_theme.sass'
|
@@ -0,0 +1,60 @@
|
|
1
|
+
!!!
|
2
|
+
%html
|
3
|
+
%head
|
4
|
+
%link(href="stylesheets/gradients.css" rel="stylesheet" type="text/css")
|
5
|
+
%body
|
6
|
+
%table
|
7
|
+
%thead
|
8
|
+
%th
|
9
|
+
%th.linear Linear
|
10
|
+
%th.radial Radial
|
11
|
+
%tbody
|
12
|
+
%tr.default
|
13
|
+
%th Default
|
14
|
+
%td.linear <br><br><br>
|
15
|
+
%td.radial <br><br><br>
|
16
|
+
%tr.default
|
17
|
+
%th
|
18
|
+
%td.linear-code
|
19
|
+
%td.radial-code
|
20
|
+
%tr.top-left
|
21
|
+
%th Top Left
|
22
|
+
%td.linear <br><br><br>
|
23
|
+
%td.radial <br><br><br>
|
24
|
+
%tr.top-left
|
25
|
+
%th
|
26
|
+
%td.linear-code
|
27
|
+
%td.radial-code
|
28
|
+
%tr.bottom-right
|
29
|
+
%th Bottom Right
|
30
|
+
%td.linear <br><br><br>
|
31
|
+
%td.radial <br><br><br>
|
32
|
+
%tr.bottom-right
|
33
|
+
%th
|
34
|
+
%td.linear-code
|
35
|
+
%td.radial-code
|
36
|
+
%tr.three-color
|
37
|
+
%th Three Evenly-spaced Colors
|
38
|
+
%td.linear <br><br><br>
|
39
|
+
%td.radial <br><br><br>
|
40
|
+
%tr.three-color
|
41
|
+
%th
|
42
|
+
%td.linear-code
|
43
|
+
%td.radial-code
|
44
|
+
%tr.four-color
|
45
|
+
%th Four Positioned Colors
|
46
|
+
%td.linear <br><br><br>
|
47
|
+
%td.radial <br><br><br>
|
48
|
+
%tr.four-color
|
49
|
+
%th
|
50
|
+
%td.linear-code
|
51
|
+
%td.radial-code
|
52
|
+
%tr.filled-in
|
53
|
+
%th Filled-in End-points
|
54
|
+
%td.linear <br><br><br>
|
55
|
+
%td.radial <br><br><br>
|
56
|
+
%tr.filled-in
|
57
|
+
%th
|
58
|
+
%td.linear-code
|
59
|
+
%td.radial-code
|
60
|
+
|
@@ -30,21 +30,23 @@
|
|
30
30
|
%h2 Gradients
|
31
31
|
%pre.horizontal
|
32
32
|
%code<>
|
33
|
-
|
33
|
+
:preserve
|
34
|
+
+linear-gradient(
|
35
|
+
color_stops(#d92626, #2626d9),
|
36
|
+
"left")
|
34
37
|
%pre.vertical
|
35
38
|
%code<>
|
36
|
-
|
37
|
-
|
38
|
-
|
39
|
-
+linear-gradient("left top",
|
40
|
-
"right bottom",
|
41
|
-
\#d92626, #2626d9)
|
39
|
+
:preserve
|
40
|
+
+linear-gradient(
|
41
|
+
color_stops(#d92626, #2626d9))
|
42
42
|
%pre.radial
|
43
43
|
%code<>
|
44
|
-
+radial-gradient(<br
|
44
|
+
+radial-gradient(<br> color_stops(#d92626, #2626d9))
|
45
|
+
%a(href="gradients.html") More Gradients
|
45
46
|
.examples
|
46
47
|
#border-radius.example
|
47
48
|
%h2 Border Radius
|
49
|
+
%p This box has rounded corners
|
48
50
|
.gutter
|
49
51
|
#box-shadow.example
|
50
52
|
%h2 Box Shadow
|
@@ -0,0 +1,69 @@
|
|
1
|
+
@import compass/css3.sass
|
2
|
+
|
3
|
+
#gradient
|
4
|
+
width: 200px
|
5
|
+
height: 100px
|
6
|
+
border: 1px solid #777
|
7
|
+
|
8
|
+
thead th
|
9
|
+
min-height: 50px
|
10
|
+
min-width: 100px
|
11
|
+
+text-shadow(#fff)
|
12
|
+
th.linear
|
13
|
+
+linear-gradient(color_stops(#fff, #f00 50%, #ff0 75%, #0f0))
|
14
|
+
th.radial
|
15
|
+
+radial-gradient(color_stops(#fff, #f00 20px, #ff0 30px, #0f0 40px))
|
16
|
+
tr.default
|
17
|
+
td.linear
|
18
|
+
+linear-gradient(color_stops(#c00, #00c))
|
19
|
+
td.radial
|
20
|
+
+radial-gradient(color_stops(#c00, #00c))
|
21
|
+
td.linear-code:before
|
22
|
+
content: "+linear-gradient(color_stops(#c00, #00c))"
|
23
|
+
td.radial-code:before
|
24
|
+
content: "+radial-gradient(color_stops(#c00, #00c))"
|
25
|
+
tr.top-left
|
26
|
+
td.linear
|
27
|
+
+linear-gradient(color_stops(#c00, #00c), "top left")
|
28
|
+
td.radial
|
29
|
+
+radial-gradient(color_stops(#c00, #00c), "top left")
|
30
|
+
td.linear-code:before
|
31
|
+
content: "+linear-gradient(color_stops(#c00, #00c), \"top left\")"
|
32
|
+
td.radial-code:before
|
33
|
+
content: "+radial-gradient(color_stops(#c00, #00c), \"top left\")"
|
34
|
+
tr.bottom-right
|
35
|
+
td.linear
|
36
|
+
+linear-gradient(color_stops(#c00, #00c), "bottom right")
|
37
|
+
td.radial
|
38
|
+
+radial-gradient(color_stops(#c00, #00c), "bottom right")
|
39
|
+
td.linear-code:before
|
40
|
+
content: "+linear-gradient(color_stops(#c00, #00c), \"bottom right\")"
|
41
|
+
td.radial-code:before
|
42
|
+
content: "+radial-gradient(color_stops(#c00, #00c), \"bottom right\")"
|
43
|
+
tr.three-color
|
44
|
+
td.linear
|
45
|
+
+linear-gradient(color_stops(#c00, #fff, #00c))
|
46
|
+
td.radial
|
47
|
+
+radial-gradient(color_stops(#c00, #fff, #00c 50px))
|
48
|
+
td.linear-code:before
|
49
|
+
content: "+linear-gradient(color_stops(#c00, #fff, #00c))"
|
50
|
+
td.radial-code:before
|
51
|
+
content: "+radial-gradient(color_stops(#c00, #fff, #00c 50px))"
|
52
|
+
tr.four-color
|
53
|
+
td.linear
|
54
|
+
+linear-gradient(color_stops(#c00, #0c0 25%, #0cc 75%, #00c))
|
55
|
+
td.radial
|
56
|
+
+radial-gradient(color_stops(#c00, #0c0 25%, #0cc 75%, #00c 50px))
|
57
|
+
td.linear-code:before
|
58
|
+
content: "+linear-gradient(color_stops(#c00, #0c0 25%, #0cc 75%, #00c))"
|
59
|
+
td.radial-code:before
|
60
|
+
content: "+radial-gradient(color_stops(#c00, #0c0 25%, #0cc 75%, #00c 50px))"
|
61
|
+
tr.filled-in
|
62
|
+
td.linear
|
63
|
+
+linear-gradient(color_stops(#c00 33%, #00c 66%))
|
64
|
+
td.radial
|
65
|
+
+radial-gradient(color_stops(#c00 25px, #00c 75px))
|
66
|
+
td.linear-code:before
|
67
|
+
content: "+linear-gradient(color_stops(#c00 33%, #00c 66%))"
|
68
|
+
td.radial-code:before
|
69
|
+
content: "+radial-gradient(color_stops(#c00 25px, #00c 75px))"
|
data/examples/css3/src/main.sass
CHANGED
@@ -39,7 +39,7 @@ h1
|
|
39
39
|
content: " "
|
40
40
|
|
41
41
|
.example
|
42
|
-
+
|
42
|
+
+linear-gradient(color_stops(#fff, #ccc))
|
43
43
|
pre
|
44
44
|
padding: 1em
|
45
45
|
margin: 1em
|
@@ -48,8 +48,8 @@ h1
|
|
48
48
|
font-weight: bold
|
49
49
|
#background-clip
|
50
50
|
pre
|
51
|
-
background: transparent #{
|
52
|
-
border: 1em solid
|
51
|
+
background: transparent #{image_url("fresh-peas.jpg")} no-repeat
|
52
|
+
border: 1em solid rgba(255,0,0,.25)
|
53
53
|
.padding-box
|
54
54
|
+background-clip("padding-box")
|
55
55
|
+background-origin("padding-box")
|
@@ -59,8 +59,9 @@ h1
|
|
59
59
|
|
60
60
|
#background-size
|
61
61
|
pre
|
62
|
-
background: transparent #{
|
63
|
-
border: 1em solid #{
|
62
|
+
background: transparent #{image_url("fresh-peas.jpg")} no-repeat
|
63
|
+
border: 1em solid #{mix(red, white, .5)}
|
64
|
+
border: 1em solid rgba(255,0,0,.25)
|
64
65
|
.top-left
|
65
66
|
+background-size(50% 50%)
|
66
67
|
.centered
|
@@ -69,12 +70,39 @@ h1
|
|
69
70
|
|
70
71
|
#gradients
|
71
72
|
.horizontal
|
72
|
-
+
|
73
|
+
+linear-gradient(color_stops(#d92626, #2626d9), "left")
|
73
74
|
.vertical
|
74
|
-
+
|
75
|
+
+linear-gradient(color_stops(#d92626, #2626d9))
|
75
76
|
.diagonal
|
76
|
-
+linear-gradient(
|
77
|
+
+linear-gradient(color_stops(#d92626, #2626d9), "right top")
|
77
78
|
.radial
|
78
|
-
+radial-gradient(
|
79
|
-
|
79
|
+
/* +radial-gradient(color_stops(#d92626 0, #2626d9 1))
|
80
|
+
+radial-gradient(color_stops(#d92626 10px, #2626d9 150px))
|
81
|
+
// +radial-gradient("center center, 10, center center, 100", #d92626, #2626d9)
|
82
|
+
// background-image: -moz-radial-gradient(20px center, circle, #d92626 10px, #2626d9 100px)
|
83
|
+
// background-color: #2626d9
|
84
|
+
.radial-1
|
85
|
+
// A default radial gradient:
|
86
|
+
/* +radial-gradient(color_stops(#ddd, #aaa))
|
87
|
+
+radial-gradient(color_stops(#ddd, #aaa))
|
88
|
+
.radial-2
|
89
|
+
// A centered gradient
|
90
|
+
/* +radial-gradient(color_stops(#ddd, #aaa))
|
91
|
+
+radial-gradient(color_stops(#ddd, #aaa))
|
92
|
+
.radial-3
|
93
|
+
// A centered radial gradient at the top
|
94
|
+
/* +radial-gradient(color_stops(#ddd, #aaa), "top center")
|
95
|
+
+radial-gradient(color_stops(#ddd, #aaa), "top center")
|
96
|
+
.radial-4
|
97
|
+
// A centered radial gradient with fixed color stops
|
98
|
+
/* +radial-gradient(color_stops(#ddd 20px, #aaa 50px))
|
99
|
+
+radial-gradient(color_stops(#ddd 20px, #aaa 50px))
|
100
|
+
.radial-5
|
101
|
+
// A centered gradient with several color stops
|
102
|
+
/* +radial-gradient(color_stops(#ddd 20%, #aaa 50%, #c00))
|
103
|
+
+radial-gradient(color_stops(#ddd 20px, #aaa 50%, #c00 200px))
|
104
|
+
.radial-6
|
105
|
+
// A centered gradient with color stops
|
106
|
+
/* +radial-gradient(color_stops(#0c0, #ddd 20%, #aaa 50%, #00c))
|
107
|
+
+radial-gradient(color_stops(#0c0 0px, #ddd 20px, #aaa 50px, #00c 100px))
|
80
108
|
|