summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGerman M. Bravo <german.mb@deipi.com>2013-10-08 06:49:16 -0700
committerGerman M. Bravo <german.mb@deipi.com>2013-10-08 06:49:16 -0700
commit4ad3a63f52c147ca63573a486312cbef0cd1a72f (patch)
treefd93895d616920ac34d187485b0837fbeb050059
parent303cfe384aa5a1b1da26b62becaafff211efbb32 (diff)
downloadpyscss-4ad3a63f52c147ca63573a486312cbef0cd1a72f.tar.gz
Added DEVIATION comments
-rw-r--r--scss/__init__.py1
-rw-r--r--scss/functions/compass/helpers.py2
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):