Wrong style check for rgb(r,g,b) function in selector.

I get error:

1 error prohibited this style from being saved

There were problems with the following fields:

    Style code has an error - parse error on value " " (S) on line 53 around "242, 242)" i] {
        ". If you need help, post a new discussion at https://forum.userstyles.org/post/discussion/5 

My code - it is perfectly legal:

article:first-of-type td[style*="background-color: rgb(242, 242, 242)" i] {
    background-color: #333 !important;
}

Comments

  • The validator is outdated and has many bugs. Case-insensitive CSS attribute selectors weren't even a thing when it was implemented, so my guess is that it sees it as invalid syntax.

    The Stylish devs are more into creating new bugs than fixing any old ones, so I wouldn't expect any improvement any time soon. If it makes you feel any better to complain here, go right ahead, but the devs have abandoned the forum, so it's highly unlikely to accomplish anything. You can send any complaints directly to them at contact@userstyles.org. Pretty sure nobody's reading those either though.

    Otherwise, appease the validator. Case-insensitive attribute selectors are rarely a necessity in CSS, and it doesn't look like it would be in this case.
  • edited July 14 [?]
    But how to skip validator? I can't update style because of not validating.
    Is only way posting to alternative sites - eg. github?

    PS. Thanks for hint about case insensitive selector. I've updated style without it, it is sufficient now. Thanks.
Sign In or Register to comment.