email-bugs icon indicating copy to clipboard operation
email-bugs copied to clipboard

Yahoo has a default style targeting [dir]

Open hteumeuleu opened this issue 9 years ago • 1 comments

The desktop webmail of Yahoo has a default style rule targeting any element with a dir attribute.

[dir] {
     text-align:start;
}

Thus it breaks the cascade if you wanted to inherit text-align from a parent element. Any element with a dir attribute should also include a text-align style inline.

hteumeuleu avatar Mar 30 '16 14:03 hteumeuleu

I don't see this anymore. But, I see the email message is rendered in <li> which has a default text-align value in Chrome's user agent stylesheet:

li {
    text-align: -webkit-match-parent;
}

This cascades and it can affect the alignment of elements. For example, body[dir=ltr] li p[dir=rtl] will be unexpectedly aligned to the left.

husseinalhammad avatar Aug 30 '22 10:08 husseinalhammad