summaryrefslogtreecommitdiff
path: root/scss/compiler.py
diff options
context:
space:
mode:
authorEevee (Alex Munroe) <eevee.git@veekun.com>2014-08-27 18:49:25 -0700
committerEevee (Alex Munroe) <eevee.git@veekun.com>2014-08-27 18:49:25 -0700
commit8b32fe7369ea287681292c0036b5458843b299c8 (patch)
tree9aa4b0e9c3ad9ac31425de48c34516723ee40ace /scss/compiler.py
parentd7216c20dede113b4a76a97c9151c569f6be0c6e (diff)
downloadpyscss-8b32fe7369ea287681292c0036b5458843b299c8.tar.gz
Fix this ancient xCSS-style test, and add some warnings.
Diffstat (limited to 'scss/compiler.py')
-rw-r--r--scss/compiler.py8
1 files changed, 8 insertions, 0 deletions
diff --git a/scss/compiler.py b/scss/compiler.py
index ac89a58..e07b515 100644
--- a/scss/compiler.py
+++ b/scss/compiler.py
@@ -339,6 +339,9 @@ class Compilation(object):
####################################################################
# At (@) blocks
if block.is_atrule:
+ # TODO particularly wild idea: allow extensions to handle
+ # unrecognized blocks, and get the pyscss stuff out of the
+ # core? even move the core stuff into the core extension?
code = block.directive
code = '_at_' + code.lower().replace(' ', '_')[1:]
try:
@@ -1121,6 +1124,10 @@ class Compilation(object):
"""
Implements @variables and @vars
"""
+ warn_deprecated(
+ rule,
+ "@variables and @vars are deprecated. "
+ "Just assign variables at top-level.")
_rule = rule.copy()
_rule.unparsed_contents = block.unparsed_contents
_rule.namespace = rule.namespace
@@ -1138,6 +1145,7 @@ class Compilation(object):
prop, raw_value = (_prop_split_re.split(block.prop, 1) + [None])[:2]
try:
is_var = (block.prop[len(prop)] == '=')
+ warn_deprecated(rule, "Assignment with = is deprecated; use :.")
except IndexError:
is_var = False
calculator = self._make_calculator(rule.namespace)