UNPKG

stylelint

Version:

A mighty CSS linter that helps you avoid errors and enforce conventions.

15 lines (13 loc) 281 B
/** * Check whether a hex color is standard * * @param {string} hex * @returns {boolean} */ export default function isStandardSyntaxHexColor(hex) { // Less map usage (e.g. .myclass { color: #colors[somecolor]; }) if (hex.includes('[')) { return false; } return true; }