JSPM

postcss-nth-list

1.0.0
  • ESM via JSPM
  • ES Module Entrypoint
  • Export Map
  • Keywords
  • License
  • Repository URL
  • TypeScript Types
  • README
  • Created
  • Published
  • Downloads 399
  • Score
    100M100P100Q87178F

A postcss module for picking items from a 'var list'

Package Exports

  • postcss-nth-list

This package does not declare an exports field, so the exports above have been automatically detected and optimized by JSPM instead. If any package subpath is missing, it is recommended to post an issue to the original package (postcss-nth-list) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.

Readme

postcss-nth

A postcss module for picking items from a var list

input

:root{
    --aVar: lime;
    --myList: "a-string" var(--aVar) 100,234,190 red;

    --string: nth(var(--myList), 0);
    --var: nth(var(--myList), 1);
    --rgb: nth(var(--myList), 2);
    --color: nth(var(--myList), 3);
}

body{
    background: nth(var(--myList), 3);
    color: rgb( var(--rgb) );
    border-color: var(--var);
    content: var(--string);
}

output

body{
    background: red;
    color: rgb( 100,234,190 );
    border-color: lime;
    content: "a-string";
}