Skip to content

unsatisfiable-variants

Reports variants that can never match together, such as portrait:landscape:.

This rule reports stacked variants that can never match at the same time. Stacked variants must all match, and a viewport cannot be in portrait and landscape orientation at once. The utility never applies.

Reported

style("portrait:landscape:p-4");unsatisfiable-variants: variants `portrait:landscape` never match because `@media (orientation: portrait)` and `@media (orientation: landscape)` exclude each other

Fixed

style("portrait:p-4 landscape:p-4");

How to fix

  • To apply the utility in either case, write one utility for each variant, as in the example. When the cases cover every situation, drop the variants: p-4.
  • To apply the utility in one case only, keep the variant for that case.

Rule settings

PresetSeverity
recommendedwarn
strictdeny
stylisticoff

Configure lint to change the severity or options.