SASS inspect() for array or another method how to output an array -
my question how create sass function inspect()
work arrays or how output array way.
my basic illustration code:
@function z($layers...) { @warn "`#{inspect($layers...)}`"; } .test { z-index: z("test", "test2"); }
which generates error wrong number of arguments (2 1) 'inspect'
how can output $layers
variable within @function z
? thanks
http://sassmeister.com/gist/a8b0610d63d23164328a
the inspect()
function takes single argument. using ...
notation, you're expanding list individual arguments function. that's why it's complaining you've supplied 2 arguments when 1 expected.
@function z($layers...) { @warn "`#{inspect($layers)}`"; }
sass
No comments:
Post a Comment