Skip to content

Commit

Permalink
pin css-inline to v0.11
Browse files Browse the repository at this point in the history
  • Loading branch information
caseyjhol committed Sep 29, 2023
1 parent fd7e915 commit cc85c03
Show file tree
Hide file tree
Showing 3 changed files with 14 additions and 4 deletions.
7 changes: 7 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,11 @@

0.10.0 (?)
------------------

- require css-inline 0.11.x for performance improvements
- drop css-inline Python 3.6 support


0.9.1 (2023-09-23)
------------------

Expand Down
7 changes: 6 additions & 1 deletion mjml/mjml2html.py
Original file line number Diff line number Diff line change
Expand Up @@ -230,7 +230,12 @@ def _head_data_add(attr, *params):
raise ImportError('CSS inlining is an optional feature. Run `pip install -e ".[css_inlining]"` to install the required dependencies.') # noqa: E501

extra_css = ''.join(globalDatas.inlineStyle)
inliner = css_inline.CSSInliner(inline_style_tags=False, extra_css=extra_css)
inliner = css_inline.CSSInliner(
extra_css=extra_css,
inline_style_tags=False,
keep_link_tags=True,
keep_style_tags=True,
)
content = inliner.inline(content)

content = mergeOutlookConditionnals(content)
Expand Down
4 changes: 1 addition & 3 deletions setup.cfg
Original file line number Diff line number Diff line change
Expand Up @@ -59,9 +59,7 @@ testing =
lxml
PythonicTestcase
css_inlining =
css_inline < 0.10 # < 0.10: CSSInliner(inline_style_tags=...)

#css_inline >= 0.10.0 # >= 0.10.0: CSSInliner(inline_style_tags=...)
css_inline >= 0.11, < 0.12 # >= 0.11, < 0.12: CSSInliner(inline_style_tags=..., keep_link_tags=..., keep_style_tags=...)


[options.entry_points]
Expand Down

0 comments on commit cc85c03

Please sign in to comment.