UNPKG

ec0lint-style

Version:

CSS linter for reducing digital footprint with ec0lint.

17 lines (14 loc) 299 B
'use strict'; /** * Check whether a hex color is standard * * @param {string} hex * @returns {boolean} */ module.exports = function isStandardSyntaxHexColor(hex) { // Less map usage (e.g. .myclass { color: #colors[somecolor]; }) if (hex.includes('[')) { return false; } return true; };