Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Outlook does not support rgba #96

Closed
borgsoftwaresystems opened this issue Dec 9, 2021 · 7 comments
Closed

Outlook does not support rgba #96

borgsoftwaresystems opened this issue Dec 9, 2021 · 7 comments

Comments

@borgsoftwaresystems
Copy link

I'm currently using HTMLSanitizer which in turn uses AngleSharp. We are trying to sanitize code for use in emails but AngleSharp is converting the folllowing:

<p style="background-color:#bbbbbb">
or:
<p style="background-color: rgb(187, 187, 187)">

into:
<p style="background-color: rgba(187, 187, 187, 1)

The problem is that Outlook (for whatever reason) still does not support rgba.

Could you please tell me if there is a way for me to tell AngleSharp to stop converting to rgba? If not, would you consider (if possible) providing a mechanism to support this?

Best regards,
Steve

@FlorianRappl
Copy link
Contributor

I think we can support it. But it would require some efforts.

My question is: Is this really an issue in AngleSharp or rather in AngleSharp.Css? Because AngleSharp itself does not know anything about CSSOM such as colors.

@borgsoftwaresystems
Copy link
Author

Hi,

Many thanks for getting back to me so quickly. Yes, sorry about that, I didn't realise there were separate repositories - it is in AngleSharp.Css.

Shall I create a new issue in that repo and close the one here?

Best regards,

Steve

@FlorianRappl FlorianRappl transferred this issue from AngleSharp/AngleSharp Dec 9, 2021
@FlorianRappl
Copy link
Contributor

Transferred!

@FlorianRappl
Copy link
Contributor

Part of the next preview (incoming) via the Color.UseHex property.

@mganss
Copy link
Contributor

mganss commented Jan 19, 2022

The Color struct is private.

@spassarop
Copy link

This seems to keep the color format fixed. Is there a way to detect the color format when parsing the style? So hex stays hex and the same for rgb/a after a ParseStyleSheet call.

@FlorianRappl
Copy link
Contributor

Is there a way to detect the color format when parsing the style?

I think right now there is no such way.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants