diff options
-rw-r--r-- | scss/__init__.py | 1 | ||||
-rw-r--r-- | scss/functions/compass/helpers.py | 2 |
2 files changed, 3 insertions, 0 deletions
diff --git a/scss/__init__.py b/scss/__init__.py index fc5b440..266a792 100644 --- a/scss/__init__.py +++ b/scss/__init__.py @@ -1081,6 +1081,7 @@ class Scss(object): return if frm > through: + # DEVIATION: allow reversed '@for .. from .. through' (same as enumerate() and range()) frm, through = through, frm rev = reversed else: diff --git a/scss/functions/compass/helpers.py b/scss/functions/compass/helpers.py index 94f4884..7a953f0 100644 --- a/scss/functions/compass/helpers.py +++ b/scss/functions/compass/helpers.py @@ -288,6 +288,7 @@ def enumerate_(prefix, frm, through, separator='-'): except ValueError: through = frm if frm > through: + # DEVIATION: allow reversed enumerations (and ranges as range() uses enumerate, like '@for .. from .. through') frm, through = through, frm rev = reversed else: @@ -393,6 +394,7 @@ def nest(*arguments): # This isn't actually from Compass, but it's just a shortcut for enumerate(). +# DEVIATION: allow reversed ranges (range() uses enumerate() which allows reversed values, like '@for .. from .. through') @register('range', 1) @register('range', 2) def range_(frm, through=None): |