Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

Stylish throwing error "Selector Expected. Ruleset ignored due to bad selector"

I did some googling about this and it largely seems to be a syntax error. That being said, I'm not sure what I'm doing wrong here as it looks like other Stylish scripts successfully running on this browser. The big difference I see is that most of the successful examples I see are selecting IDs whereas I'm trying to rewrite the rules for some classes. For whatever reason, the Stylish script isn't being applied to the page in question at all and I suspect the first step is to get the syntax errors to go away before I start fussing with trying to be more selective.

@namespace url(;

@-moz-document domain("") {
#spec-hack .fl-disable-interaction {
-webkit-user-select: all;
-moz-user-select: all;
-ms-user-select: all;
user-select: all;
pointer-events: all;
} !!important

#spec-hack .fl-transparent-facade {
display: inline;
position: static;
} !!important


Any idea where I've gone wrong?


  • /* AGENT_SHEET */

    @-moz-document domain("") {

    #spec-hack .fl-disable-interaction {
    -webkit-user-select: all !important;
    -moz-user-select: all !important;
    -ms-user-select: all !important;
    user-select: all !important;
    pointer-events: all !important;

    #spec-hack .fl-transparent-facade {
    display: inline !important;
    position: static !important;

    OK, switching things around like that gets the Stylish editor to stop throwing errors. However, things still aren't working as the rules simply aren't being applied. Yes, in the actual script I have changed to the correct domain.

    Any idea how to debug why the styles aren't being applied?
  • OK, did some more googling and found a thread on here that suggested toggling the script off and back on after the page had loaded. This makes everything work exactly like I want it to. The thread I found says this is because the userscript is running before the site's CSS loads and the userscript and site CSS have equal specificity.

    Any ideas how I should attack this?
  • edited March 2017 Chrome
    Gotta be more specific if you want definitive answers. A URL for the site in question, and preferably a pic of the elements in question, so no one has to go hunting. Anything else will be speculation, which is occasionally helpful, but more often not.

    Bottom line, if you're using the /* AGENT_SHEET */ cheat in Firefox, with !important; declarations, your code should win no matter what, AFAIK. I've seen some outlying cases where the site intentionally removes any injected stylesheets. Typically this is done to circumvent Adblockers.

    Can't know for sure unless we check. If that's the case, you may be SOL. You can block scripts for the site, but typically sites who have gone through that much trouble, make sure their sites don't function properly if you block their scripts.
Sign In or Register to comment.