[Deprecated] Use postcss-value-parser instead
css-list
css parsing helpers
API
If separators
is not specified, it will default to
[' ', '\n', '\t', ',', '/']
.
list.each(input[, separators], cb)
list.each('"50%" 50%/100% calc(100% + 20%)', [' ', '/'], function (value, type) {
});
list.map(input[, separators], cb)
list.map('"50%" 50%/100% calc(100% + 20%)', [' ', '/'], function (value, type, prevValue, prevType) {
if(type === 'func' || type === 'quote') {
return type;
}
});
list.split(input[, separators], last)
list.split('10px 20px 5px 15px')', ['\n', '\t', ' '])
// ['10px', '20px', '5px', '15px']
list.split('10px, 20px, 5px, ')', [','], true)
// ['10px', '20px', '5px', '']