aliddle-sass 1.0
Sign up to get free protection for your applications and to get access to all the features.
- data/.yardopts +11 -0
- data/CONTRIBUTING +3 -0
- data/MIT-LICENSE +20 -0
- data/README.md +201 -0
- data/Rakefile +347 -0
- data/VERSION +1 -0
- data/VERSION_NAME +1 -0
- data/bin/sass +9 -0
- data/bin/sass-convert +8 -0
- data/bin/scss +9 -0
- data/extra/update_watch.rb +13 -0
- data/init.rb +18 -0
- data/lib/sass.rb +95 -0
- data/lib/sass/cache_stores.rb +15 -0
- data/lib/sass/cache_stores/base.rb +88 -0
- data/lib/sass/cache_stores/chain.rb +33 -0
- data/lib/sass/cache_stores/filesystem.rb +60 -0
- data/lib/sass/cache_stores/memory.rb +47 -0
- data/lib/sass/cache_stores/null.rb +25 -0
- data/lib/sass/callbacks.rb +66 -0
- data/lib/sass/css.rb +409 -0
- data/lib/sass/engine.rb +928 -0
- data/lib/sass/environment.rb +101 -0
- data/lib/sass/error.rb +201 -0
- data/lib/sass/exec.rb +707 -0
- data/lib/sass/importers.rb +22 -0
- data/lib/sass/importers/base.rb +139 -0
- data/lib/sass/importers/filesystem.rb +190 -0
- data/lib/sass/logger.rb +15 -0
- data/lib/sass/logger/base.rb +32 -0
- data/lib/sass/logger/log_level.rb +49 -0
- data/lib/sass/media.rb +213 -0
- data/lib/sass/plugin.rb +132 -0
- data/lib/sass/plugin/compiler.rb +406 -0
- data/lib/sass/plugin/configuration.rb +123 -0
- data/lib/sass/plugin/generic.rb +15 -0
- data/lib/sass/plugin/merb.rb +48 -0
- data/lib/sass/plugin/rack.rb +60 -0
- data/lib/sass/plugin/rails.rb +47 -0
- data/lib/sass/plugin/staleness_checker.rb +183 -0
- data/lib/sass/railtie.rb +9 -0
- data/lib/sass/repl.rb +57 -0
- data/lib/sass/root.rb +7 -0
- data/lib/sass/script.rb +39 -0
- data/lib/sass/script/arg_list.rb +52 -0
- data/lib/sass/script/bool.rb +18 -0
- data/lib/sass/script/color.rb +606 -0
- data/lib/sass/script/css_lexer.rb +29 -0
- data/lib/sass/script/css_parser.rb +31 -0
- data/lib/sass/script/funcall.rb +237 -0
- data/lib/sass/script/functions.rb +1543 -0
- data/lib/sass/script/interpolation.rb +79 -0
- data/lib/sass/script/lexer.rb +348 -0
- data/lib/sass/script/list.rb +85 -0
- data/lib/sass/script/literal.rb +221 -0
- data/lib/sass/script/node.rb +99 -0
- data/lib/sass/script/null.rb +37 -0
- data/lib/sass/script/number.rb +453 -0
- data/lib/sass/script/operation.rb +110 -0
- data/lib/sass/script/parser.rb +495 -0
- data/lib/sass/script/string.rb +51 -0
- data/lib/sass/script/string_interpolation.rb +103 -0
- data/lib/sass/script/unary_operation.rb +69 -0
- data/lib/sass/script/variable.rb +58 -0
- data/lib/sass/scss.rb +16 -0
- data/lib/sass/scss/css_parser.rb +36 -0
- data/lib/sass/scss/parser.rb +1179 -0
- data/lib/sass/scss/rx.rb +133 -0
- data/lib/sass/scss/script_lexer.rb +15 -0
- data/lib/sass/scss/script_parser.rb +25 -0
- data/lib/sass/scss/static_parser.rb +54 -0
- data/lib/sass/selector.rb +452 -0
- data/lib/sass/selector/abstract_sequence.rb +94 -0
- data/lib/sass/selector/comma_sequence.rb +92 -0
- data/lib/sass/selector/sequence.rb +507 -0
- data/lib/sass/selector/simple.rb +119 -0
- data/lib/sass/selector/simple_sequence.rb +212 -0
- data/lib/sass/shared.rb +76 -0
- data/lib/sass/supports.rb +229 -0
- data/lib/sass/tree/charset_node.rb +22 -0
- data/lib/sass/tree/comment_node.rb +82 -0
- data/lib/sass/tree/content_node.rb +9 -0
- data/lib/sass/tree/css_import_node.rb +60 -0
- data/lib/sass/tree/debug_node.rb +18 -0
- data/lib/sass/tree/directive_node.rb +42 -0
- data/lib/sass/tree/each_node.rb +24 -0
- data/lib/sass/tree/extend_node.rb +36 -0
- data/lib/sass/tree/for_node.rb +36 -0
- data/lib/sass/tree/function_node.rb +34 -0
- data/lib/sass/tree/if_node.rb +52 -0
- data/lib/sass/tree/import_node.rb +75 -0
- data/lib/sass/tree/media_node.rb +58 -0
- data/lib/sass/tree/mixin_def_node.rb +38 -0
- data/lib/sass/tree/mixin_node.rb +39 -0
- data/lib/sass/tree/node.rb +196 -0
- data/lib/sass/tree/prop_node.rb +152 -0
- data/lib/sass/tree/return_node.rb +18 -0
- data/lib/sass/tree/root_node.rb +28 -0
- data/lib/sass/tree/rule_node.rb +132 -0
- data/lib/sass/tree/supports_node.rb +51 -0
- data/lib/sass/tree/trace_node.rb +32 -0
- data/lib/sass/tree/variable_node.rb +30 -0
- data/lib/sass/tree/visitors/base.rb +75 -0
- data/lib/sass/tree/visitors/check_nesting.rb +147 -0
- data/lib/sass/tree/visitors/convert.rb +316 -0
- data/lib/sass/tree/visitors/cssize.rb +229 -0
- data/lib/sass/tree/visitors/deep_copy.rb +102 -0
- data/lib/sass/tree/visitors/extend.rb +68 -0
- data/lib/sass/tree/visitors/perform.rb +446 -0
- data/lib/sass/tree/visitors/set_options.rb +125 -0
- data/lib/sass/tree/visitors/to_css.rb +230 -0
- data/lib/sass/tree/warn_node.rb +18 -0
- data/lib/sass/tree/while_node.rb +18 -0
- data/lib/sass/util.rb +906 -0
- data/lib/sass/util/multibyte_string_scanner.rb +155 -0
- data/lib/sass/util/subset_map.rb +109 -0
- data/lib/sass/util/test.rb +10 -0
- data/lib/sass/version.rb +126 -0
- data/rails/init.rb +1 -0
- data/test/Gemfile +3 -0
- data/test/Gemfile.lock +10 -0
- data/test/sass/cache_test.rb +89 -0
- data/test/sass/callbacks_test.rb +61 -0
- data/test/sass/conversion_test.rb +1760 -0
- data/test/sass/css2sass_test.rb +439 -0
- data/test/sass/data/hsl-rgb.txt +319 -0
- data/test/sass/engine_test.rb +3243 -0
- data/test/sass/exec_test.rb +86 -0
- data/test/sass/extend_test.rb +1461 -0
- data/test/sass/fixtures/test_staleness_check_across_importers.css +1 -0
- data/test/sass/fixtures/test_staleness_check_across_importers.scss +1 -0
- data/test/sass/functions_test.rb +1139 -0
- data/test/sass/importer_test.rb +192 -0
- data/test/sass/logger_test.rb +58 -0
- data/test/sass/mock_importer.rb +49 -0
- data/test/sass/more_results/more1.css +9 -0
- data/test/sass/more_results/more1_with_line_comments.css +26 -0
- data/test/sass/more_results/more_import.css +29 -0
- data/test/sass/more_templates/_more_partial.sass +2 -0
- data/test/sass/more_templates/more1.sass +23 -0
- data/test/sass/more_templates/more_import.sass +11 -0
- data/test/sass/plugin_test.rb +550 -0
- data/test/sass/results/alt.css +4 -0
- data/test/sass/results/basic.css +9 -0
- data/test/sass/results/cached_import_option.css +3 -0
- data/test/sass/results/compact.css +5 -0
- data/test/sass/results/complex.css +86 -0
- data/test/sass/results/compressed.css +1 -0
- data/test/sass/results/expanded.css +19 -0
- data/test/sass/results/filename_fn.css +3 -0
- data/test/sass/results/if.css +3 -0
- data/test/sass/results/import.css +31 -0
- data/test/sass/results/import_charset.css +5 -0
- data/test/sass/results/import_charset_1_8.css +5 -0
- data/test/sass/results/import_charset_ibm866.css +5 -0
- data/test/sass/results/import_content.css +1 -0
- data/test/sass/results/line_numbers.css +49 -0
- data/test/sass/results/mixins.css +95 -0
- data/test/sass/results/multiline.css +24 -0
- data/test/sass/results/nested.css +22 -0
- data/test/sass/results/options.css +1 -0
- data/test/sass/results/parent_ref.css +13 -0
- data/test/sass/results/script.css +16 -0
- data/test/sass/results/scss_import.css +31 -0
- data/test/sass/results/scss_importee.css +2 -0
- data/test/sass/results/subdir/nested_subdir/nested_subdir.css +1 -0
- data/test/sass/results/subdir/subdir.css +3 -0
- data/test/sass/results/units.css +11 -0
- data/test/sass/results/warn.css +0 -0
- data/test/sass/results/warn_imported.css +0 -0
- data/test/sass/script_conversion_test.rb +299 -0
- data/test/sass/script_test.rb +591 -0
- data/test/sass/scss/css_test.rb +1093 -0
- data/test/sass/scss/rx_test.rb +156 -0
- data/test/sass/scss/scss_test.rb +2043 -0
- data/test/sass/scss/test_helper.rb +37 -0
- data/test/sass/templates/_cached_import_option_partial.scss +1 -0
- data/test/sass/templates/_double_import_loop2.sass +1 -0
- data/test/sass/templates/_filename_fn_import.scss +11 -0
- data/test/sass/templates/_imported_charset_ibm866.sass +4 -0
- data/test/sass/templates/_imported_charset_utf8.sass +4 -0
- data/test/sass/templates/_imported_content.sass +3 -0
- data/test/sass/templates/_partial.sass +2 -0
- data/test/sass/templates/_same_name_different_partiality.scss +1 -0
- data/test/sass/templates/alt.sass +16 -0
- data/test/sass/templates/basic.sass +23 -0
- data/test/sass/templates/bork1.sass +2 -0
- data/test/sass/templates/bork2.sass +2 -0
- data/test/sass/templates/bork3.sass +2 -0
- data/test/sass/templates/bork4.sass +2 -0
- data/test/sass/templates/bork5.sass +3 -0
- data/test/sass/templates/cached_import_option.scss +3 -0
- data/test/sass/templates/compact.sass +17 -0
- data/test/sass/templates/complex.sass +305 -0
- data/test/sass/templates/compressed.sass +15 -0
- data/test/sass/templates/double_import_loop1.sass +1 -0
- data/test/sass/templates/expanded.sass +17 -0
- data/test/sass/templates/filename_fn.scss +18 -0
- data/test/sass/templates/if.sass +11 -0
- data/test/sass/templates/import.sass +12 -0
- data/test/sass/templates/import_charset.sass +9 -0
- data/test/sass/templates/import_charset_1_8.sass +6 -0
- data/test/sass/templates/import_charset_ibm866.sass +11 -0
- data/test/sass/templates/import_content.sass +4 -0
- data/test/sass/templates/importee.less +2 -0
- data/test/sass/templates/importee.sass +19 -0
- data/test/sass/templates/line_numbers.sass +13 -0
- data/test/sass/templates/mixin_bork.sass +5 -0
- data/test/sass/templates/mixins.sass +76 -0
- data/test/sass/templates/multiline.sass +20 -0
- data/test/sass/templates/nested.sass +25 -0
- data/test/sass/templates/nested_bork1.sass +2 -0
- data/test/sass/templates/nested_bork2.sass +2 -0
- data/test/sass/templates/nested_bork3.sass +2 -0
- data/test/sass/templates/nested_bork4.sass +2 -0
- data/test/sass/templates/nested_import.sass +2 -0
- data/test/sass/templates/nested_mixin_bork.sass +6 -0
- data/test/sass/templates/options.sass +2 -0
- data/test/sass/templates/parent_ref.sass +25 -0
- data/test/sass/templates/same_name_different_ext.sass +2 -0
- data/test/sass/templates/same_name_different_ext.scss +1 -0
- data/test/sass/templates/same_name_different_partiality.scss +1 -0
- data/test/sass/templates/script.sass +101 -0
- data/test/sass/templates/scss_import.scss +11 -0
- data/test/sass/templates/scss_importee.scss +1 -0
- data/test/sass/templates/single_import_loop.sass +1 -0
- data/test/sass/templates/subdir/nested_subdir/_nested_partial.sass +2 -0
- data/test/sass/templates/subdir/nested_subdir/nested_subdir.sass +3 -0
- data/test/sass/templates/subdir/subdir.sass +6 -0
- data/test/sass/templates/units.sass +11 -0
- data/test/sass/templates/warn.sass +3 -0
- data/test/sass/templates/warn_imported.sass +4 -0
- data/test/sass/test_helper.rb +8 -0
- data/test/sass/util/multibyte_string_scanner_test.rb +147 -0
- data/test/sass/util/subset_map_test.rb +91 -0
- data/test/sass/util_test.rb +313 -0
- data/test/test_helper.rb +80 -0
- metadata +348 -0
@@ -0,0 +1 @@
|
|
1
|
+
@import "double_import_loop2"
|
@@ -0,0 +1,18 @@
|
|
1
|
+
@import "filename_fn_import";
|
2
|
+
|
3
|
+
@mixin local-mixin {
|
4
|
+
local-mixin: filename();
|
5
|
+
}
|
6
|
+
|
7
|
+
@function local-function() {
|
8
|
+
@return filename();
|
9
|
+
}
|
10
|
+
|
11
|
+
filename {
|
12
|
+
local: filename();
|
13
|
+
@include local-mixin;
|
14
|
+
local-function: local-function();
|
15
|
+
|
16
|
+
@include imported-mixin;
|
17
|
+
imported-function: imported-function();
|
18
|
+
}
|
@@ -0,0 +1,76 @@
|
|
1
|
+
$yellow: #fc0
|
2
|
+
|
3
|
+
=bordered
|
4
|
+
:border
|
5
|
+
:top
|
6
|
+
:width 2px
|
7
|
+
:color $yellow
|
8
|
+
:left
|
9
|
+
:width 1px
|
10
|
+
:color #000
|
11
|
+
-moz-border-radius: 10px
|
12
|
+
|
13
|
+
=header-font
|
14
|
+
:color #f00
|
15
|
+
:font
|
16
|
+
:size 20px
|
17
|
+
|
18
|
+
=compound
|
19
|
+
+header-font
|
20
|
+
+bordered
|
21
|
+
|
22
|
+
=complex
|
23
|
+
+header-font
|
24
|
+
text:
|
25
|
+
decoration: none
|
26
|
+
&:after
|
27
|
+
content: "."
|
28
|
+
display: block
|
29
|
+
height: 0
|
30
|
+
clear: both
|
31
|
+
visibility: hidden
|
32
|
+
* html &
|
33
|
+
height: 1px
|
34
|
+
+header-font
|
35
|
+
=deep
|
36
|
+
a:hover
|
37
|
+
:text-decoration underline
|
38
|
+
+compound
|
39
|
+
|
40
|
+
|
41
|
+
#main
|
42
|
+
:width 15em
|
43
|
+
:color #0000ff
|
44
|
+
p
|
45
|
+
+bordered
|
46
|
+
:border
|
47
|
+
:style dotted
|
48
|
+
:width 2px
|
49
|
+
.cool
|
50
|
+
:width 100px
|
51
|
+
|
52
|
+
#left
|
53
|
+
+bordered
|
54
|
+
:font
|
55
|
+
:size 2em
|
56
|
+
:weight bold
|
57
|
+
:float left
|
58
|
+
|
59
|
+
#right
|
60
|
+
+bordered
|
61
|
+
+header-font
|
62
|
+
:float right
|
63
|
+
|
64
|
+
.bordered
|
65
|
+
+bordered
|
66
|
+
|
67
|
+
.complex
|
68
|
+
+complex
|
69
|
+
|
70
|
+
.more-complex
|
71
|
+
+complex
|
72
|
+
+deep
|
73
|
+
display: inline
|
74
|
+
-webkit-nonsense:
|
75
|
+
top-right: 1px
|
76
|
+
bottom-left: 1px
|
@@ -0,0 +1,25 @@
|
|
1
|
+
#main
|
2
|
+
:width 15em
|
3
|
+
:color #0000ff
|
4
|
+
p
|
5
|
+
:border
|
6
|
+
:style dotted
|
7
|
+
/* Nested comment
|
8
|
+
More nested stuff
|
9
|
+
:width 2px
|
10
|
+
.cool
|
11
|
+
:width 100px
|
12
|
+
|
13
|
+
#left
|
14
|
+
:font
|
15
|
+
:size 2em
|
16
|
+
:weight bold
|
17
|
+
:float left
|
18
|
+
|
19
|
+
#right
|
20
|
+
.header
|
21
|
+
:border-style solid
|
22
|
+
.body
|
23
|
+
:border-style dotted
|
24
|
+
.footer
|
25
|
+
:border-style dashed
|
@@ -0,0 +1,25 @@
|
|
1
|
+
a
|
2
|
+
:color #000
|
3
|
+
&:hover
|
4
|
+
:color #f00
|
5
|
+
|
6
|
+
p, div
|
7
|
+
:width 100em
|
8
|
+
& foo
|
9
|
+
:width 10em
|
10
|
+
&:hover, bar
|
11
|
+
:height 20em
|
12
|
+
|
13
|
+
#cool
|
14
|
+
:border
|
15
|
+
:style solid
|
16
|
+
:width 2em
|
17
|
+
.ie7 &, .ie6 &
|
18
|
+
:content string("Totally not cool.")
|
19
|
+
.firefox &
|
20
|
+
:content string("Quite cool.")
|
21
|
+
|
22
|
+
.wow, .snazzy
|
23
|
+
:font-family fantasy
|
24
|
+
&:hover, &:visited
|
25
|
+
:font-weight bold
|
@@ -0,0 +1 @@
|
|
1
|
+
.foo {ext: scss}
|
@@ -0,0 +1 @@
|
|
1
|
+
.foo {partial: no}
|
@@ -0,0 +1,101 @@
|
|
1
|
+
$width: 10em + 20
|
2
|
+
$color: #00ff98
|
3
|
+
$main_text: #ffa
|
4
|
+
$num: 10
|
5
|
+
$dec: 10.2
|
6
|
+
$dec_0: 99.0
|
7
|
+
$neg: -10
|
8
|
+
$esc: 10\+12
|
9
|
+
$str: Hello\!
|
10
|
+
$qstr: "Quo\"ted\"!"
|
11
|
+
$hstr: Hyph-en\!
|
12
|
+
$space: #{5 + 4} hi there
|
13
|
+
$percent: 11%
|
14
|
+
$complex: 1px/1em
|
15
|
+
|
16
|
+
#main
|
17
|
+
:content $str
|
18
|
+
:qstr $qstr
|
19
|
+
:hstr $hstr
|
20
|
+
:width $width
|
21
|
+
:background-color #000
|
22
|
+
:color $main_text
|
23
|
+
:short-color #123
|
24
|
+
:named-color olive
|
25
|
+
:con "foo" bar ($space "boom")
|
26
|
+
:con2 "noquo" quo
|
27
|
+
#sidebar
|
28
|
+
:background-color $color
|
29
|
+
:num
|
30
|
+
:normal $num
|
31
|
+
:dec $dec
|
32
|
+
:dec0 $dec_0
|
33
|
+
:neg $neg
|
34
|
+
:esc $esc
|
35
|
+
:many 1 + 2 + 3
|
36
|
+
:order 1 + 2 * 3
|
37
|
+
:complex ((1 + 2) + 15)+#3a8b9f + (hi+(1 +1+ 2)* 4)
|
38
|
+
|
39
|
+
#plus
|
40
|
+
:num
|
41
|
+
:num 5+2
|
42
|
+
:num-un 10em + 15em
|
43
|
+
:num-un2 10 + 13em
|
44
|
+
:num-neg 10 + -.13
|
45
|
+
:str 100 * 1px
|
46
|
+
:col 13 + #aaa
|
47
|
+
:perc $percent + 20%
|
48
|
+
:str
|
49
|
+
:str "hi" + "\ there"
|
50
|
+
:str2 "hi" + " there"
|
51
|
+
:col "14em solid " + #123
|
52
|
+
:num "times: " + 13
|
53
|
+
:col
|
54
|
+
:num #f02 + 123.5
|
55
|
+
:col #12A + #405162
|
56
|
+
|
57
|
+
#minus
|
58
|
+
:num
|
59
|
+
:num 912 - 12
|
60
|
+
:col
|
61
|
+
:num #fffffa - 5.2
|
62
|
+
:col #abcdef - #fedcba
|
63
|
+
:unary
|
64
|
+
:num -1
|
65
|
+
:const -$neg
|
66
|
+
:paren -(5 + 6)
|
67
|
+
:two --12
|
68
|
+
:many --------12
|
69
|
+
:crazy -----(5 + ---$neg)
|
70
|
+
|
71
|
+
#times
|
72
|
+
:num
|
73
|
+
:num 2 * 3.5
|
74
|
+
:col 2 * #3a4b5c
|
75
|
+
:col
|
76
|
+
:num #12468a * 0.5
|
77
|
+
:col #121212 * #020304
|
78
|
+
|
79
|
+
#div
|
80
|
+
:num
|
81
|
+
:num (10 / 3.0)
|
82
|
+
:num2 (10 / 3)
|
83
|
+
:col
|
84
|
+
:num #12468a / 2
|
85
|
+
:col #abcdef / #0f0f0f
|
86
|
+
:comp $complex * 1em
|
87
|
+
|
88
|
+
#mod
|
89
|
+
:num
|
90
|
+
:num 17 % 3
|
91
|
+
:col
|
92
|
+
:col #5f6e7d % #10200a
|
93
|
+
:num #aaabac % 3
|
94
|
+
|
95
|
+
#const
|
96
|
+
:escaped
|
97
|
+
:quote \$foo \!bar
|
98
|
+
:default $str !important
|
99
|
+
|
100
|
+
#regression
|
101
|
+
:a (3 + 2) - 1
|