@@ -256,10 +256,10 @@ def output_less(directory, results)
256
256
results . each do |result |
257
257
f . print "#{ class_name ( result [ :name ] ) } \{ \n "
258
258
f . print " background-position: #{ -result [ :x ] } px #{ -result [ :y ] } px;\n "
259
- # if (result[:width]!=@default_width || result[:height]!=@default_height)
260
- f . print " width: #{ result [ :width ] } px;\n " # if result[:width]
261
- f . print " height: #{ result [ :height ] } px;\n " # if result[:height]
262
- # end
259
+ if ( result [ :width ] !=@default_width || result [ :height ] !=@default_height )
260
+ f . print " width: #{ result [ :width ] } px;\n " if result [ :width ]
261
+ f . print " height: #{ result [ :height ] } px;\n " if result [ :height ]
262
+ end
263
263
f . print " \} \n "
264
264
end
265
265
end
@@ -340,14 +340,15 @@ def image_properties(image, directory)
340
340
# if the hover class has the same width and height property with not hover class,
341
341
# then the hover class does not need width and height
342
342
def need_wh? ( image , directory )
343
- name = get_image_name ( image , directory )
344
- if hover? ( name ) or active? ( name )
345
- not_file = image . filename . sub ( /[_-](hover|active)\. / , '.' ) . sub ( /[_-](hover|active)\/ / , '/' )
346
- if File . exist? ( not_file )
347
- not_image = get_image ( not_file )
348
- return false if image . columns == not_image . columns and image . rows == not_image . rows
349
- end
350
- end
343
+ #allways return true
344
+ #name = get_image_name(image, directory)
345
+ #if hover?(name) or active?(name)
346
+ #not_file = image.filename.sub(/[_-](hover|active)\./, '.').sub(/[_-](hover|active)\//, '/')
347
+ #if File.exist?(not_file)
348
+ #not_image = get_image(not_file)
349
+ #return false if image.columns == not_image.columns and image.rows == not_image.rows
350
+ #end
351
+ #end
351
352
return true
352
353
end
353
354
0 commit comments