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 CHANGED
@@ -1 +1 @@
1
- 1.0.5
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"
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-13}
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}
@@ -169,7 +169,7 @@ grammar Less
169
169
  end
170
170
 
171
171
  rule class_id
172
- tag? class+ / tag? id
172
+ tag? (class / id)+
173
173
  end
174
174
 
175
175
  #
@@ -32,7 +32,12 @@ module Less
32
32
  end
33
33
 
34
34
  def to_css
35
- unit + (self <= 0 ? '0' * 6 : self.to_i.to_s(16))
35
+ unit + if self <= 0
36
+ '0' * 6
37
+ else
38
+ hex = self.to_i.to_s(16)
39
+ '0' * (6 - hex.length) + hex
40
+ end
36
41
  end
37
42
 
38
43
  def to_ruby
@@ -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
- i1, s1 = index, []
1807
- r3 = _nt_tag
1808
- if r3
1809
- r2 = r3
1799
+ i0, s0 = index, []
1800
+ r2 = _nt_tag
1801
+ if r2
1802
+ r1 = r2
1810
1803
  else
1811
- r2 = instantiate_node(SyntaxNode,input, index...index)
1804
+ r1 = instantiate_node(SyntaxNode,input, index...index)
1812
1805
  end
1813
- s1 << r2
1814
- if r2
1815
- s4, i4 = [], index
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
- s4 << r5
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 s4.empty?
1825
- @index = i4
1826
- r4 = nil
1829
+ if s3.empty?
1830
+ @index = i3
1831
+ r3 = nil
1827
1832
  else
1828
- r4 = instantiate_node(SyntaxNode,input, i4...index, s4)
1833
+ r3 = instantiate_node(SyntaxNode,input, i3...index, s3)
1829
1834
  end
1830
- s1 << r4
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 r1
1840
- r0 = r1
1837
+ if s0.last
1838
+ r0 = instantiate_node(SyntaxNode,input, i0...index, s0)
1839
+ r0.extend(ClassId0)
1841
1840
  else
1842
- i6, s6 = index, []
1843
- r8 = _nt_tag
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
  }
@@ -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.5
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-13 00:00:00 -04:00
12
+ date: 2009-07-14 00:00:00 -04:00
13
13
  default_executable: lessc
14
14
  dependencies: []
15
15