less 0.8.8 → 1.2.21

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.
Files changed (88) hide show
  1. data/CHANGELOG +62 -0
  2. data/README.md +24 -6
  3. data/Rakefile +28 -37
  4. data/VERSION +1 -1
  5. data/bin/lessc +41 -11
  6. data/less.gemspec +85 -16
  7. data/lib/less/command.rb +47 -28
  8. data/lib/less/engine/grammar/common.tt +29 -0
  9. data/lib/less/engine/grammar/entity.tt +144 -0
  10. data/lib/less/engine/grammar/less.tt +341 -0
  11. data/lib/less/engine/nodes/element.rb +281 -0
  12. data/lib/less/engine/nodes/entity.rb +79 -0
  13. data/lib/less/engine/nodes/function.rb +93 -0
  14. data/lib/less/engine/nodes/literal.rb +171 -0
  15. data/lib/less/engine/nodes/property.rb +232 -0
  16. data/lib/less/engine/nodes/ruleset.rb +12 -0
  17. data/lib/less/engine/nodes/selector.rb +44 -0
  18. data/lib/less/engine/nodes.rb +9 -0
  19. data/lib/less/engine.rb +44 -140
  20. data/lib/less/ext.rb +60 -0
  21. data/lib/less.rb +25 -13
  22. data/spec/command_spec.rb +3 -7
  23. data/spec/css/accessors.css +18 -0
  24. data/spec/css/big.css +3768 -0
  25. data/spec/css/colors.css +14 -0
  26. data/spec/css/comments.css +9 -0
  27. data/spec/css/css-3.css +21 -0
  28. data/spec/css/css.css +50 -0
  29. data/spec/css/dash-prefix.css +12 -0
  30. data/spec/css/functions.css +6 -0
  31. data/spec/css/import-with-extra-paths.css +8 -0
  32. data/spec/css/import-with-partial-in-extra-path.css +6 -0
  33. data/spec/css/import.css +12 -0
  34. data/spec/css/lazy-eval.css +1 -0
  35. data/spec/css/mixins-args.css +32 -0
  36. data/spec/css/mixins.css +28 -0
  37. data/spec/css/operations.css +28 -0
  38. data/spec/css/parens.css +20 -0
  39. data/spec/css/rulesets.css +17 -0
  40. data/spec/css/scope.css +11 -0
  41. data/spec/css/selectors.css +13 -0
  42. data/spec/css/strings.css +12 -0
  43. data/spec/css/variables.css +8 -0
  44. data/spec/css/whitespace.css +7 -0
  45. data/spec/engine_spec.rb +107 -15
  46. data/spec/less/accessors.less +20 -0
  47. data/spec/less/big.less +1264 -0
  48. data/spec/less/colors.less +35 -0
  49. data/spec/less/comments.less +46 -0
  50. data/spec/less/css-3.less +52 -0
  51. data/spec/less/css.less +104 -0
  52. data/spec/less/dash-prefix.less +21 -0
  53. data/spec/less/exceptions/mixed-units-error.less +3 -0
  54. data/spec/less/exceptions/name-error-1.0.less +3 -0
  55. data/spec/less/exceptions/syntax-error-1.0.less +3 -0
  56. data/spec/less/extra_import_path/extra.less +1 -0
  57. data/spec/less/extra_import_path/import/import-test-a.css +1 -0
  58. data/spec/less/extra_import_path/import/import-test-a.less +4 -0
  59. data/spec/less/functions.less +6 -0
  60. data/spec/less/hidden.less +25 -0
  61. data/spec/less/import/import-test-a.less +2 -0
  62. data/spec/less/import/import-test-b.less +8 -0
  63. data/spec/less/import/import-test-c.less +7 -0
  64. data/spec/less/import/import-test-d.css +1 -0
  65. data/spec/less/import-with-extra-paths.less +4 -0
  66. data/spec/less/import.less +8 -0
  67. data/spec/less/lazy-eval.less +6 -0
  68. data/spec/less/literal-css.less +11 -0
  69. data/spec/less/mixins-args.less +59 -0
  70. data/spec/less/mixins.less +43 -0
  71. data/spec/less/operations.less +39 -0
  72. data/spec/less/parens.less +26 -0
  73. data/spec/less/rulesets.less +30 -0
  74. data/spec/less/scope.less +32 -0
  75. data/spec/less/selectors.less +24 -0
  76. data/spec/less/strings.less +14 -0
  77. data/spec/less/variables.less +29 -0
  78. data/spec/less/whitespace.less +34 -0
  79. data/spec/spec.css +50 -25
  80. data/spec/spec_helper.rb +4 -1
  81. metadata +96 -15
  82. data/lib/less/tree.rb +0 -82
  83. data/spec/css/less-0.8.5.css +0 -24
  84. data/spec/css/less-0.8.6.css +0 -24
  85. data/spec/css/less-0.8.7.css +0 -24
  86. data/spec/css/less-0.8.8.css +0 -25
  87. data/spec/spec.less +0 -128
  88. data/spec/tree_spec.rb +0 -5
@@ -0,0 +1,34 @@
1
+
2
+
3
+ .whitespace
4
+ { color: white; }
5
+
6
+ .whitespace
7
+ {
8
+ color: white;
9
+ }
10
+ .whitespace
11
+ { color: white; }
12
+
13
+ .whitespace{color:white;}
14
+ .whitespace { color : white ; }
15
+
16
+ .white,
17
+ .space,
18
+ .mania
19
+ { color: white; }
20
+
21
+ .no-semi-column { color: white }
22
+ .no-semi-column {
23
+ color: white;
24
+ white-space: pre
25
+ }
26
+ .no-semi-column {border: 2px solid white}
27
+ .newlines {
28
+ border: 2px
29
+ solid
30
+ black;
31
+ }
32
+ .empty {
33
+
34
+ }
data/spec/spec.css CHANGED
@@ -1,25 +1,50 @@
1
- .theme { color: #ccc; background-color: #aaa; }
2
- .extra > .dark-borders { border-color: #444444; }
3
- .extra > .light-borders { border-color: #888; }
4
- .extra { }
5
- .borders { }
6
- .root > a { color: blue; display: none; }
7
- .root > a:hover, a:focus { color: orange; }
8
- .root > .first > .second > .third { background-color: blue; font-size: 8px; color: red; border-color: blue; }
9
- .root > .first > .second { }
10
- .root > .first { color: green; }
11
- .root { }
12
- .root:hover a { display: block; }
13
- body { font-size: 10px; font-family: 'Lucida Grande', 'Helvetica', Verdana, sans-serif; margin: -5px 0 5px 10px; border: solid 1px #000; text-shadow: #333 -1px 1px 2px; -moz-border-radius: 3px; color: #ccc; background-color: #aaa; border-color: #888; }
14
- .operations > div { width: 80px; }
15
- .operations { width: 110px; border-width: 16px; font-size: 66; line-height: 7px; color: #eeeeee; colorb: #333333; colorc: #777777; }
16
- td, tr, table { border-width: 4px; }
17
- ul li:first-child { border-top: none; }
18
- ul li:first-child, ul li:last-child { background-color: #333; }
19
- .p:first-letter { color: red; }
20
- :focus { outline: 0; content: '*}#f~ '; }
21
- q:lang(no) { quotes: '~' '~'; }
22
- blockquote:before { color: red; }
23
- .transparent_box { background-color: #FFF; filter: alpha(opacity=60); opacity: 0.6; }
24
- .space { color: purple; font-color: yellow; }
25
- .no-semi-column { color: orange; }
1
+ div { color: black; }
2
+ div { width: 99%; }
3
+ * { min-width: 45em; }
4
+ h1 { color: none; }
5
+ h2 > a > p { color: none; }
6
+ h3 { color: none; }
7
+ div.class { color: blue; }
8
+ div#id { color: green; }
9
+ .class#id { color: purple; }
10
+ .one.two.three { color: grey; }
11
+ @media print { font-size: 3em; }
12
+ @media screen { font-size: 10px; }
13
+ @font-face {
14
+ font-family: 'Garamond Pro';
15
+ src: url("/fonts/garamond-pro.ttf");
16
+ }
17
+ a:hover { color: #999999; }
18
+ a:link { color: #999999; }
19
+ p { text-transform: none; }
20
+ p:first-child { text-transform: none; }
21
+ q:lang(no) { quotes: none; }
22
+ p + h1 { font-size: 2.2em; }
23
+ input[type="text"] { font-weight: normal; }
24
+ h2[title] { font-size: 100%; }
25
+ [disabled] { color: transparent; }
26
+ #shorthands {
27
+ border: 1px solid #000000;
28
+ font: 12px/16px Arial;
29
+ margin: 1px 0;
30
+ padding: 0 auto;
31
+ background: url("http://www.lesscss.org/spec.html") no-repeat 0 4px;
32
+ }
33
+ #more-shorthands {
34
+ margin: 0;
35
+ padding: 1px 0 2px 0;
36
+ font: normal small/20px 'Trebuchet MS', Verdana, sans-serif;
37
+ }
38
+ .misc {
39
+ -moz-border-radius: 2px;
40
+ display: -moz-inline-stack;
41
+ width: 0.1em;
42
+ background-color: #009998;
43
+ background-image: url(images/image.jpg);
44
+ background: -webkit-gradient(linear, left top, left bottom, from(red), to(blue));
45
+ }
46
+ #important {
47
+ color: red !important;
48
+ width: 100% !important;
49
+ height: 20px ! important;
50
+ }
data/spec/spec_helper.rb CHANGED
@@ -1,5 +1,8 @@
1
1
  require 'rubygems'
2
2
  require 'spec'
3
3
 
4
- require File.dirname(__FILE__) + '/../lib/less'
4
+ $:.unshift File.join(File.dirname(__FILE__), '..', 'lib')
5
+ $:.unshift File.dirname(__FILE__)
6
+
7
+ require 'less'
5
8
 
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.8.8
4
+ version: 1.2.21
5
5
  platform: ruby
6
6
  authors:
7
7
  - cloudhead
@@ -9,12 +9,31 @@ autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
11
 
12
- date: 2009-06-17 00:00:00 -04:00
12
+ date: 2010-01-13 00:00:00 -05:00
13
13
  default_executable: lessc
14
- dependencies: []
15
-
14
+ dependencies:
15
+ - !ruby/object:Gem::Dependency
16
+ name: treetop
17
+ type: :runtime
18
+ version_requirement:
19
+ version_requirements: !ruby/object:Gem::Requirement
20
+ requirements:
21
+ - - ">="
22
+ - !ruby/object:Gem::Version
23
+ version: 1.4.2
24
+ version:
25
+ - !ruby/object:Gem::Dependency
26
+ name: mutter
27
+ type: :runtime
28
+ version_requirement:
29
+ version_requirements: !ruby/object:Gem::Requirement
30
+ requirements:
31
+ - - ">="
32
+ - !ruby/object:Gem::Version
33
+ version: 0.4.2
34
+ version:
16
35
  description: LESS is leaner CSS
17
- email: alexis@cloudhead.net
36
+ email: self@cloudhead.net
18
37
  executables:
19
38
  - lessc
20
39
  extensions: []
@@ -24,6 +43,7 @@ extra_rdoc_files:
24
43
  - README.md
25
44
  files:
26
45
  - .gitignore
46
+ - CHANGELOG
27
47
  - LICENSE
28
48
  - README.md
29
49
  - Rakefile
@@ -33,19 +53,81 @@ files:
33
53
  - lib/less.rb
34
54
  - lib/less/command.rb
35
55
  - lib/less/engine.rb
36
- - lib/less/tree.rb
56
+ - lib/less/engine/grammar/common.tt
57
+ - lib/less/engine/grammar/entity.tt
58
+ - lib/less/engine/grammar/less.tt
59
+ - lib/less/engine/nodes.rb
60
+ - lib/less/engine/nodes/element.rb
61
+ - lib/less/engine/nodes/entity.rb
62
+ - lib/less/engine/nodes/function.rb
63
+ - lib/less/engine/nodes/literal.rb
64
+ - lib/less/engine/nodes/property.rb
65
+ - lib/less/engine/nodes/ruleset.rb
66
+ - lib/less/engine/nodes/selector.rb
67
+ - lib/less/ext.rb
37
68
  - spec/command_spec.rb
38
- - spec/css/less-0.8.5.css
39
- - spec/css/less-0.8.6.css
40
- - spec/css/less-0.8.7.css
41
- - spec/css/less-0.8.8.css
69
+ - spec/css/accessors.css
70
+ - spec/css/big.css
71
+ - spec/css/colors.css
72
+ - spec/css/comments.css
73
+ - spec/css/css-3.css
74
+ - spec/css/css.css
75
+ - spec/css/dash-prefix.css
76
+ - spec/css/functions.css
77
+ - spec/css/import-with-extra-paths.css
78
+ - spec/css/import-with-partial-in-extra-path.css
79
+ - spec/css/import.css
80
+ - spec/css/lazy-eval.css
81
+ - spec/css/mixins-args.css
82
+ - spec/css/mixins.css
83
+ - spec/css/operations.css
84
+ - spec/css/parens.css
85
+ - spec/css/rulesets.css
86
+ - spec/css/scope.css
87
+ - spec/css/selectors.css
88
+ - spec/css/strings.css
89
+ - spec/css/variables.css
90
+ - spec/css/whitespace.css
42
91
  - spec/engine_spec.rb
92
+ - spec/less/accessors.less
93
+ - spec/less/big.less
94
+ - spec/less/colors.less
95
+ - spec/less/comments.less
96
+ - spec/less/css-3.less
97
+ - spec/less/css.less
98
+ - spec/less/dash-prefix.less
99
+ - spec/less/exceptions/mixed-units-error.less
100
+ - spec/less/exceptions/name-error-1.0.less
101
+ - spec/less/exceptions/syntax-error-1.0.less
102
+ - spec/less/extra_import_path/extra.less
103
+ - spec/less/extra_import_path/import/import-test-a.css
104
+ - spec/less/extra_import_path/import/import-test-a.less
105
+ - spec/less/functions.less
106
+ - spec/less/hidden.less
107
+ - spec/less/import-with-extra-paths.less
108
+ - spec/less/import.less
109
+ - spec/less/import/import-test-a.less
110
+ - spec/less/import/import-test-b.less
111
+ - spec/less/import/import-test-c.less
112
+ - spec/less/import/import-test-d.css
113
+ - spec/less/lazy-eval.less
114
+ - spec/less/literal-css.less
115
+ - spec/less/mixins-args.less
116
+ - spec/less/mixins.less
117
+ - spec/less/operations.less
118
+ - spec/less/parens.less
119
+ - spec/less/rulesets.less
120
+ - spec/less/scope.less
121
+ - spec/less/selectors.less
122
+ - spec/less/strings.less
123
+ - spec/less/variables.less
124
+ - spec/less/whitespace.less
43
125
  - spec/spec.css
44
- - spec/spec.less
45
126
  - spec/spec_helper.rb
46
- - spec/tree_spec.rb
47
127
  has_rdoc: true
48
128
  homepage: http://www.lesscss.org
129
+ licenses: []
130
+
49
131
  post_install_message:
50
132
  rdoc_options:
51
133
  - --charset=UTF-8
@@ -66,12 +148,11 @@ required_rubygems_version: !ruby/object:Gem::Requirement
66
148
  requirements: []
67
149
 
68
150
  rubyforge_project: less
69
- rubygems_version: 1.3.1
151
+ rubygems_version: 1.3.5
70
152
  signing_key:
71
- specification_version: 2
153
+ specification_version: 3
72
154
  summary: LESS compiler
73
155
  test_files:
74
156
  - spec/command_spec.rb
75
157
  - spec/engine_spec.rb
76
158
  - spec/spec_helper.rb
77
- - 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
- self[ key ] = value.to_tree. # Make sure any change is saved to the main tree
57
- traverse by, path, &blk # Recurse, with the current node becoming `self`
58
- yield path, self[ key ] if by == :branch # The node is a branch, yield it to the block
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 + "}" # Add the rule-set to the CSS
78
- end
79
- css.join "\n"
80
- end
81
- end
82
- end
@@ -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); }
@@ -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); }
@@ -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); }
@@ -1,25 +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 div { width: 80px; }
22
- .operations { colorb: #333333; font-size: 66; colorc: #777777; line-height: 7px; border-width: 16px; color: #eeeeee; width: 110px; }
23
- :focus { outline: 0; content: '*}#f~ '; }
24
- .theme { background-color: #aaa; color: #ccc; }
25
- .transparent_box { opacity: 0.6; background-color: #FFF; filter: alpha(opacity=60); }
data/spec/spec.less DELETED
@@ -1,128 +0,0 @@
1
- // ------------------------------------------------
2
- // LESS Spec
3
- // www.lesscss.org
4
- // ------------------------------------------------
5
-
6
- // Global vars
7
- @main-color: #444;
8
- @dark-color: #111;
9
- @between-color: @main-color - @dark-color;
10
-
11
- // Mixins
12
- .theme {
13
- color: #ccc;
14
- background-color: #aaa;
15
- }
16
- .extra {
17
- @main: #888;
18
- .dark-borders {
19
- border-color: .extra > @main / 2;
20
- }
21
- .light-borders {
22
- border-color: .extra > @main;
23
- }
24
- }
25
-
26
- // Namespaces
27
- .borders {
28
- @thick: 4px;
29
- @thin: 2px;
30
- }
31
-
32
- // Hierarchy
33
- .root {
34
- a {
35
- color: blue;
36
- display: none;
37
- }
38
- a:hover, a:focus {
39
- color: orange;
40
- }
41
- .first {
42
- @size: 8px;
43
- @dark-color: green;
44
- @main-color: red;
45
- color: @dark-color; // 'green'
46
- .second {
47
- @color: blue;
48
- .third {
49
- background-color: @color; // blue
50
- font-size: @size; // 8px
51
- color: @main-color; // red
52
- border-color: .root > .first > .second > @color; // 'blue'
53
- }
54
- }
55
- }
56
- }
57
- .root:hover a {
58
- display: block;
59
- }
60
-
61
- // Standard CSS properties and shorthand
62
- body {
63
- font-size: 10px;
64
- font-family: "Lucida Grande", 'Helvetica', Verdana, sans-serif;
65
- margin: -5px 0 5px 10px;
66
- border: solid 1px #000;
67
- text-shadow: #333 -1px 1px 2px;
68
- -moz-border-radius: 3px; /* CSS3 for older Firefox */
69
- .theme;
70
- .extra > .light-borders;
71
- }
72
-
73
- // Operations
74
- .operations {
75
- @ten: 10;
76
- @dark: #111;
77
- @box: 100px;
78
- @border_width: 10px;
79
- width: @box + @border_width; // 110px
80
- div { width: @box - 2 * @border_width; } // 80px
81
- border-width: .borders > @thick * 5 - 4px; // 16px
82
- font-size: 10 - 4 + 6 * @ten; // 66
83
- line-height: @ten - .operations > @ten + .root > .first > @size - 1; // 7px
84
- color: #fff - #111; // #eeeeee
85
- colorb: #111 + #222222; // #333333
86
- colorc: @dark + #222 * 3; // #777777
87
- }
88
-
89
- td, tr, table {
90
- border-width: .borders > @thick;
91
- }
92
-
93
- // More complex CSS selectors
94
- ul li:first-child {
95
- border-top: none;
96
- }
97
- ul li:first-child, ul li:last-child {
98
- background-color: #333;
99
- }
100
- .p:first-letter {
101
- color: red;
102
- }
103
- :focus {
104
- outline: 0;
105
- content: "*}#f~ ";
106
- }
107
- q:lang(no) {
108
- quotes: "~" "~";
109
- }
110
- blockquote:before {
111
- color: red;
112
- }
113
-
114
- /*input[type="text"] {
115
- background-color: blue;
116
- }*/
117
- .transparent_box {
118
- background-color:#FFF;
119
- filter:alpha(opacity=60); /* for IE */
120
- opacity:0.6; /* CSS3 standard */
121
- }
122
-
123
- // Spacing
124
- .space
125
- { color: purple ;font-color:yellow; }
126
-
127
- // No semi-column
128
- .no-semi-column { color: orange }
data/spec/tree_spec.rb DELETED
@@ -1,5 +0,0 @@
1
- require File.dirname(__FILE__) + '/spec_helper'
2
-
3
- describe Less::Tree do
4
- it "should get some specs..."
5
- end