less 0.8.9 → 0.8.10

Sign up to get free protection for your applications and to get access to all the features.
data/VERSION CHANGED
@@ -1 +1 @@
1
- 0.8.9
1
+ 0.8.10
@@ -2,11 +2,11 @@
2
2
 
3
3
  Gem::Specification.new do |s|
4
4
  s.name = %q{less}
5
- s.version = "0.8.9"
5
+ s.version = "0.8.10"
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-06-17}
9
+ s.date = %q{2009-06-18}
10
10
  s.default_executable = %q{lessc}
11
11
  s.description = %q{LESS is leaner CSS}
12
12
  s.email = %q{alexis@cloudhead.net}
@@ -32,6 +32,7 @@ Gem::Specification.new do |s|
32
32
  "spec/css/less-0.8.6.css",
33
33
  "spec/css/less-0.8.7.css",
34
34
  "spec/css/less-0.8.8.css",
35
+ "spec/css/less-0.9.0.css",
35
36
  "spec/engine_spec.rb",
36
37
  "spec/spec.css",
37
38
  "spec/spec.less",
@@ -4,7 +4,7 @@ module Less
4
4
  COMPOUND = {'font' => true, 'background' => false, 'border' => false }
5
5
  REGEX = {
6
6
  :path => /([#.][->#.\w ]+)?( ?> ?)?/, # #header > .title
7
- :selector => /[-\w #.,>*:\(\)]/, # .cow .milk > a
7
+ :selector => /[-\w #.,*>:\(\)]/, # .cow .milk > a
8
8
  :variable => /@([-\w]+)/, # @milk-white
9
9
  :property => /@[-\w]+|[-a-z]+/, # font-size
10
10
  :color => /#([a-zA-Z0-9]{3,6})\b/, # #f0f0f0
@@ -39,7 +39,7 @@ module Less
39
39
  end
40
40
  node.delete key if matched # Delete the property if it's LESS-specific
41
41
  end
42
-
42
+
43
43
  #
44
44
  # Evaluate mixins
45
45
  #
@@ -69,8 +69,8 @@ module Less
69
69
  # Units are: 1px, 1em, 1%, #111
70
70
  @tree = @tree.traverse :leaf do |key, value, path, node|
71
71
  node[ key ] = value.gsub /(#{REGEX[:operand]}(\s?)[-+\/*](\4))+(#{REGEX[:operand]})/ do |operation|
72
- # Disallow operations certain compound declarations
73
- if COMPOUND[key]
72
+ # Disallow operations on certain compound declarations
73
+ if COMPOUND[ key ]
74
74
  next value
75
75
  else
76
76
  raise CompoundOperationError, "#{key}: #{value}"
@@ -138,17 +138,17 @@ module Less
138
138
  # less: color: black;
139
139
  # hashify: "color" => "black"
140
140
  #
141
- hash = self.gsub(/\t+/, ' '). # Tabs
142
- gsub(/\r\n/, "\n"). # m$
143
- gsub(/\/\/.*/, ''). # Comments //
141
+ hash = self.gsub(/\r\n/, "\n"). # m$
142
+ gsub(/\/\/.*\n/, ''). # Comments //
144
143
  gsub(/\/\*.*?\*\//m, ''). # Comments /*
145
- gsub(/"/, "'"). # " => '
146
- gsub(/("|')(.+?)(\1)/) { $1 + CGI.escape( $2 ) + $1 }. # Escape string values
147
- gsub(/(#{REGEX[:property]}):\s*(.+?)\s*(;|(?=\}))/,'"\1"=>"\2",'). # Rules
144
+ gsub(/\s+/, ' '). # Replace \t\n
145
+ gsub(/"/, "'"). # " to '
146
+ gsub(/("|')(.*?)(\1)/) { $1 + CGI.escape( $2 ) + $1 }. # Escape string values
147
+ gsub(/(#{REGEX[:property]}): *([^\{\}]+?) *(;|(?=\}))/,'"\1"=>"\2",'). # Rules
148
148
  gsub(/\}/, "},"). # Closing }
149
- gsub(/( *)(#{REGEX[:selector]}+?)[ \n]*(?=\{)/m, '\1"\2"=>'). # Selectors
149
+ gsub(/([, ]*)(#{REGEX[:selector]}+?)[ \n]*(?=\{)/, '\1"\2"=>'). # Selectors
150
150
  gsub(/([.#][->\w .#]+);/, '"\\1" => :mixin,') # Mixins
151
- eval "{" + hash + "}" # Return {hash}
151
+ eval "{#{ hash }}" # Return {hash}
152
152
  end
153
153
  end
154
154
  end
@@ -0,0 +1,30 @@
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); }
@@ -14,12 +14,16 @@ body { font-size: 10px; font-family: 'Lucida Grande', 'Helvetica', Verdana, sans
14
14
  .operations > div { width: 80px; }
15
15
  .operations { font: 12px/16px; width: 110px; border-width: 16px; font-size: 66; line-height: 7px; color: #eeeeee; colorb: #333333; colorc: #777777; }
16
16
  td, tr, table { border-width: 4px; }
17
+ blockquote:before, blockquote:after, q:before, q:after { content: ''; }
18
+ a:link, a:hover { color: brown; }
17
19
  ul li:first-child { border-top: none; }
18
20
  ul li:first-child, ul li:last-child { background-color: #333; }
19
21
  .p:first-letter { color: red; }
20
22
  :focus { outline: 0; content: '*}#f~ '; }
21
23
  q:lang(no) { quotes: '~' '~'; }
22
24
  blockquote:before { color: red; }
25
+ div { color: purple; }
26
+ .duplicate { width: 11px; color: blue; }
23
27
  .transparent_box { background-color: #FFF; filter: alpha(opacity=60); opacity: 0.6; }
24
28
  .space { color: purple; font-color: yellow; }
25
29
  .no-semi-column { color: orange; }
@@ -92,6 +92,14 @@ td, tr, table {
92
92
  }
93
93
 
94
94
  // More complex CSS selectors
95
+ blockquote:before, blockquote:after, q:before, q:after { content: ""; }
96
+ a:link,
97
+ a:hover {
98
+ color:brown;
99
+ }
100
+ div > a, a span {
101
+ color: grey;
102
+ }
95
103
  ul li:first-child {
96
104
  border-top: none;
97
105
  }
@@ -112,6 +120,22 @@ blockquote:before {
112
120
  color: red;
113
121
  }
114
122
 
123
+ // Duplicates
124
+ div {
125
+ width: 9px;
126
+ }
127
+ div {
128
+ color: purple;
129
+ }
130
+ .duplicate {
131
+ width: 9px;
132
+ height: 11px;
133
+ }
134
+ .duplicate {
135
+ width: 11px;
136
+ color: blue;
137
+ }
138
+
115
139
  /*input[type="text"] {
116
140
  background-color: blue;
117
141
  }*/
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.9
4
+ version: 0.8.10
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-06-17 00:00:00 -04:00
12
+ date: 2009-06-18 00:00:00 -04:00
13
13
  default_executable: lessc
14
14
  dependencies: []
15
15
 
@@ -39,6 +39,7 @@ files:
39
39
  - spec/css/less-0.8.6.css
40
40
  - spec/css/less-0.8.7.css
41
41
  - spec/css/less-0.8.8.css
42
+ - spec/css/less-0.9.0.css
42
43
  - spec/engine_spec.rb
43
44
  - spec/spec.css
44
45
  - spec/spec.less