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
Zoho mail will remove selectors that include a general sibling combinator ~. However it will still add the prefix that targets the wrapping element, meaning those styles will be applied directly to the wrapping element.
So a style like this
.foo~ .bar{
display: none
}
With the normal zoho prefixing we would expect it to apply as
Which would apply to the wrapper around the outside of our message, and in this case it will hide the whole email.
Workaround
As a workaround, we can use this quirk to apply a fix that will undo the styles we don't want on the wrapper.
.zoho~ .zoho{
display: block;
}
It doesn't matter what the class name is we use here as it will be removed, but to avoid potential issues with other email clients, try and use a class name that doesn't appear anywhere in the email.
We can't add specificity within the selector or by using an !important flag, so to get this to override the unwanted styles we need to place it at the end of the stylesheet.
The text was updated successfully, but these errors were encountered:
Also worth noting here that we can't use a shortcut like all:unset as that isn't supported. And we can't set individual properties back to initial as that isn't supported either so we need to reset every style to a default value
Zoho mail will remove selectors that include a general sibling combinator
~
. However it will still add the prefix that targets the wrapping element, meaning those styles will be applied directly to the wrapping element.So a style like this
With the normal zoho prefixing we would expect it to apply as
But instead it is applied as
Which would apply to the wrapper around the outside of our message, and in this case it will hide the whole email.
Workaround
As a workaround, we can use this quirk to apply a fix that will undo the styles we don't want on the wrapper.
It doesn't matter what the class name is we use here as it will be removed, but to avoid potential issues with other email clients, try and use a class name that doesn't appear anywhere in the email.
We can't add specificity within the selector or by using an
!important
flag, so to get this to override the unwanted styles we need to place it at the end of the stylesheet.The text was updated successfully, but these errors were encountered: