stylelint
Version:
Modern CSS linter
12 lines (11 loc) • 305 B
JavaScript
/**
* Get the index of a declaration's value
*
* @param {Decl} decl
* @return {int} The index
*/
export default function (decl) {
const beforeColon = decl.toString().indexOf(":")
const afterColon = decl.raw("between").length - decl.raw("between").indexOf(":")
return beforeColon + afterColon
}