S
S
Sasha2017-09-05 17:43:58
Layout
Sasha, 2017-09-05 17:43:58

How to use the value of a variable from a list of variables?

Good afternoon.
I have a list of variables like

$list:(
  accept: #339966,
  warning: #FF0000
);

And the wrong way to use a specific value from this list without iterating
.accept{
    color: $list: accept;
}

Can you please tell me how to use the value of a variable from the list of variables?
Or a link to "where to read", otherwise the first page of Google's issuance does not give the desired result.
Thank you!

Answer the question

In order to leave comments, you need to log in

1 answer(s)
A
Alexander Pushkarev, 2017-09-05
@userAlexander

.accept{
    color: map-get($list, 'accept');
    /* или */
    color: map-get($list, accept);
}

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question