Краткая справка

Класс
Свойства
isolateisolation: isolate;
isolation-autoisolation: auto;

Основы использования

Установка контекста наложения

Используйте утилиты isolate и isolation-auto, чтобы указать, должен ли элемент явно создавать новый контекст стекирования.

<div class="isolate ...">
  <!-- ... -->
</div>

Применяя условно

Tailwind lets you conditionally apply utility classes in different states using variant modifiers. For example, use hover:isolation-auto to only apply the isolation-auto utility on hover.

<div class="isolate hover:isolation-auto">
  <!-- ... -->
</div>

For a complete list of all available state modifiers, check out the Hover, Focus, & Other States documentation.

Контрольные точки и медиа-запросы

You can also use variant modifiers to target media queries like responsive breakpoints, dark mode, prefers-reduced-motion, and more. For example, use md:isolation-auto to apply the isolation-auto utility at only medium screen sizes and above.

<div class="isolate md:isolation-auto">
  <!-- ... -->
</div>

To learn more, check out the documentation on Responsive Design, Dark Mode and other media query modifiers.