Possible to write a style based on the value of individual cells? #1690
Answered
by
tophf
cparker4486
asked this question in
Q&A
-
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.
Answered by
tophf
Nov 3, 2023
Replies: 1 comment
-
No, |
Beta Was this translation helpful? Give feedback.
0 replies
Answer selected by
cparker4486
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
No,
:contains
selector is from jQuery. There is no alternative for CSS. You'll have to make a userscript.