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

Add guideline about "Style at the lowest level element" #3

Open
hteumeuleu opened this issue Sep 26, 2019 · 1 comment
Open

Add guideline about "Style at the lowest level element" #3

hteumeuleu opened this issue Sep 26, 2019 · 1 comment
Labels
enhancement New feature or request

Comments

@hteumeuleu
Copy link
Owner

Because we don't control styles from the host of our emails, we might always end up with inheriting default styles from e‑mail clients, especially webmails. Thus a good practice is to always add relevant styles at the lowest level element.

Examples:

  • Gmail and ul li
  • SFR and h1, h2
@hteumeuleu hteumeuleu added the enhancement New feature or request label Sep 26, 2019
@hteumeuleu
Copy link
Owner Author

Here’s an example from SFR webmail having the very loose CSS rule following:

div.read-content-block :not(.userSignature *) {
  font: 100% "Helvetica Neue",Helvetica,Arial,sans-serif;
  margin: auto;
  padding: 0;
}

This forces a font reset to any element that doesn't have a font declaration inline.

A screenshot of SFR webmail showing a loose CSS selector targeting * and applying a font reset.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

1 participant