S
S
sinneren2017-05-19 12:20:25
Pug
sinneren, 2017-05-19 12:20:25

Can I use variables when initializing a mixin?

I load SVG with this mixin: +use('search', '32', '32', '#4990e2', '')
But writing the same colors in each is not comme il faut, so it would be more convenient to store them in a file, include and load through variables, but this method will not work:
- var jColor = '4990e2'
+use('search', '32', '32', '#{jColor }', '')
it will not work if you make an escape !, change quotes, put spaces. How to be? Reconcile?

Answer the question

In order to leave comments, you need to log in

1 answer(s)
K
Konstantin Kitmanov, 2017-05-19
@sinneren

Why is it so tricky, it doesn't work like this?
+use('search', '32', '32', '#' + jColor, '')

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question