Possible to write a style based on the value of individual cells? #1690
-
Considering we generally have no control over the HTML output of the sites for which we write styles, is it possible to write a style based on the content of a ? I want to apply different colors to cells based on the content of the cell. e.g. "Warning" to be orange, "Error" to be red, etc. Best I could find was a It would look like this if td:contains("Warning") {
background: orange;
} Is there a way to accomplish it these days? |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment
-
No, |
Beta Was this translation helpful? Give feedback.
No,
:contains
selector is from jQuery. There is no alternative for CSS. You'll have to make a userscript.