avoid-inline-spacing-evaluate.js 393 B

12345678910111213141516
  1. function avoidInlineSpacingEvaluate(node, options) {
  2. const overriddenProperties = options.cssProperties.filter(property => {
  3. if (node.style.getPropertyPriority(property) === `important`) {
  4. return property;
  5. }
  6. });
  7. if (overriddenProperties.length > 0) {
  8. this.data(overriddenProperties);
  9. return false;
  10. }
  11. return true;
  12. }
  13. export default avoidInlineSpacingEvaluate;