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
Simplify the interface by only doing one thing, accepting an HTML string, a CSS string and inlining it.
a. The options currently in 1.8.0 are now documented so we can evaluate what should exist in 2.0
b. There are some vagaries around exactly how the CSS should be inlined, HTML Entities, UTF-8 encoding, base URLs, and such that lead to the contradictory mess that exists in 1.8
From my perspective nailing this down is the most important task towards doing any dev work done towards a 2.0 release.
Given the API Premailer(html_string, css_string, options = {}), what options are still necessary? Are we still planning to target just Nokogiri and Nokogumbo?
These are the options as documented currently. Which are still necessary? This is my first draft, after a cursory read through the repo.
Fixnum :line_length Line length used by to_plain_text. Default is 65.
Fixnum :warn_level What level of CSS compatibility warnings to show (see {Premailer::Warnings}).
String :link_query_string A string to append to every a href="" link. Do not include the initial ?.
String :base_url Used to calculate absolute URLs for local files.
Boolean :css_to_attributes Copy related CSS attributes into HTML attributes (e.g. background-color to bgcolor)
String :css_string Pass CSS as a string
Boolean :remove_ids Remove ID attributes whenever possible and convert IDs used as anchors to hashed to avoid collisions in webmail programs. Default is false.
Boolean :remove_classes Remove class attributes. Default is false.
Boolean :remove_comments Remove html comments. Default is false.
Boolean :remove_scripts Remove script elements. Default is true.
Boolean :reset_contenteditable Remove contenteditable attributes. Default is true.
Boolean :preserve_styles Whether to preserve any link rel=stylesheet and style elements. Default is false.
Boolean :preserve_reset Whether to preserve styles associated with the MailChimp reset code. Default is true.
Boolean :with_html_string Whether the html param should be treated as a raw string. Default is false.
Boolean :verbose Whether to print errors and warnings to $stderr. Default is false.
Boolean :io_exceptions Throws exceptions on I/O errors.
Boolean :include_link_tags Whether to include css from link rel=stylesheet tags. Default is true.
Boolean :include_style_tags Whether to include css from style tags. Default is true.
String :input_encoding Manually specify the source documents encoding. This is a good idea. Default is ASCII-8BIT.
Boolean :replace_html_entities Convert HTML entities to actual characters. Default is false.
Boolean :escape_url_attributes URL Escapes href, src, and background attributes on elements. Default is true.
Symbol :adapter Which HTML parser to use, either :nokogiri, :nokogumbo or :hpricot. Default is :nokogiri.
String :output_encoding Output encoding option for Nokogiri adapter. Should be set to "US-ASCII" to output HTML entities instead of Unicode characters.
Boolean :create_shorthands Combine several properties into a shorthand one, e.g. font: style weight size. Default is true.
For b. can anyone elaborate on what the expected behavior is supposed to be?
The text was updated successfully, but these errors were encountered:
I feel a little awkward jumping in like this without even making a PR yet, but I do plan on moving forward with these 2.0 changes (as well as looking into performance), so if none of the current contributors is able to I'd be willing (it'd be nice to keep updates in a single code base).
From the Roadmap
Simplify the interface by only doing one thing, accepting an HTML string, a CSS string and inlining it.
a. The options currently in 1.8.0 are now documented so we can evaluate what should exist in 2.0
b. There are some vagaries around exactly how the CSS should be inlined, HTML Entities, UTF-8 encoding, base URLs, and such that lead to the contradictory mess that exists in 1.8
From my perspective nailing this down is the most important task towards doing any dev work done towards a 2.0 release.
Given the API
Premailer(html_string, css_string, options = {})
, what options are still necessary? Are we still planning to target justNokogiri
andNokogumbo
?These are the options as documented currently. Which are still necessary? This is my first draft, after a cursory read through the repo.
a href=""
link. Do not include the initial?
.script
elements. Default is true.contenteditable
attributes. Default is true.link rel=stylesheet
and style elements. Default is false.$stderr
. Default is false.link rel=stylesheet
tags. Default is true.style
tags. Default is true.:nokogiri
,:nokogumbo
or:hpricot
. Default is:nokogiri
.For b. can anyone elaborate on what the expected behavior is supposed to be?
The text was updated successfully, but these errors were encountered: