Велоспорт через массив цветов с помощью SASS [duplicate]

Улучшение предыдущих ответов:

/**
 *
 * @param {string} name
 * @returns {string|null}
 */
function getQueryParam(name) {
  var q = window.location.search.match(new RegExp('[?&]' + name + '=([^&#]*)'));
  return q && q[1];
}

getQueryParam('a'); // returns '1' on page http://domain.com/page.html?a=1&b=2 
2
задан vsync 7 November 2016 в 16:10
поделиться

1 ответ

демон gist

$colors: (
    a: red,
    b: green,
    c: blue
);

@each $color, $name in $colors{
  $i: index($colors, $color $name);
  a:nth-child(#{$i}){ color:$color; }
}
1
ответ дан vsync 17 August 2018 в 09:31
поделиться
Другие вопросы по тегам:

Похожие вопросы: