Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 3 additions & 1 deletion lib/sprite_factory/style.rb
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,9 @@ def self.generate(style_name, selector, url, images)
attr = [
"width: #{image[:cssw]}px",
"height: #{image[:cssh]}px",
"background: #{url} #{-image[:cssx]}px #{-image[:cssy]}px no-repeat"
"background-image: #{url}",
"background-position: #{-image[:cssx]}px #{-image[:cssy]}px",
"background-repeat: no-repeat"
]
image[:selector] = selector # make selector available for (optional) custom rule generators
image[:style] = send("#{style_name}_style", attr) # make pure style available for (optional) custom rule generators (see usage of yield inside Runner#style)
Expand Down