-
Target HTMLdiv element don't have index.html <!doctype html>
<html lang="en">
<head>
<meta charset="utf-8">
</head>
<body>
<div style="background-color: green">
Text001
</div>
<div style="background-color: gray">
Text002
</div>
</body>
</html> What i trieddiv {
background-color: red !important;
}
QuestionI want write Stylus like this. div (if [background-color == 'green']) {
background-color: red !important;
} |
Beta Was this translation helpful? Give feedback.
Answered by
CRC32EX
Feb 18, 2023
Replies: 1 comment
-
I found solution. div[style*="background-color: green"] {
background-color: red !important;
} |
Beta Was this translation helpful? Give feedback.
0 replies
Answer selected by
CRC32EX
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
I found solution.
It works successfully!
ref
https://stackoverflow.com/a/8426901/4771485