less 0.8.1 → 0.8.2
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/command.rb +2 -2
- data/lib/less/engine.rb +3 -3
- data/spec/spec.less +1 -0
- metadata +2 -2
data/VERSION
CHANGED
@@ -1 +1 @@
|
|
1
|
-
0.8.
|
1
|
+
0.8.2
|
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 = "0.8.
|
5
|
+
s.version = "0.8.2"
|
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-05-
|
9
|
+
s.date = %q{2009-05-25}
|
10
10
|
s.default_executable = %q{lessc}
|
11
11
|
s.description = %q{LESS is leaner CSS}
|
12
12
|
s.email = %q{alexis@cloudhead.net}
|
data/lib/less/command.rb
CHANGED
@@ -18,7 +18,7 @@ module Less
|
|
18
18
|
exit 0
|
19
19
|
end
|
20
20
|
end
|
21
|
-
|
21
|
+
|
22
22
|
def run!
|
23
23
|
if watch?
|
24
24
|
log "Watching for changes in #@source ...Ctrl-C to abort.\n"
|
@@ -32,7 +32,7 @@ module Less
|
|
32
32
|
log "Change detected... "
|
33
33
|
|
34
34
|
# Loop until error is fixed
|
35
|
-
|
35
|
+
until compile
|
36
36
|
log "Press [enter] to continue..."
|
37
37
|
watch { $stdin.gets }
|
38
38
|
end
|
data/lib/less/engine.rb
CHANGED
@@ -6,12 +6,12 @@ module Less
|
|
6
6
|
:variable => /@([-\w]+)/, # @milk-white
|
7
7
|
:property => /@[-\w]+|[-a-z]+/ # font-size
|
8
8
|
}
|
9
|
-
|
9
|
+
|
10
10
|
def initialize s
|
11
11
|
super
|
12
12
|
@tree = Tree.new self.hashify
|
13
13
|
end
|
14
|
-
|
14
|
+
|
15
15
|
def compile
|
16
16
|
#
|
17
17
|
# Parse the variables and mixins
|
@@ -61,7 +61,7 @@ module Less
|
|
61
61
|
#
|
62
62
|
# Units are: 1px, 1em, 1%, #111
|
63
63
|
@tree = @tree.traverse :leaf do |key, value, path, node|
|
64
|
-
if value
|
64
|
+
if value =~ /(\s?)[-+\/*](\1)/
|
65
65
|
if (unit = value.scan(/(%)|\d+(px)|\d+(em)|(#)/i).flatten.compact.uniq).size <= 1
|
66
66
|
unit = unit.join
|
67
67
|
value = if unit == '#'
|
data/spec/spec.less
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.8.
|
4
|
+
version: 0.8.2
|
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-05-
|
12
|
+
date: 2009-05-25 00:00:00 -04:00
|
13
13
|
default_executable: lessc
|
14
14
|
dependencies: []
|
15
15
|
|