summaryrefslogtreecommitdiff
path: root/pygments/style.py
diff options
context:
space:
mode:
authorSylvain Corlay <sylvain.corlay@gmail.com>2019-05-02 00:05:47 +0200
committerSylvain Corlay <sylvain.corlay@gmail.com>2019-05-02 00:05:47 +0200
commit8f733ca887f216cdcf1b1e5f9b70954811bcfc17 (patch)
treee03bebbb3a9d5e0b4fde177c8c4900770150e3e2 /pygments/style.py
parent249e5feec73189cfff3a4c81d6a6c9fc821286cd (diff)
downloadpygments-8f733ca887f216cdcf1b1e5f9b70954811bcfc17.tar.gz
Allow for CSS variable in pygments stylesheets
Diffstat (limited to 'pygments/style.py')
-rw-r--r--pygments/style.py4
1 files changed, 3 insertions, 1 deletions
diff --git a/pygments/style.py b/pygments/style.py
index 89766d8c..aee23f96 100644
--- a/pygments/style.py
+++ b/pygments/style.py
@@ -73,9 +73,11 @@ class StyleMeta(type):
if len(col) == 6:
return col
elif len(col) == 3:
- return col[0]*2 + col[1]*2 + col[2]*2
+ return col[0] * 2 + col[1] * 2 + col[2] * 2
elif text == '':
return ''
+ elif text.startswith('var') or text.startswith('calc'):
+ return text
assert False, "wrong color format %r" % text
_styles = obj._styles = {}