summaryrefslogtreecommitdiff
path: root/scss/functions/compass/helpers.py
diff options
context:
space:
mode:
Diffstat (limited to 'scss/functions/compass/helpers.py')
-rw-r--r--scss/functions/compass/helpers.py9
1 files changed, 6 insertions, 3 deletions
diff --git a/scss/functions/compass/helpers.py b/scss/functions/compass/helpers.py
index 9de1d13..bde12ef 100644
--- a/scss/functions/compass/helpers.py
+++ b/scss/functions/compass/helpers.py
@@ -14,6 +14,8 @@ import mimetypes
import os.path
import time
+import six
+
from scss import config
from scss.functions.library import FunctionLibrary
from scss.types import BooleanValue, List, Null, NumberValue, QuotedStringValue, StringValue
@@ -376,10 +378,11 @@ def _position(opposite, positions):
ret = []
for pos in positions:
- if isinstance(pos, StringValue):
- if pos.value in OPPOSITE_POSITIONS:
+ if isinstance(pos, (StringValue, six.string_types)):
+ _pos = getattr(pos, 'value', pos)
+ if _pos in OPPOSITE_POSITIONS:
if opposite:
- opp = OPPOSITE_POSITIONS[pos.value]
+ opp = OPPOSITE_POSITIONS[pos]
ret.append(StringValue(opp, quotes=None))
else:
ret.append(pos)