[Compass Core] The enumerate function now accepts an optional argument to specify the separator. Closes GH-46.
This commit is contained in:
parent
65d6d69497
commit
e0732c8700
@ -1,6 +1,12 @@
|
|||||||
COMPASS CHANGELOG
|
COMPASS CHANGELOG
|
||||||
=================
|
=================
|
||||||
|
|
||||||
|
0.8.17 (September 24, 2009)
|
||||||
|
---------------------------
|
||||||
|
|
||||||
|
* The enumerate function now accepts an optional fourth parameter that specifies the separator to be used.
|
||||||
|
Enables fixing a bug in the Compass 960 Plugin.
|
||||||
|
|
||||||
0.8.16 (September 12, 2009)
|
0.8.16 (September 12, 2009)
|
||||||
---------------------------
|
---------------------------
|
||||||
|
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
module Compass::SassExtensions::Functions::Enumerate
|
module Compass::SassExtensions::Functions::Enumerate
|
||||||
def enumerate(prefix, from, through)
|
def enumerate(prefix, from, through, separator = "-")
|
||||||
selectors = (from.value..through.value).map{|i| "#{prefix.value}-#{i}"}.join(", ")
|
selectors = (from.value..through.value).map{|i| "#{prefix.value}#{separator}#{i}"}.join(", ")
|
||||||
Sass::Script::String.new(selectors)
|
Sass::Script::String.new(selectors)
|
||||||
end
|
end
|
||||||
end
|
end
|
Loading…
Reference in New Issue
Block a user