lib/texture_packer.rb in texture_packer-1.6.2 vs lib/texture_packer.rb in texture_packer-1.6.3

- old
+ new

@@ -40,12 +40,13 @@ break if selector == nil next if selector == 'sprite' prefixs = string_prefix.scan(/\[\w+\]|\:\w+/) # [m]:disabled => ['[m]', ':disabled'] prefixs.map! do |prefix| case prefix - when '[active]' then ':active' # 因為 TexturePacker 會把 xxx-active-hover 轉成 xxx-active:hover 而不是 xxx:active:hover - when '[hover]' then ':hover' - else prefix + when '[active]' then ':active' # 因為 TexturePacker 會把 xxx-active-hover 轉成 xxx-active:hover 而不是 xxx:active:hover + when '[hover]' then ':hover' + when '[disabled]' then ':disabled' + else prefix end end # p [selector, prefix, css] (data[selector] ||= {})[prefixs] = "#{css};" end