less 1.0.5 → 1.0.6
Sign up to get free protection for your applications and to get access to all the features.
- data/VERSION +1 -1
- data/less.gemspec +2 -2
- data/lib/less/engine/less.tt +1 -1
- data/lib/less/engine/nodes/literal.rb +6 -1
- data/lib/less/engine/parser.rb +31 -55
- data/spec/css/css-1.0.css +2 -0
- data/spec/less/css-1.0.less +5 -0
- metadata +2 -2
data/VERSION
CHANGED
@@ -1 +1 @@
|
|
1
|
-
1.0.
|
1
|
+
1.0.6
|
data/less.gemspec
CHANGED
@@ -2,11 +2,11 @@
|
|
2
2
|
|
3
3
|
Gem::Specification.new do |s|
|
4
4
|
s.name = %q{less}
|
5
|
-
s.version = "1.0.
|
5
|
+
s.version = "1.0.6"
|
6
6
|
|
7
7
|
s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
|
8
8
|
s.authors = ["cloudhead"]
|
9
|
-
s.date = %q{2009-07-
|
9
|
+
s.date = %q{2009-07-14}
|
10
10
|
s.default_executable = %q{lessc}
|
11
11
|
s.description = %q{LESS is leaner CSS}
|
12
12
|
s.email = %q{self@cloudhead.net}
|
data/lib/less/engine/less.tt
CHANGED
data/lib/less/engine/parser.rb
CHANGED
@@ -1788,12 +1788,6 @@ module Less
|
|
1788
1788
|
module ClassId0
|
1789
1789
|
end
|
1790
1790
|
|
1791
|
-
module ClassId1
|
1792
|
-
def id
|
1793
|
-
elements[1]
|
1794
|
-
end
|
1795
|
-
end
|
1796
|
-
|
1797
1791
|
def _nt_class_id
|
1798
1792
|
start_index = index
|
1799
1793
|
if node_cache[:class_id].has_key?(index)
|
@@ -1802,68 +1796,50 @@ module Less
|
|
1802
1796
|
return cached
|
1803
1797
|
end
|
1804
1798
|
|
1805
|
-
i0 = index
|
1806
|
-
|
1807
|
-
|
1808
|
-
|
1809
|
-
r2 = r3
|
1799
|
+
i0, s0 = index, []
|
1800
|
+
r2 = _nt_tag
|
1801
|
+
if r2
|
1802
|
+
r1 = r2
|
1810
1803
|
else
|
1811
|
-
|
1804
|
+
r1 = instantiate_node(SyntaxNode,input, index...index)
|
1812
1805
|
end
|
1813
|
-
|
1814
|
-
if
|
1815
|
-
|
1806
|
+
s0 << r1
|
1807
|
+
if r1
|
1808
|
+
s3, i3 = [], index
|
1816
1809
|
loop do
|
1810
|
+
i4 = index
|
1817
1811
|
r5 = _nt_class
|
1818
1812
|
if r5
|
1819
|
-
|
1813
|
+
r4 = r5
|
1814
|
+
else
|
1815
|
+
r6 = _nt_id
|
1816
|
+
if r6
|
1817
|
+
r4 = r6
|
1818
|
+
else
|
1819
|
+
@index = i4
|
1820
|
+
r4 = nil
|
1821
|
+
end
|
1822
|
+
end
|
1823
|
+
if r4
|
1824
|
+
s3 << r4
|
1820
1825
|
else
|
1821
1826
|
break
|
1822
1827
|
end
|
1823
1828
|
end
|
1824
|
-
if
|
1825
|
-
@index =
|
1826
|
-
|
1829
|
+
if s3.empty?
|
1830
|
+
@index = i3
|
1831
|
+
r3 = nil
|
1827
1832
|
else
|
1828
|
-
|
1833
|
+
r3 = instantiate_node(SyntaxNode,input, i3...index, s3)
|
1829
1834
|
end
|
1830
|
-
|
1831
|
-
end
|
1832
|
-
if s1.last
|
1833
|
-
r1 = instantiate_node(SyntaxNode,input, i1...index, s1)
|
1834
|
-
r1.extend(ClassId0)
|
1835
|
-
else
|
1836
|
-
@index = i1
|
1837
|
-
r1 = nil
|
1835
|
+
s0 << r3
|
1838
1836
|
end
|
1839
|
-
if
|
1840
|
-
r0 =
|
1837
|
+
if s0.last
|
1838
|
+
r0 = instantiate_node(SyntaxNode,input, i0...index, s0)
|
1839
|
+
r0.extend(ClassId0)
|
1841
1840
|
else
|
1842
|
-
|
1843
|
-
|
1844
|
-
if r8
|
1845
|
-
r7 = r8
|
1846
|
-
else
|
1847
|
-
r7 = instantiate_node(SyntaxNode,input, index...index)
|
1848
|
-
end
|
1849
|
-
s6 << r7
|
1850
|
-
if r7
|
1851
|
-
r9 = _nt_id
|
1852
|
-
s6 << r9
|
1853
|
-
end
|
1854
|
-
if s6.last
|
1855
|
-
r6 = instantiate_node(SyntaxNode,input, i6...index, s6)
|
1856
|
-
r6.extend(ClassId1)
|
1857
|
-
else
|
1858
|
-
@index = i6
|
1859
|
-
r6 = nil
|
1860
|
-
end
|
1861
|
-
if r6
|
1862
|
-
r0 = r6
|
1863
|
-
else
|
1864
|
-
@index = i0
|
1865
|
-
r0 = nil
|
1866
|
-
end
|
1841
|
+
@index = i0
|
1842
|
+
r0 = nil
|
1867
1843
|
end
|
1868
1844
|
|
1869
1845
|
node_cache[:class_id][start_index] = r0
|
data/spec/css/css-1.0.css
CHANGED
@@ -6,6 +6,7 @@ h2 > a > p { color: none; }
|
|
6
6
|
h3 { color: none; }
|
7
7
|
div.class { color: blue; }
|
8
8
|
div#id { color: green; }
|
9
|
+
.class#id { color: purple; }
|
9
10
|
.one.two.three { color: grey; }
|
10
11
|
@media print { font-size: 3em; }
|
11
12
|
@media screen { font-size: 10px; }
|
@@ -36,6 +37,7 @@ h2[title] { font-size: 100%; }
|
|
36
37
|
.misc {
|
37
38
|
-moz-border-radius: 2px;
|
38
39
|
width: 0.1em;
|
40
|
+
background-color: #009998;
|
39
41
|
color: red !important;
|
40
42
|
background-image: url(images/image.jpg);
|
41
43
|
}
|
data/spec/less/css-1.0.less
CHANGED
@@ -23,6 +23,10 @@ div#id {
|
|
23
23
|
color: green;
|
24
24
|
}
|
25
25
|
|
26
|
+
.class#id {
|
27
|
+
color: purple;
|
28
|
+
}
|
29
|
+
|
26
30
|
.one.two.three {
|
27
31
|
color: grey;
|
28
32
|
}
|
@@ -81,6 +85,7 @@ h2[title] {
|
|
81
85
|
.misc {
|
82
86
|
-moz-border-radius: 2px;
|
83
87
|
width: .1em;
|
88
|
+
background-color: #009998;
|
84
89
|
color: red !important;
|
85
90
|
background-image: url(images/image.jpg);
|
86
91
|
margin: ;
|
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: 1.0.
|
4
|
+
version: 1.0.6
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- cloudhead
|
@@ -9,7 +9,7 @@ autorequire:
|
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
11
|
|
12
|
-
date: 2009-07-
|
12
|
+
date: 2009-07-14 00:00:00 -04:00
|
13
13
|
default_executable: lessc
|
14
14
|
dependencies: []
|
15
15
|
|