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

Implement creating <font> tag #66

Closed
wants to merge 1 commit into from

Conversation

goldenapples
Copy link

As I brought up in #65:

Adds an additional option to the options object, called
createFontTags. If the option is set to "true", then while looping
through the document elements to create style props, changes the
behavior of the setStyleAttrs method:

  • if the style attribute contains any of font-family, font-size, or
    color, those elements are not added to the style attribute, but
    instead are added to a tag which is wrapped around the
    element's innerHTML.

Adds an additional option to the `options` object, called
`createFontTags`. If the option is set to "true", then while looping
through the document elements to create style props, changes the
behavior of the `setStyleAttrs` method:

- if the style attribute contains any of `font-family`, `font-size`, or
  `color`, those elements are not added to the style attribute, but
  instead are added to a <font> tag which is wrapped around the
  element's innerHTML.
@rauchg
Copy link
Contributor

rauchg commented Oct 27, 2014

Needs tests. Looks good!

@thanj
Copy link

thanj commented Oct 27, 2014

I can flesh this out with tests if you think it would be useful.

After trying to push forward with this approach, though, I've realized what an awful idea it really was. This hacks through some minor annoyances in Outlook, only to create a lot more problems in every other browser. (One example: you lose the ability to define font size accurately - <font> tags are limited to size=1 through size=6, so you lose any fine-grained control over type size and leading...)

As @jng5 reported on the issue #65 (comment), using ms conditionals to define web-safe fallback fonts for Outlook is a much more sane approach.

I'm in favor of closing this.

@rauchg
Copy link
Contributor

rauchg commented Oct 27, 2014

Oh, that'd be really great to have, but potentially as another module? ie: juice-outlook.

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

Successfully merging this pull request may close these issues.

3 participants