You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
<html>
<head>
<style>
.view a {
color: green;
}
.view span[style~="color:"] a {
color: inherit;
}
</style>
<body>
<div class="view">
<span style="color: red">
<a href="google.com">Link that should be red</a>
</span>
<a href="google.com">Link that should be green</a>
</div>
</body>
</html>
which should produce links of two different colors (open the HTML in a browser).
Using this library the HTML is transformed to the following HTML:
<html>
<head>
<style>.view span[style~="color:"] a {color:inherit}</style>
</head>
<body>
<div class="view">
<span style="color: red">
<a href="google.com" style="color:green">Link that should be red</a>
</span>
<a href="google.com" style="color:green">Link that should be green</a>
</div>
</body>
</html>
However, this snippet results in two links that are green. The problem is that the inlined color of the first link overrides the inherit from style element.
The text was updated successfully, but these errors were encountered:
Sorry to hear that. I have to admit that it's very unlikely that I'll be able to find the time to patch this. If you can take a stab at the code and figure out why it doesn't work, I can help you write and run a unit test.
So I have a HTML email with styles similiar to:
which should produce links of two different colors (open the HTML in a browser).
Using this library the HTML is transformed to the following HTML:
However, this snippet results in two links that are green. The problem is that the inlined color of the first link overrides the inherit from style element.
The text was updated successfully, but these errors were encountered: