less 0.8.13 → 1.0.4
Sign up to get free protection for your applications and to get access to all the features.
- data/README.md +10 -1
- data/Rakefile +21 -3
- data/VERSION +1 -1
- data/bin/lessc +0 -8
- data/less.gemspec +138 -15
- data/lib/less.rb +67 -11
- data/lib/less/command.rb +24 -25
- data/lib/less/engine.rb +36 -140
- data/lib/less/engine/builder.rb +8 -0
- data/lib/less/engine/less.tt +374 -0
- data/lib/less/engine/nodes.rb +8 -0
- data/lib/less/engine/nodes/element.rb +150 -0
- data/lib/less/engine/nodes/entity.rb +73 -0
- data/lib/less/engine/nodes/function.rb +82 -0
- data/lib/less/engine/nodes/literal.rb +135 -0
- data/lib/less/engine/nodes/property.rb +112 -0
- data/lib/less/engine/nodes/selector.rb +39 -0
- data/lib/less/engine/parser.rb +3860 -0
- data/lib/vendor/treetop/.gitignore +7 -0
- data/lib/vendor/treetop/LICENSE +19 -0
- data/lib/vendor/treetop/README +164 -0
- data/lib/vendor/treetop/Rakefile +19 -0
- data/lib/vendor/treetop/benchmark/seqpar.gnuplot +15 -0
- data/lib/vendor/treetop/benchmark/seqpar.treetop +16 -0
- data/lib/vendor/treetop/benchmark/seqpar_benchmark.rb +107 -0
- data/lib/vendor/treetop/bin/tt +28 -0
- data/lib/vendor/treetop/lib/treetop.rb +8 -0
- data/lib/vendor/treetop/lib/treetop/bootstrap_gen_1_metagrammar.rb +45 -0
- data/lib/vendor/treetop/lib/treetop/compiler.rb +6 -0
- data/lib/vendor/treetop/lib/treetop/compiler/grammar_compiler.rb +42 -0
- data/lib/vendor/treetop/lib/treetop/compiler/lexical_address_space.rb +17 -0
- data/lib/vendor/treetop/lib/treetop/compiler/metagrammar.rb +3097 -0
- data/lib/vendor/treetop/lib/treetop/compiler/metagrammar.treetop +408 -0
- data/lib/vendor/treetop/lib/treetop/compiler/node_classes.rb +19 -0
- data/lib/vendor/treetop/lib/treetop/compiler/node_classes/anything_symbol.rb +18 -0
- data/lib/vendor/treetop/lib/treetop/compiler/node_classes/atomic_expression.rb +14 -0
- data/lib/vendor/treetop/lib/treetop/compiler/node_classes/character_class.rb +23 -0
- data/lib/vendor/treetop/lib/treetop/compiler/node_classes/choice.rb +31 -0
- data/lib/vendor/treetop/lib/treetop/compiler/node_classes/declaration_sequence.rb +24 -0
- data/lib/vendor/treetop/lib/treetop/compiler/node_classes/grammar.rb +28 -0
- data/lib/vendor/treetop/lib/treetop/compiler/node_classes/inline_module.rb +27 -0
- data/lib/vendor/treetop/lib/treetop/compiler/node_classes/nonterminal.rb +13 -0
- data/lib/vendor/treetop/lib/treetop/compiler/node_classes/optional.rb +19 -0
- data/lib/vendor/treetop/lib/treetop/compiler/node_classes/parenthesized_expression.rb +9 -0
- data/lib/vendor/treetop/lib/treetop/compiler/node_classes/parsing_expression.rb +146 -0
- data/lib/vendor/treetop/lib/treetop/compiler/node_classes/parsing_rule.rb +55 -0
- data/lib/vendor/treetop/lib/treetop/compiler/node_classes/predicate.rb +45 -0
- data/lib/vendor/treetop/lib/treetop/compiler/node_classes/repetition.rb +55 -0
- data/lib/vendor/treetop/lib/treetop/compiler/node_classes/sequence.rb +68 -0
- data/lib/vendor/treetop/lib/treetop/compiler/node_classes/terminal.rb +20 -0
- data/lib/vendor/treetop/lib/treetop/compiler/node_classes/transient_prefix.rb +9 -0
- data/lib/vendor/treetop/lib/treetop/compiler/node_classes/treetop_file.rb +9 -0
- data/lib/vendor/treetop/lib/treetop/compiler/ruby_builder.rb +113 -0
- data/lib/vendor/treetop/lib/treetop/ruby_extensions.rb +2 -0
- data/lib/vendor/treetop/lib/treetop/ruby_extensions/string.rb +42 -0
- data/lib/vendor/treetop/lib/treetop/runtime.rb +5 -0
- data/lib/vendor/treetop/lib/treetop/runtime/compiled_parser.rb +109 -0
- data/lib/vendor/treetop/lib/treetop/runtime/interval_skip_list.rb +4 -0
- data/lib/vendor/treetop/lib/treetop/runtime/interval_skip_list/head_node.rb +15 -0
- data/lib/vendor/treetop/lib/treetop/runtime/interval_skip_list/interval_skip_list.rb +200 -0
- data/lib/vendor/treetop/lib/treetop/runtime/interval_skip_list/node.rb +164 -0
- data/lib/vendor/treetop/lib/treetop/runtime/syntax_node.rb +90 -0
- data/lib/vendor/treetop/lib/treetop/runtime/terminal_parse_failure.rb +16 -0
- data/lib/vendor/treetop/lib/treetop/runtime/terminal_syntax_node.rb +17 -0
- data/lib/vendor/treetop/lib/treetop/version.rb +9 -0
- data/lib/vendor/treetop/spec/compiler/and_predicate_spec.rb +36 -0
- data/lib/vendor/treetop/spec/compiler/anything_symbol_spec.rb +44 -0
- data/lib/vendor/treetop/spec/compiler/character_class_spec.rb +247 -0
- data/lib/vendor/treetop/spec/compiler/choice_spec.rb +80 -0
- data/lib/vendor/treetop/spec/compiler/circular_compilation_spec.rb +28 -0
- data/lib/vendor/treetop/spec/compiler/failure_propagation_functional_spec.rb +21 -0
- data/lib/vendor/treetop/spec/compiler/grammar_compiler_spec.rb +84 -0
- data/lib/vendor/treetop/spec/compiler/grammar_spec.rb +41 -0
- data/lib/vendor/treetop/spec/compiler/nonterminal_symbol_spec.rb +40 -0
- data/lib/vendor/treetop/spec/compiler/not_predicate_spec.rb +38 -0
- data/lib/vendor/treetop/spec/compiler/one_or_more_spec.rb +35 -0
- data/lib/vendor/treetop/spec/compiler/optional_spec.rb +37 -0
- data/lib/vendor/treetop/spec/compiler/parenthesized_expression_spec.rb +19 -0
- data/lib/vendor/treetop/spec/compiler/parsing_rule_spec.rb +32 -0
- data/lib/vendor/treetop/spec/compiler/sequence_spec.rb +115 -0
- data/lib/vendor/treetop/spec/compiler/terminal_spec.rb +81 -0
- data/lib/vendor/treetop/spec/compiler/terminal_symbol_spec.rb +37 -0
- data/lib/vendor/treetop/spec/compiler/test_grammar.treetop +7 -0
- data/lib/vendor/treetop/spec/compiler/test_grammar.tt +7 -0
- data/lib/vendor/treetop/spec/compiler/test_grammar_do.treetop +7 -0
- data/lib/vendor/treetop/spec/compiler/zero_or_more_spec.rb +56 -0
- data/lib/vendor/treetop/spec/composition/a.treetop +11 -0
- data/lib/vendor/treetop/spec/composition/b.treetop +11 -0
- data/lib/vendor/treetop/spec/composition/c.treetop +10 -0
- data/lib/vendor/treetop/spec/composition/d.treetop +10 -0
- data/lib/vendor/treetop/spec/composition/f.treetop +17 -0
- data/lib/vendor/treetop/spec/composition/grammar_composition_spec.rb +40 -0
- data/lib/vendor/treetop/spec/composition/subfolder/e_includes_c.treetop +15 -0
- data/lib/vendor/treetop/spec/ruby_extensions/string_spec.rb +32 -0
- data/lib/vendor/treetop/spec/runtime/compiled_parser_spec.rb +101 -0
- data/lib/vendor/treetop/spec/runtime/interval_skip_list/delete_spec.rb +147 -0
- data/lib/vendor/treetop/spec/runtime/interval_skip_list/expire_range_spec.rb +349 -0
- data/lib/vendor/treetop/spec/runtime/interval_skip_list/insert_and_delete_node.rb +385 -0
- data/lib/vendor/treetop/spec/runtime/interval_skip_list/insert_spec.rb +660 -0
- data/lib/vendor/treetop/spec/runtime/interval_skip_list/interval_skip_list_spec.graffle +6175 -0
- data/lib/vendor/treetop/spec/runtime/interval_skip_list/interval_skip_list_spec.rb +58 -0
- data/lib/vendor/treetop/spec/runtime/interval_skip_list/palindromic_fixture.rb +23 -0
- data/lib/vendor/treetop/spec/runtime/interval_skip_list/palindromic_fixture_spec.rb +164 -0
- data/lib/vendor/treetop/spec/runtime/interval_skip_list/spec_helper.rb +84 -0
- data/lib/vendor/treetop/spec/runtime/syntax_node_spec.rb +68 -0
- data/lib/vendor/treetop/spec/spec_helper.rb +106 -0
- data/lib/vendor/treetop/spec/spec_suite.rb +4 -0
- data/lib/vendor/treetop/treetop.gemspec +17 -0
- data/spec/command_spec.rb +2 -6
- data/spec/css/accessors-1.0.css +18 -0
- data/spec/css/big-1.0.css +3768 -0
- data/spec/css/comments-1.0.css +9 -0
- data/spec/css/css-1.0.css +40 -0
- data/spec/css/functions-1.0.css +6 -0
- data/spec/css/import-1.0.css +11 -0
- data/spec/css/mixins-1.0.css +28 -0
- data/spec/css/operations-1.0.css +28 -0
- data/spec/css/rulesets-1.0.css +17 -0
- data/spec/css/scope-1.0.css +14 -0
- data/spec/css/strings-1.0.css +12 -0
- data/spec/css/variables-1.0.css +6 -0
- data/spec/css/whitespace-1.0.css +9 -0
- data/spec/engine_spec.rb +66 -18
- data/spec/less/accessors-1.0.less +20 -0
- data/spec/less/big-1.0.less +4810 -0
- data/spec/less/colors-1.0.less +0 -0
- data/spec/less/comments-1.0.less +46 -0
- data/spec/less/css-1.0.less +84 -0
- data/spec/less/exceptions/mixed-units-error.less +3 -0
- data/spec/less/exceptions/name-error-1.0.less +3 -0
- data/spec/less/exceptions/syntax-error-1.0.less +3 -0
- data/spec/less/functions-1.0.less +6 -0
- data/spec/less/import-1.0.less +7 -0
- data/spec/less/import/import-test-a.less +2 -0
- data/spec/less/import/import-test-b.less +8 -0
- data/spec/less/import/import-test-c.less +5 -0
- data/spec/less/mixins-1.0.less +43 -0
- data/spec/less/operations-1.0.less +39 -0
- data/spec/less/rulesets-1.0.less +30 -0
- data/spec/less/scope-1.0.less +33 -0
- data/spec/less/strings-1.0.less +14 -0
- data/spec/less/variables-1.0.less +18 -0
- data/spec/less/whitespace-1.0.less +21 -0
- data/spec/spec.css +79 -24
- data/spec/spec.less +2 -3
- data/spec/spec_helper.rb +4 -1
- metadata +136 -13
- data/lib/less/tree.rb +0 -82
- data/spec/css/less-0.8.10.css +0 -30
- data/spec/css/less-0.8.11.css +0 -31
- data/spec/css/less-0.8.12.css +0 -28
- data/spec/css/less-0.8.5.css +0 -24
- data/spec/css/less-0.8.6.css +0 -24
- data/spec/css/less-0.8.7.css +0 -24
- data/spec/css/less-0.8.8.css +0 -25
- data/spec/tree_spec.rb +0 -5
data/spec/spec.less
CHANGED
@@ -136,9 +136,8 @@ input[type="text"] {
|
|
136
136
|
background-color: blue;
|
137
137
|
}
|
138
138
|
.transparent_box {
|
139
|
-
background-color
|
140
|
-
|
141
|
-
opacity:0.6; /* CSS3 standard */
|
139
|
+
background-color: #FFF;
|
140
|
+
opacity: 0.6; /* CSS3 standard */
|
142
141
|
}
|
143
142
|
|
144
143
|
// Spacing
|
data/spec/spec_helper.rb
CHANGED
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: less
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.
|
4
|
+
version: 1.0.4
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- cloudhead
|
@@ -9,12 +9,12 @@ autorequire:
|
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
11
|
|
12
|
-
date: 2009-
|
12
|
+
date: 2009-07-13 00:00:00 -04:00
|
13
13
|
default_executable: lessc
|
14
14
|
dependencies: []
|
15
15
|
|
16
16
|
description: LESS is leaner CSS
|
17
|
-
email:
|
17
|
+
email: self@cloudhead.net
|
18
18
|
executables:
|
19
19
|
- lessc
|
20
20
|
extensions: []
|
@@ -33,20 +33,144 @@ files:
|
|
33
33
|
- lib/less.rb
|
34
34
|
- lib/less/command.rb
|
35
35
|
- lib/less/engine.rb
|
36
|
-
- lib/less/
|
36
|
+
- lib/less/engine/builder.rb
|
37
|
+
- lib/less/engine/less.tt
|
38
|
+
- lib/less/engine/nodes.rb
|
39
|
+
- lib/less/engine/nodes/element.rb
|
40
|
+
- lib/less/engine/nodes/entity.rb
|
41
|
+
- lib/less/engine/nodes/function.rb
|
42
|
+
- lib/less/engine/nodes/literal.rb
|
43
|
+
- lib/less/engine/nodes/property.rb
|
44
|
+
- lib/less/engine/nodes/selector.rb
|
45
|
+
- lib/less/engine/parser.rb
|
46
|
+
- lib/vendor/treetop/.gitignore
|
47
|
+
- lib/vendor/treetop/LICENSE
|
48
|
+
- lib/vendor/treetop/README
|
49
|
+
- lib/vendor/treetop/Rakefile
|
50
|
+
- lib/vendor/treetop/benchmark/seqpar.gnuplot
|
51
|
+
- lib/vendor/treetop/benchmark/seqpar.treetop
|
52
|
+
- lib/vendor/treetop/benchmark/seqpar_benchmark.rb
|
53
|
+
- lib/vendor/treetop/bin/tt
|
54
|
+
- lib/vendor/treetop/lib/treetop.rb
|
55
|
+
- lib/vendor/treetop/lib/treetop/bootstrap_gen_1_metagrammar.rb
|
56
|
+
- lib/vendor/treetop/lib/treetop/compiler.rb
|
57
|
+
- lib/vendor/treetop/lib/treetop/compiler/grammar_compiler.rb
|
58
|
+
- lib/vendor/treetop/lib/treetop/compiler/lexical_address_space.rb
|
59
|
+
- lib/vendor/treetop/lib/treetop/compiler/metagrammar.rb
|
60
|
+
- lib/vendor/treetop/lib/treetop/compiler/metagrammar.treetop
|
61
|
+
- lib/vendor/treetop/lib/treetop/compiler/node_classes.rb
|
62
|
+
- lib/vendor/treetop/lib/treetop/compiler/node_classes/anything_symbol.rb
|
63
|
+
- lib/vendor/treetop/lib/treetop/compiler/node_classes/atomic_expression.rb
|
64
|
+
- lib/vendor/treetop/lib/treetop/compiler/node_classes/character_class.rb
|
65
|
+
- lib/vendor/treetop/lib/treetop/compiler/node_classes/choice.rb
|
66
|
+
- lib/vendor/treetop/lib/treetop/compiler/node_classes/declaration_sequence.rb
|
67
|
+
- lib/vendor/treetop/lib/treetop/compiler/node_classes/grammar.rb
|
68
|
+
- lib/vendor/treetop/lib/treetop/compiler/node_classes/inline_module.rb
|
69
|
+
- lib/vendor/treetop/lib/treetop/compiler/node_classes/nonterminal.rb
|
70
|
+
- lib/vendor/treetop/lib/treetop/compiler/node_classes/optional.rb
|
71
|
+
- lib/vendor/treetop/lib/treetop/compiler/node_classes/parenthesized_expression.rb
|
72
|
+
- lib/vendor/treetop/lib/treetop/compiler/node_classes/parsing_expression.rb
|
73
|
+
- lib/vendor/treetop/lib/treetop/compiler/node_classes/parsing_rule.rb
|
74
|
+
- lib/vendor/treetop/lib/treetop/compiler/node_classes/predicate.rb
|
75
|
+
- lib/vendor/treetop/lib/treetop/compiler/node_classes/repetition.rb
|
76
|
+
- lib/vendor/treetop/lib/treetop/compiler/node_classes/sequence.rb
|
77
|
+
- lib/vendor/treetop/lib/treetop/compiler/node_classes/terminal.rb
|
78
|
+
- lib/vendor/treetop/lib/treetop/compiler/node_classes/transient_prefix.rb
|
79
|
+
- lib/vendor/treetop/lib/treetop/compiler/node_classes/treetop_file.rb
|
80
|
+
- lib/vendor/treetop/lib/treetop/compiler/ruby_builder.rb
|
81
|
+
- lib/vendor/treetop/lib/treetop/ruby_extensions.rb
|
82
|
+
- lib/vendor/treetop/lib/treetop/ruby_extensions/string.rb
|
83
|
+
- lib/vendor/treetop/lib/treetop/runtime.rb
|
84
|
+
- lib/vendor/treetop/lib/treetop/runtime/compiled_parser.rb
|
85
|
+
- lib/vendor/treetop/lib/treetop/runtime/interval_skip_list.rb
|
86
|
+
- lib/vendor/treetop/lib/treetop/runtime/interval_skip_list/head_node.rb
|
87
|
+
- lib/vendor/treetop/lib/treetop/runtime/interval_skip_list/interval_skip_list.rb
|
88
|
+
- lib/vendor/treetop/lib/treetop/runtime/interval_skip_list/node.rb
|
89
|
+
- lib/vendor/treetop/lib/treetop/runtime/syntax_node.rb
|
90
|
+
- lib/vendor/treetop/lib/treetop/runtime/terminal_parse_failure.rb
|
91
|
+
- lib/vendor/treetop/lib/treetop/runtime/terminal_syntax_node.rb
|
92
|
+
- lib/vendor/treetop/lib/treetop/version.rb
|
93
|
+
- lib/vendor/treetop/spec/compiler/and_predicate_spec.rb
|
94
|
+
- lib/vendor/treetop/spec/compiler/anything_symbol_spec.rb
|
95
|
+
- lib/vendor/treetop/spec/compiler/character_class_spec.rb
|
96
|
+
- lib/vendor/treetop/spec/compiler/choice_spec.rb
|
97
|
+
- lib/vendor/treetop/spec/compiler/circular_compilation_spec.rb
|
98
|
+
- lib/vendor/treetop/spec/compiler/failure_propagation_functional_spec.rb
|
99
|
+
- lib/vendor/treetop/spec/compiler/grammar_compiler_spec.rb
|
100
|
+
- lib/vendor/treetop/spec/compiler/grammar_spec.rb
|
101
|
+
- lib/vendor/treetop/spec/compiler/nonterminal_symbol_spec.rb
|
102
|
+
- lib/vendor/treetop/spec/compiler/not_predicate_spec.rb
|
103
|
+
- lib/vendor/treetop/spec/compiler/one_or_more_spec.rb
|
104
|
+
- lib/vendor/treetop/spec/compiler/optional_spec.rb
|
105
|
+
- lib/vendor/treetop/spec/compiler/parenthesized_expression_spec.rb
|
106
|
+
- lib/vendor/treetop/spec/compiler/parsing_rule_spec.rb
|
107
|
+
- lib/vendor/treetop/spec/compiler/sequence_spec.rb
|
108
|
+
- lib/vendor/treetop/spec/compiler/terminal_spec.rb
|
109
|
+
- lib/vendor/treetop/spec/compiler/terminal_symbol_spec.rb
|
110
|
+
- lib/vendor/treetop/spec/compiler/test_grammar.treetop
|
111
|
+
- lib/vendor/treetop/spec/compiler/test_grammar.tt
|
112
|
+
- lib/vendor/treetop/spec/compiler/test_grammar_do.treetop
|
113
|
+
- lib/vendor/treetop/spec/compiler/zero_or_more_spec.rb
|
114
|
+
- lib/vendor/treetop/spec/composition/a.treetop
|
115
|
+
- lib/vendor/treetop/spec/composition/b.treetop
|
116
|
+
- lib/vendor/treetop/spec/composition/c.treetop
|
117
|
+
- lib/vendor/treetop/spec/composition/d.treetop
|
118
|
+
- lib/vendor/treetop/spec/composition/f.treetop
|
119
|
+
- lib/vendor/treetop/spec/composition/grammar_composition_spec.rb
|
120
|
+
- lib/vendor/treetop/spec/composition/subfolder/e_includes_c.treetop
|
121
|
+
- lib/vendor/treetop/spec/ruby_extensions/string_spec.rb
|
122
|
+
- lib/vendor/treetop/spec/runtime/compiled_parser_spec.rb
|
123
|
+
- lib/vendor/treetop/spec/runtime/interval_skip_list/delete_spec.rb
|
124
|
+
- lib/vendor/treetop/spec/runtime/interval_skip_list/expire_range_spec.rb
|
125
|
+
- lib/vendor/treetop/spec/runtime/interval_skip_list/insert_and_delete_node.rb
|
126
|
+
- lib/vendor/treetop/spec/runtime/interval_skip_list/insert_spec.rb
|
127
|
+
- lib/vendor/treetop/spec/runtime/interval_skip_list/interval_skip_list_spec.graffle
|
128
|
+
- lib/vendor/treetop/spec/runtime/interval_skip_list/interval_skip_list_spec.rb
|
129
|
+
- lib/vendor/treetop/spec/runtime/interval_skip_list/palindromic_fixture.rb
|
130
|
+
- lib/vendor/treetop/spec/runtime/interval_skip_list/palindromic_fixture_spec.rb
|
131
|
+
- lib/vendor/treetop/spec/runtime/interval_skip_list/spec_helper.rb
|
132
|
+
- lib/vendor/treetop/spec/runtime/syntax_node_spec.rb
|
133
|
+
- lib/vendor/treetop/spec/spec_helper.rb
|
134
|
+
- lib/vendor/treetop/spec/spec_suite.rb
|
135
|
+
- lib/vendor/treetop/treetop.gemspec
|
37
136
|
- spec/command_spec.rb
|
38
|
-
- spec/css/
|
39
|
-
- spec/css/
|
40
|
-
- spec/css/
|
41
|
-
- spec/css/
|
42
|
-
- spec/css/
|
43
|
-
- spec/css/
|
44
|
-
- spec/css/
|
137
|
+
- spec/css/accessors-1.0.css
|
138
|
+
- spec/css/big-1.0.css
|
139
|
+
- spec/css/comments-1.0.css
|
140
|
+
- spec/css/css-1.0.css
|
141
|
+
- spec/css/functions-1.0.css
|
142
|
+
- spec/css/import-1.0.css
|
143
|
+
- spec/css/mixins-1.0.css
|
144
|
+
- spec/css/operations-1.0.css
|
145
|
+
- spec/css/rulesets-1.0.css
|
146
|
+
- spec/css/scope-1.0.css
|
147
|
+
- spec/css/strings-1.0.css
|
148
|
+
- spec/css/variables-1.0.css
|
149
|
+
- spec/css/whitespace-1.0.css
|
45
150
|
- spec/engine_spec.rb
|
151
|
+
- spec/less/accessors-1.0.less
|
152
|
+
- spec/less/big-1.0.less
|
153
|
+
- spec/less/colors-1.0.less
|
154
|
+
- spec/less/comments-1.0.less
|
155
|
+
- spec/less/css-1.0.less
|
156
|
+
- spec/less/exceptions/mixed-units-error.less
|
157
|
+
- spec/less/exceptions/name-error-1.0.less
|
158
|
+
- spec/less/exceptions/syntax-error-1.0.less
|
159
|
+
- spec/less/functions-1.0.less
|
160
|
+
- spec/less/import-1.0.less
|
161
|
+
- spec/less/import/import-test-a.less
|
162
|
+
- spec/less/import/import-test-b.less
|
163
|
+
- spec/less/import/import-test-c.less
|
164
|
+
- spec/less/mixins-1.0.less
|
165
|
+
- spec/less/operations-1.0.less
|
166
|
+
- spec/less/rulesets-1.0.less
|
167
|
+
- spec/less/scope-1.0.less
|
168
|
+
- spec/less/strings-1.0.less
|
169
|
+
- spec/less/variables-1.0.less
|
170
|
+
- spec/less/whitespace-1.0.less
|
46
171
|
- spec/spec.css
|
47
172
|
- spec/spec.less
|
48
173
|
- spec/spec_helper.rb
|
49
|
-
- spec/tree_spec.rb
|
50
174
|
has_rdoc: true
|
51
175
|
homepage: http://www.lesscss.org
|
52
176
|
post_install_message:
|
@@ -77,4 +201,3 @@ test_files:
|
|
77
201
|
- spec/command_spec.rb
|
78
202
|
- spec/engine_spec.rb
|
79
203
|
- spec/spec_helper.rb
|
80
|
-
- spec/tree_spec.rb
|
data/lib/less/tree.rb
DELETED
@@ -1,82 +0,0 @@
|
|
1
|
-
module Less
|
2
|
-
class Tree < Hash
|
3
|
-
def initialize init = {}
|
4
|
-
self.replace init
|
5
|
-
end
|
6
|
-
|
7
|
-
def var k
|
8
|
-
self[:variables] ? self[:variables][ k ] : nil
|
9
|
-
end
|
10
|
-
|
11
|
-
def vars?
|
12
|
-
self.include? :variables
|
13
|
-
end
|
14
|
-
|
15
|
-
def vars
|
16
|
-
self[:variables] ? self[:variables] : nil
|
17
|
-
end
|
18
|
-
|
19
|
-
#
|
20
|
-
# Find a variable or mixin from a specific path
|
21
|
-
#
|
22
|
-
def find what = :var, path = []
|
23
|
-
path.inject(self) do |branch, k|
|
24
|
-
if what == :var && k == path.last
|
25
|
-
branch[:variables][ k ]
|
26
|
-
else
|
27
|
-
branch = branch[ k ] or raise PathError, path.join(' > ')
|
28
|
-
end
|
29
|
-
end
|
30
|
-
end
|
31
|
-
|
32
|
-
#
|
33
|
-
# Find the nearest variable in the hierarchy
|
34
|
-
#
|
35
|
-
def nearest var, path
|
36
|
-
values = []
|
37
|
-
path.inject(self) do |branch, k|
|
38
|
-
values << branch.var( var )
|
39
|
-
branch[ k ]
|
40
|
-
end
|
41
|
-
values.compact.last
|
42
|
-
end
|
43
|
-
|
44
|
-
def traverse by = :leaf, path = [], &blk
|
45
|
-
#
|
46
|
-
# Traverse the whole tree, returning each leaf or branch (recursive)
|
47
|
-
#
|
48
|
-
###
|
49
|
-
# Aside from the key & value, we yield the full path of the leaf,
|
50
|
-
# aswell as the branch which contains it (self).
|
51
|
-
# Note that in :branch mode, we only return 'twigs', branches which contain leaves.
|
52
|
-
#
|
53
|
-
self.each do |key, value| # `self` is the current node, starting with the trunk
|
54
|
-
if value.is_a? Hash and key != :variables # If the node is a branch, we can go deeper
|
55
|
-
path << key # Add the current branch to the path
|
56
|
-
yield path, self[ key ] if by == :branch # The node is a branch, yield it to the block
|
57
|
-
self[ key ] = value.to_tree. # Make sure any change is saved to the main tree
|
58
|
-
traverse by, path, &blk # Recurse, with the current node becoming `self`
|
59
|
-
path.pop # We're returning from a branch, pop the last path element
|
60
|
-
elsif by == :leaf and key.is_a? String
|
61
|
-
yield key, value, path, self # The node is a leaf, yield it to the block
|
62
|
-
else
|
63
|
-
next
|
64
|
-
end
|
65
|
-
end
|
66
|
-
self
|
67
|
-
end
|
68
|
-
|
69
|
-
#
|
70
|
-
# Convert the tree to css, using full paths
|
71
|
-
#
|
72
|
-
def to_css chain, css = []
|
73
|
-
self.traverse :branch do |path, node|
|
74
|
-
properties = node.inject("") do |s, (k, v)|
|
75
|
-
v.is_a?(String) ? (s + "#{k}: #{CGI.unescape(v)}; ") : s # Add the property to the list
|
76
|
-
end
|
77
|
-
css << path * ( chain == :desc ? ' ' : ' > ') + " { " + properties + "}" unless properties.empty? # Add the rule-set to the CSS
|
78
|
-
end
|
79
|
-
css.join "\n"
|
80
|
-
end
|
81
|
-
end
|
82
|
-
end
|
data/spec/css/less-0.8.10.css
DELETED
@@ -1,30 +0,0 @@
|
|
1
|
-
ul li:first-child { border-top: none; }
|
2
|
-
.duplicate { color: blue; width: 11px; }
|
3
|
-
q:lang(no) { quotes: '~' '~'; }
|
4
|
-
.no-semi-column { color: orange; }
|
5
|
-
body { text-shadow: #333 -1px 1px 2px; border-color: #888; font-size: 10px; margin: -5px 0 5px 10px; background-color: #aaa; border: solid 1px #000; -moz-border-radius: 3px; font-family: 'Lucida Grande', 'Helvetica', Verdana, sans-serif; color: #ccc; }
|
6
|
-
td, tr, table { border-width: 4px; }
|
7
|
-
div > a, a span { color: grey; }
|
8
|
-
.space { color: purple; font-color: yellow; }
|
9
|
-
blockquote:before { color: red; }
|
10
|
-
.root a:hover, a:focus { color: orange; }
|
11
|
-
.root a { display: none; color: blue; }
|
12
|
-
.root .first .second .third { border-color: blue; font-size: 8px; background-color: blue; color: red; }
|
13
|
-
.root .first .second { }
|
14
|
-
.root .first { color: green; }
|
15
|
-
.root { }
|
16
|
-
.p:first-letter { color: red; }
|
17
|
-
.extra .dark-borders { border-color: #444444; }
|
18
|
-
.extra .light-borders { border-color: #888; }
|
19
|
-
.extra { }
|
20
|
-
a:link, a:hover { color: brown; }
|
21
|
-
ul li:first-child, ul li:last-child { background-color: #333; }
|
22
|
-
div { color: purple; }
|
23
|
-
.borders { }
|
24
|
-
.root:hover a { display: block; }
|
25
|
-
.operations div { width: 80px; }
|
26
|
-
.operations { colorb: #333333; font-size: 66; colorc: #777777; line-height: 7px; border-width: 16px; color: #eeeeee; font: 12px/16px; width: 110px; }
|
27
|
-
:focus { outline: 0; content: '*}#f~ '; }
|
28
|
-
.theme { background-color: #aaa; color: #ccc; }
|
29
|
-
blockquote:before, blockquote:after, q:before, q:after { content: ''; }
|
30
|
-
.transparent_box { opacity: 0.6; background-color: #FFF; filter: alpha(opacity=60); }
|
data/spec/css/less-0.8.11.css
DELETED
@@ -1,31 +0,0 @@
|
|
1
|
-
ul li:first-child { border-top: none; }
|
2
|
-
.duplicate { color: blue; width: 11px; }
|
3
|
-
q:lang(no) { quotes: '~' '~'; }
|
4
|
-
.no-semi-column { color: orange; }
|
5
|
-
body { text-shadow: #333 -1px 1px 2px; border-color: #888; font-size: 10px; margin: -5px 0 5px 10px; background-color: #aaa; border: solid 1px #000; -moz-border-radius: 3px; font-family: 'Lucida Grande', 'Helvetica', Verdana, sans-serif; color: #ccc; }
|
6
|
-
td, tr, table { border-width: 4px; }
|
7
|
-
div > a, a span { color: grey; }
|
8
|
-
.space { color: purple; font-color: yellow; }
|
9
|
-
blockquote:before { color: red; }
|
10
|
-
.root a:hover, a:focus { color: orange; }
|
11
|
-
.root a { display: none; color: blue; }
|
12
|
-
.root .first .second .third { border-color: blue; font-size: 8px; background-color: blue; color: red; }
|
13
|
-
.root .first .second { }
|
14
|
-
.root .first { color: green; }
|
15
|
-
.root { }
|
16
|
-
.p:first-letter { color: red; }
|
17
|
-
.extra .dark-borders { border-color: #444444; }
|
18
|
-
.extra .light-borders { border-color: #888; }
|
19
|
-
.extra { }
|
20
|
-
a:link, a:hover { color: brown; }
|
21
|
-
ul li:first-child, ul li:last-child { background-color: #333; }
|
22
|
-
div { color: purple; }
|
23
|
-
input[type='text'] { background-color: blue; }
|
24
|
-
.borders { }
|
25
|
-
.root:hover a { display: block; }
|
26
|
-
.operations div { width: 80px; }
|
27
|
-
.operations { colorb: #333333; font-size: 66; colorc: #777777; line-height: 7px; border-width: 16px; color: #eeeeee; font: 12px/16px; width: 110px; }
|
28
|
-
:focus { outline: 0; content: '*}#f~ '; }
|
29
|
-
.theme { background-color: #aaa; color: #ccc; }
|
30
|
-
blockquote:before, blockquote:after, q:before, q:after { content: ''; }
|
31
|
-
.transparent_box { opacity: 0.6; background-color: #FFF; filter: alpha(opacity=60); }
|
data/spec/css/less-0.8.12.css
DELETED
@@ -1,28 +0,0 @@
|
|
1
|
-
ul li:first-child { border-top: none; }
|
2
|
-
h5:focus { outline: 0; content: '*}#f~ '; }
|
3
|
-
.duplicate { color: blue; width: 11px; }
|
4
|
-
body, div > p a, h2 a > span:first-child { font-family: sans-serif; }
|
5
|
-
q:lang(no) { quotes: '~' '~'; }
|
6
|
-
.no-semi-column { color: orange; }
|
7
|
-
body { text-shadow: #333 -1px 1px 2px; font-size: 10px; margin: -5px 0 5px 10px; background-color: #aaa; border: solid 1px #000; font-family: 'Lucida Grande', 'Helvetica', Verdana, sans-serif; -moz-border-radius: 3px; color: #ccc; }
|
8
|
-
td, tr, table { border-width: 88px; }
|
9
|
-
div > a, a span { color: grey; }
|
10
|
-
.space { color: purple; font-color: yellow; }
|
11
|
-
blockquote:before { color: red; }
|
12
|
-
#operations { font-size: 66; colorb: #333333; colorc: #777777; color: #eeeeee; font: 12px/16px; width: 110px; }
|
13
|
-
#operations div { width: 80px; }
|
14
|
-
.root a:hover, a:focus { color: orange; }
|
15
|
-
.root a { display: none; color: blue; }
|
16
|
-
.root .first { color: green; }
|
17
|
-
.root .first .second .third { font-size: 8px; border-color: red; background-color: blue; color: red; }
|
18
|
-
.p:first-letter { color: red; }
|
19
|
-
.extra .dark-borders { border-color: #444444; }
|
20
|
-
.extra .light-borders { border-color: #888; }
|
21
|
-
a:link, a:hover { color: brown; }
|
22
|
-
ul li:first-child, ul li:last-child { background-color: #333; }
|
23
|
-
div { color: purple; }
|
24
|
-
input[type='text'] { background-color: blue; }
|
25
|
-
.root:hover a { display: block; }
|
26
|
-
.theme { background-color: #aaa; color: #ccc; }
|
27
|
-
blockquote:before, blockquote:after, q:before, q:after { content: ''; }
|
28
|
-
.transparent_box { opacity: 0.6; background-color: #FFF; filter: alpha(opacity=60); }
|
data/spec/css/less-0.8.5.css
DELETED
@@ -1,24 +0,0 @@
|
|
1
|
-
ul li:first-child { border-top: none; }
|
2
|
-
q:lang(no) { quotes: '~' '~'; }
|
3
|
-
.no-semi-column { color: orange; }
|
4
|
-
body { text-shadow: #333 -1px 1px 2px; border-color: #888; font-size: 10px; margin: -5px 0 5px 10px; background-color: #aaa; border: solid 1px #000; -moz-border-radius: 3px; font-family: 'Lucida Grande', 'Helvetica', Verdana, sans-serif; color: #ccc; }
|
5
|
-
td, tr, table { border-width: 4px; }
|
6
|
-
.space { color: purple; font-color: yellow; }
|
7
|
-
blockquote:before { color: red; }
|
8
|
-
.root > a:hover, a:focus { color: orange; }
|
9
|
-
.root > a { display: none; color: blue; }
|
10
|
-
.root > .first > .second > .third { border-color: blue; font-size: 8px; background-color: blue; color: red; }
|
11
|
-
.root > .first > .second { }
|
12
|
-
.root > .first { color: green; }
|
13
|
-
.root { }
|
14
|
-
.p:first-letter { color: red; }
|
15
|
-
.extra > .dark-borders { border-color: #444444; }
|
16
|
-
.extra > .light-borders { border-color: #888; }
|
17
|
-
.extra { }
|
18
|
-
ul li:first-child, ul li:last-child { background-color: #333; }
|
19
|
-
.borders { }
|
20
|
-
.root:hover a { display: block; }
|
21
|
-
.operations { colorb: #333333; font-size: 66; colorc: #777777; line-height: 7px; border-width: 16px; color: #eeeeee; }
|
22
|
-
:focus { outline: 0; content: '*}#f~ '; }
|
23
|
-
.theme { background-color: #aaa; color: #ccc; }
|
24
|
-
.transparent_box { opacity: 0.6; background-color: #FFF; filter: alpha(opacity=60); }
|
data/spec/css/less-0.8.6.css
DELETED
@@ -1,24 +0,0 @@
|
|
1
|
-
ul li:first-child { border-top: none; }
|
2
|
-
q:lang(no) { quotes: '~' '~'; }
|
3
|
-
.no-semi-column { color: orange; }
|
4
|
-
body { text-shadow: #333 -1px 1px 2px; border-color: #888; font-size: 10px; margin: -5px 0 5px 10px; background-color: #aaa; border: solid 1px #000; -moz-border-radius: 3px; font-family: 'Lucida Grande', 'Helvetica', Verdana, sans-serif; color: #ccc; }
|
5
|
-
td, tr, table { border-width: 4px; }
|
6
|
-
.space { color: purple; font-color: yellow; }
|
7
|
-
blockquote:before { color: red; }
|
8
|
-
.root a:hover, a:focus { color: orange; }
|
9
|
-
.root a { display: none; color: blue; }
|
10
|
-
.root .first .second .third { border-color: blue; font-size: 8px; background-color: blue; color: red; }
|
11
|
-
.root .first .second { }
|
12
|
-
.root .first { color: green; }
|
13
|
-
.root { }
|
14
|
-
.p:first-letter { color: red; }
|
15
|
-
.extra .dark-borders { border-color: #444444; }
|
16
|
-
.extra .light-borders { border-color: #888; }
|
17
|
-
.extra { }
|
18
|
-
ul li:first-child, ul li:last-child { background-color: #333; }
|
19
|
-
.borders { }
|
20
|
-
.root:hover a { display: block; }
|
21
|
-
.operations { colorb: #333333; font-size: 66; colorc: #777777; line-height: 7px; border-width: 16px; color: #eeeeee; }
|
22
|
-
:focus { outline: 0; content: '*}#f~ '; }
|
23
|
-
.theme { background-color: #aaa; color: #ccc; }
|
24
|
-
.transparent_box { opacity: 0.6; background-color: #FFF; filter: alpha(opacity=60); }
|
data/spec/css/less-0.8.7.css
DELETED
@@ -1,24 +0,0 @@
|
|
1
|
-
ul li:first-child { border-top: none; }
|
2
|
-
q:lang(no) { quotes: '~' '~'; }
|
3
|
-
.no-semi-column { color: orange; }
|
4
|
-
body { text-shadow: #333 -1px 1px 2px; border-color: #888; font-size: 10px; margin: -5px 0 5px 10px; background-color: #aaa; border: solid 1px #000; -moz-border-radius: 3px; font-family: 'Lucida Grande', 'Helvetica', Verdana, sans-serif; color: #ccc; }
|
5
|
-
td, tr, table { border-width: 4px; }
|
6
|
-
.space { color: purple; font-color: yellow; }
|
7
|
-
blockquote:before { color: red; }
|
8
|
-
.root a:hover, a:focus { color: orange; }
|
9
|
-
.root a { display: none; color: blue; }
|
10
|
-
.root .first .second .third { border-color: blue; font-size: 8px; background-color: blue; color: red; }
|
11
|
-
.root .first .second { }
|
12
|
-
.root .first { color: green; }
|
13
|
-
.root { }
|
14
|
-
.p:first-letter { color: red; }
|
15
|
-
.extra .dark-borders { border-color: #444444; }
|
16
|
-
.extra .light-borders { border-color: #888; }
|
17
|
-
.extra { }
|
18
|
-
ul li:first-child, ul li:last-child { background-color: #333; }
|
19
|
-
.borders { }
|
20
|
-
.root:hover a { display: block; }
|
21
|
-
.operations { colorb: #333333; font-size: 66; colorc: #777777; line-height: 7px; border-width: 16px; color: #eeeeee; }
|
22
|
-
:focus { outline: 0; content: '*}#f~ '; }
|
23
|
-
.theme { background-color: #aaa; color: #ccc; }
|
24
|
-
.transparent_box { opacity: 0.6; background-color: #FFF; filter: alpha(opacity=60); }
|