Introducing ReUI:Open-source UI components and apps built with React, Next.js and Tailwind CSS
Browse ReUI

Vite Tailwind Metronic Postcss issues


Hi,
I've just implemented your tailwind metronic template with React and Vite, and I'm facing these warnings (postcss issues) :

To reproduce, I launch "npm run dev" with default vite configuration and then, I access to the home page.

Can you help me please ?

[vite:css] Complex selectors in '.menu-item.active > .menu-link.dark\:menu-item-active\:border-gray-100:is(.dark *)' can not be transformed to an equivalent selector without ':is()'.

[vite:css] Complex selectors in '.menu-item.active > .menu-link.dark\:menu-item-active\:\!bg-coal-600:is(.dark *)' can not be transformed to an equivalent selector without ':is()'.

[vite:css] Complex selectors in '.menu-item.active > .menu-link.dark\:menu-item-active\:bg-coal-300:is(.dark *)' can not be transformed to an equivalent selector without ':is()'.

[vite:css] Complex selectors in '.menu-item.active > .menu-link .dark\:menu-item-active\:border-gray-100:is(.dark *)' can not be transformed to an equivalent selector without ':is()'.

[vite:css] Complex selectors in '.menu-item.active > .menu-link .dark\:menu-item-active\:\!bg-coal-600:is(.dark *)' can not be transformed to an equivalent selector without ':is()'.

[vite:css] Complex selectors in '.menu-item.active > .menu-link .dark\:menu-item-active\:bg-coal-300:is(.dark *)' can not be transformed to an equivalent selector without ':is()'.

[vite:css] Complex selectors in '.menu-item.active > .menu-label.dark\:menu-item-active\:border-gray-100:is(.dark *)' can not be transformed to an equivalent selector without ':is()'.

[vite:css] Complex selectors in '.menu-item.active > .menu-label.dark\:menu-item-active\:\!bg-coal-600:is(.dark *)' can not be transformed to an equivalent selector without ':is()'.

[vite:css] Complex selectors in '.menu-item.active > .menu-label.dark\:menu-item-active\:bg-coal-300:is(.dark *)' can not be transformed to an equivalent selector without ':is()'.

[vite:css] Complex selectors in '.menu-item.active > .menu-label .dark\:menu-item-active\:border-gray-100:is(.dark *)' can not be transformed to an equivalent selector without ':is()'.

[vite:css] Complex selectors in '.menu-item.active > .menu-label .dark\:menu-item-active\:\!bg-coal-600:is(.dark *)' can not be transformed to an equivalent selector without ':is()'.

[vite:css] Complex selectors in '.menu-item.active > .menu-label .dark\:menu-item-active\:bg-coal-300:is(.dark *)' can not be transformed to an equivalent selector without ':is()'.

[vite:css] Complex selectors in '.menu-link:hover .dark\:menu-link-hover\:border-gray-100:is(.dark *)' can not be transformed to an equivalent selector without ':is()'.

[vite:css] Complex selectors in '.menu-link:hover .dark\:menu-link-hover\:\!bg-coal-600:is(.dark *)' can not be transformed to an equivalent selector without ':is()'.

[vite:css] Complex selectors in '[data-scrollspy-anchor].active .dark\:scrollspy-active\:border-gray-100:is(.dark *)' can not be transformed to an equivalent selector without ':is()'.

[vite:css] Complex selectors in '[data-scrollspy-anchor].active .dark\:scrollspy-active\:bg-coal-300:is(.dark *)' can not be transformed to an equivalent selector without ':is()'.

[vite:css] Complex selectors in '.menu-item.active > .menu-link.dark\:menu-item-active\:border-gray-100:is(.dark *)' can not be transformed to an equivalent selector without ':is()'.

[vite:css] Complex selectors in '.menu-item.active > .menu-link.dark\:menu-item-active\:\!bg-coal-600:is(.dark *)' can not be transformed to an equivalent selector without ':is()'.

[vite:css] Complex selectors in '.menu-item.active > .menu-link.dark\:menu-item-active\:bg-coal-300:is(.dark *)' can not be transformed to an equivalent selector without ':is()'.

[vite:css] Complex selectors in '.menu-item.active > .menu-link .dark\:menu-item-active\:border-gray-100:is(.dark *)' can not be transformed to an equivalent selector without ':is()'.

[vite:css] Complex selectors in '.menu-item.active > .menu-link .dark\:menu-item-active\:\!bg-coal-600:is(.dark *)' can not be transformed to an equivalent selector without ':is()'.

[vite:css] Complex selectors in '.menu-item.active > .menu-link .dark\:menu-item-active\:bg-coal-300:is(.dark *)' can not be transformed to an equivalent selector without ':is()'.

[vite:css] Complex selectors in '.menu-item.active > .menu-label.dark\:menu-item-active\:border-gray-100:is(.dark *)' can not be transformed to an equivalent selector without ':is()'.

[vite:css] Complex selectors in '.menu-item.active > .menu-label.dark\:menu-item-active\:\!bg-coal-600:is(.dark *)' can not be transformed to an equivalent selector without ':is()'.

[vite:css] Complex selectors in '.menu-item.active > .menu-label.dark\:menu-item-active\:bg-coal-300:is(.dark *)' can not be transformed to an equivalent selector without ':is()'.

[vite:css] Complex selectors in '.menu-item.active > .menu-label .dark\:menu-item-active\:border-gray-100:is(.dark *)' can not be transformed to an equivalent selector without ':is()'.

[vite:css] Complex selectors in '.menu-item.active > .menu-label .dark\:menu-item-active\:\!bg-coal-600:is(.dark *)' can not be transformed to an equivalent selector without ':is()'.

[vite:css] Complex selectors in '.menu-item.active > .menu-label .dark\:menu-item-active\:bg-coal-300:is(.dark *)' can not be transformed to an equivalent selector without ':is()'.

[vite:css] Complex selectors in '.menu-link:hover .dark\:menu-link-hover\:border-gray-100:is(.dark *)' can not be transformed to an equivalent selector without ':is()'.

[vite:css] Complex selectors in '.menu-link:hover .dark\:menu-link-hover\:\!bg-coal-600:is(.dark *)' can not be transformed to an equivalent selector without ':is()'.

[vite:css] Complex selectors in '.active[data-scrollspy-anchor] .dark\:scrollspy-active\:border-gray-100:is(.dark *)' can not be transformed to an equivalent selector without ':is()'.

[vite:css] Complex selectors in '.active[data-scrollspy-anchor] .dark\:scrollspy-active\:bg-coal-300:is(.dark *)' can not be transformed to an equivalent selector without ':is()'.

[vite:css] Complex selectors in '.menu-item.active > .menu-link.dark\:menu-item-active\:\!bg-coal-600:is(.dark *)' can not be transformed to an equivalent selector without ':is()'.

[vite:css] Complex selectors in '.menu-item.active > .menu-link.dark\:menu-item-active\:bg-coal-300:is(.dark *)' can not be transformed to an equivalent selector without ':is()'.

[vite:css] Complex selectors in '.menu-item.active > .menu-link .dark\:menu-item-active\:\!bg-coal-600:is(.dark *)' can not be transformed to an equivalent selector without ':is()'.

[vite:css] Complex selectors in '.menu-item.active > .menu-link .dark\:menu-item-active\:bg-coal-300:is(.dark *)' can not be transformed to an equivalent selector without ':is()'.

[vite:css] Complex selectors in '.menu-item.active > .menu-label.dark\:menu-item-active\:\!bg-coal-600:is(.dark *)' can not be transformed to an equivalent selector without ':is()'.

[vite:css] Complex selectors in '.menu-item.active > .menu-label.dark\:menu-item-active\:bg-coal-300:is(.dark *)' can not be transformed to an equivalent selector without ':is()'.

[vite:css] Complex selectors in '.menu-item.active > .menu-label .dark\:menu-item-active\:\!bg-coal-600:is(.dark *)' can not be transformed to an equivalent selector without ':is()'.

[vite:css] Complex selectors in '.menu-item.active > .menu-label .dark\:menu-item-active\:bg-coal-300:is(.dark *)' can not be transformed to an equivalent selector without ':is()'.

[vite:css] Complex selectors in '.menu-link:hover .dark\:menu-link-hover\:\!bg-coal-600:is(.dark *)' can not be transformed to an equivalent selector without ':is()'.

[vite:css] Complex selectors in '.active[data-scrollspy-anchor] .dark\:scrollspy-active\:border-gray-100:is(.dark *)' can not be transformed to an equivalent selector without ':is()'.

[vite:css] Complex selectors in '.active[data-scrollspy-anchor] .dark\:scrollspy-active\:bg-coal-300:is(.dark *)' can not be transformed to an equivalent selector without ':is()'.

[vite:css] Complex selectors in '.active[data-scrollspy-anchor] .dark\:scrollspy-active\:bg-coal-300:is(.dark *)' can not be transformed to an equivalent selector without ':is()'.
(x2)


Text formatting options
Submit
Here's a how to add some HTML formatting to your comment:
  • <pre></pre> for JS codes block
  • <pre lang="html"></pre> for HTML code block
  • <pre lang="scss"></pre> for SCSS code block
  • <pre lang="php"></pre> for PHP code block
  • <code></code> for single line of code
  • <strong></strong> to make things bold
  • <em></em> to emphasize
  • <ul><li></li></ul>  to make list
  • <ol><li></li></ol>  to make ordered list
  • <h3></h3> to make headings
  • <a></a> for links
  • <img> to paste in an image
  • <blockquote></blockquote> to quote somebody
  • happy  :)
  • shocked  :|
  • sad  :(

Replies (3)


I got same warning issue when I tried to integrate Metronic 9 with Laravel + Inertia.

After some trial and error I realized that the warning came from /src/core/plugins/plugin.js. This is because Metronic 9 is running postcss-preset-env. It tries to transform this selector because the Metronic 9 configuration indicates that want to support older browser versions without native support for the :is() selector.

This stackoverflow post explain well:
from "postcss-is-pseudo-class" plugin: Complex selectors in '' can not be transformed to an equivalent selector without ':is()'


I have steps to resolve this:
1. Remove postcss-preset-env from package.json
2. Remove plugins postcss-preset-env from postcss.config.js

And the warning is gone.



Yes I used the latest Metronic 9 release with your React tutorial (Vite + React).

I followed this, step by step : https://keenthemes.com/metronic/tailwind/docs/getting-started/integration/react

Everything works fine, except the above errors.



Hi,

Thank you for reaching out to us.


We reviewed the Metronic Vue example app and couldn't reproduce the errors you mentioned.

Have you made any modifications to our codebase?

Did this issue occur while using assets from the latest Metronic 9 release?

Regards,
Lauris Stepanovs,
Keenthemes Support Team


Text formatting options
Submit
Here's a how to add some HTML formatting to your comment:
  • <pre></pre> for JS codes block
  • <pre lang="html"></pre> for HTML code block
  • <pre lang="scss"></pre> for SCSS code block
  • <pre lang="php"></pre> for PHP code block
  • <code></code> for single line of code
  • <strong></strong> to make things bold
  • <em></em> to emphasize
  • <ul><li></li></ul>  to make list
  • <ol><li></li></ol>  to make ordered list
  • <h3></h3> to make headings
  • <a></a> for links
  • <img> to paste in an image
  • <blockquote></blockquote> to quote somebody
  • happy  :)
  • shocked  :|
  • sad  :(
Text formatting options
Submit
Here's a how to add some HTML formatting to your comment:
  • <pre></pre> for JS codes block
  • <pre lang="html"></pre> for HTML code block
  • <pre lang="scss"></pre> for SCSS code block
  • <pre lang="php"></pre> for PHP code block
  • <code></code> for single line of code
  • <strong></strong> to make things bold
  • <em></em> to emphasize
  • <ul><li></li></ul>  to make list
  • <ol><li></li></ol>  to make ordered list
  • <h3></h3> to make headings
  • <a></a> for links
  • <img> to paste in an image
  • <blockquote></blockquote> to quote somebody
  • happy  :)
  • shocked  :|
  • sad  :(