less 0.8.8 → 0.8.9

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.
data/VERSION CHANGED
@@ -1 +1 @@
1
- 0.8.8
1
+ 0.8.9
@@ -2,7 +2,7 @@
2
2
 
3
3
  Gem::Specification.new do |s|
4
4
  s.name = %q{less}
5
- s.version = "0.8.8"
5
+ s.version = "0.8.9"
6
6
 
7
7
  s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
8
8
  s.authors = ["cloudhead"]
@@ -1,7 +1,7 @@
1
1
  module Less
2
2
  class Engine < String
3
3
  # Compound properties, such as `border: 1px solid black`
4
- COMPOUND = ['font', 'background', 'border']
4
+ COMPOUND = {'font' => true, 'background' => false, 'border' => false }
5
5
  REGEX = {
6
6
  :path => /([#.][->#.\w ]+)?( ?> ?)?/, # #header > .title
7
7
  :selector => /[-\w #.,>*:\(\)]/, # .cow .milk > a
@@ -69,7 +69,13 @@ 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
- raise CompoundOperationError, "#{key}: #{value}" if COMPOUND.include? key # Disallow operations on compound declarations
72
+ # Disallow operations certain compound declarations
73
+ if COMPOUND[key]
74
+ next value
75
+ else
76
+ raise CompoundOperationError, "#{key}: #{value}"
77
+ end if COMPOUND.include? key
78
+
73
79
  if (unit = operation.scan(/#{REGEX[:numeric]}|(#)/i).flatten.compact.uniq).size <= 1
74
80
  unit = unit.join
75
81
  operation = if unit == '#'
@@ -19,7 +19,7 @@ ul li:first-child, ul li:last-child { background-color: #333; }
19
19
  .borders { }
20
20
  .root:hover a { display: block; }
21
21
  .operations div { width: 80px; }
22
- .operations { colorb: #333333; font-size: 66; colorc: #777777; line-height: 7px; border-width: 16px; color: #eeeeee; width: 110px; }
22
+ .operations { colorb: #333333; font-size: 66; colorc: #777777; line-height: 7px; border-width: 16px; color: #eeeeee; font: 12px/16px; width: 110px; }
23
23
  :focus { outline: 0; content: '*}#f~ '; }
24
24
  .theme { background-color: #aaa; color: #ccc; }
25
25
  .transparent_box { opacity: 0.6; background-color: #FFF; filter: alpha(opacity=60); }
@@ -12,7 +12,7 @@
12
12
  .root:hover a { display: block; }
13
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
14
  .operations > div { width: 80px; }
15
- .operations { width: 110px; border-width: 16px; font-size: 66; line-height: 7px; color: #eeeeee; colorb: #333333; colorc: #777777; }
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
17
  ul li:first-child { border-top: none; }
18
18
  ul li:first-child, ul li:last-child { background-color: #333; }
@@ -76,6 +76,7 @@ body {
76
76
  @dark: #111;
77
77
  @box: 100px;
78
78
  @border_width: 10px;
79
+ font: 12px/16px; // 12px/16px
79
80
  width: @box + @border_width; // 110px
80
81
  div { width: @box - 2 * @border_width; } // 80px
81
82
  border-width: .borders > @thick * 5 - 4px; // 16px
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: 0.8.9
5
5
  platform: ruby
6
6
  authors:
7
7
  - cloudhead