rule.d.ts 1.2 KB

123456789101112131415161718192021222324252627282930313233343536
  1. import Container from './container';
  2. import * as postcss from './postcss';
  3. export default class Rule extends Container implements postcss.Rule {
  4. /**
  5. * Returns a string representing the node's type. Possible values are
  6. * root, atrule, rule, decl or comment.
  7. */
  8. type: string;
  9. /**
  10. * Contains information to generate byte-to-byte equal node string as it
  11. * was in origin input.
  12. */
  13. raws: postcss.RuleRaws;
  14. /**
  15. * The rule's full selector. If there are multiple comma-separated selectors,
  16. * the entire group will be included.
  17. */
  18. selector: string;
  19. /**
  20. * Represents a CSS rule: a selector followed by a declaration block.
  21. */
  22. constructor(defaults?: postcss.RuleNewProps);
  23. /**
  24. * @param overrides New properties to override in the clone.
  25. * @returns A clone of this node. The node and its (cloned) children will
  26. * have a clean parent and code style properties.
  27. */
  28. clone(overrides?: Object): Rule;
  29. toJSON(): postcss.JsonRule;
  30. /**
  31. * @returns An array containing the rule's individual selectors.
  32. * Groups of selectors are split at commas.
  33. */
  34. selectors: string[];
  35. _selector: string;
  36. }