The directive --warhol-theme-checks enables you to exempt components (and their children) from theme checks. Components must not only be implemented exactly as the pattern library demands, but the pattern library's demands must also be consistent with pattern library's Theme. If your component's requirements violate the pattern library itself, you will be confronted with errors like Non-conforming value expected and Non-conforming typography expected.

To allow a component to violate the theme's rules as long as it conforms to its snapshot, use --warhol-theme-checks with one of the following values:

  • all requires the component definition to conform to the theme (default)
  • none removes all theme requirements from the component definition
  • initial: same as all

Formal syntax: "all" | "none" | "initial"

It is important to note that the directive can only be used on components and affects the component element as well as its pseudo elements, children, and children's pseudo elements. Components nested inside other components are only subject to their own --warhol-theme-checks directive and do not inherit any ancestor's values.

Join our Slack Community

Any question not answered yet? You want to get the latest information on Warhol and discuss new features? Join our Slack Community.