Tailwindcss: Uncaught DOMException: Failed to execute 'querySelectorAll' on 'Element': '.hover:bg-grey' is not a valid selector.

Created on 4 Jun 2019  路  4Comments  路  Source: tailwindlabs/tailwindcss

Hello,

I don't know why this error appears. Indeed, I have this error in the console when I right-click on some elements, mainly buttons. Here are some mistakes that all seem to be getting closer:

Uncaught DOMException: Failed to execute 'querySelectorAll' on 'Element': '.hover:bg-grey' is not a valid selector.
Uncaught DOMException: Failed to execute 'querySelectorAll' on 'Element': '.w-1/3' is not a valid selector.
Uncaught DOMException: Failed to execute 'querySelectorAll' on 'Element': '.md:w-1/2' is not a valid selector.

I would like to point out that I do not use QuerySelectorAll() on my side.

Capture d鈥檈虂cran 2019-06-04 a虁 21 42 21

Thank you for your help!

Best regards,
Valentin

Most helpful comment

This error is coming from a Chrome extension you have installed that isn't properly escaping CSS classes, I'd try disabling all extensions and verifying that the error goes away then enabling them one at a time to find out which one it is.

All 4 comments

You possibly need to escape some of tailwind's unusual characters like "/" and ":". Not sure though as I give specific classes to elements that need to be used in selectors.

This error is coming from a Chrome extension you have installed that isn't properly escaping CSS classes, I'd try disabling all extensions and verifying that the error goes away then enabling them one at a time to find out which one it is.

If somebody finds this with their own code: querySelector does work with escaped selectors.

Just looking at the ID of the extension seems like this is something built-in into Brave browser.

Problem solved, thank you all for your answers 馃挴!

Solution: I updated Brave to its latest version. And from the settings, I checked the "Hide the Brave Rewards button" box.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

manniL picture manniL  路  3Comments

jvanbaarsen picture jvanbaarsen  路  3Comments

rgaufman picture rgaufman  路  3Comments

Quineone picture Quineone  路  3Comments

lamberttraccard picture lamberttraccard  路  3Comments