@atlaskit/eslint-plugin-design-system
Version:
The essential plugin for use with the Atlassian Design System.
9 lines • 597 B
JavaScript
var validColorPropertyNames = new Set(['color', 'background', 'background-color', 'border', 'border-left', 'border-right', 'border-top', 'border-bottom', 'border-color', 'border-left-color', 'border-right-color', 'border-top-color', 'border-bottom-color', 'outline', 'outline-color', 'box-shadow']);
var kebabize = function kebabize(str) {
return str.replace(/[A-Z]+(?![a-z])|[A-Z]/g, function ($, ofs) {
return (ofs ? '-' : '') + $.toLowerCase();
});
};
export var isColorCssPropertyName = function isColorCssPropertyName(value) {
return validColorPropertyNames.has(kebabize(value));
};