From a5b270bb8885925ad0758489e2b80ee76e7bd302 Mon Sep 17 00:00:00 2001 From: "Eevee (Alex Munroe)" Date: Tue, 9 Dec 2014 15:13:01 -0800 Subject: Fix the fallback behavior of / and - on non-strings. The default is to treat these like a single unit, so "a" - "b" produces "a"-"b". The code was neglecting to use String.unquoted, so the resulting string would have even more quotes around it, which was... incorrect. This mostly had an effect on using CSS syntax like top/1px inside a variable, where division is evaluated. The result was quoted, which changed the semantics. --- scss/types.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/scss/types.py b/scss/types.py index 54345da..b844c92 100644 --- a/scss/types.py +++ b/scss/types.py @@ -87,10 +87,10 @@ class Value(object): def __sub__(self, other): # Default behavior is to treat the whole expression like one string - return String(self.render() + "-" + other.render()) + return String.unquoted(self.render() + "-" + other.render()) def __div__(self, other): - return String(self.render() + "/" + other.render()) + return String.unquoted(self.render() + "/" + other.render()) # Sass types have no notion of floor vs true division def __truediv__(self, other): -- cgit v1.2.1