All notable changes to this project will be documented in this file. This project adheres to Semantic Versioning.
- Copy matching rules with dynamic pseudo-classes or pseudo-elements in selectors to the style element (#280, #562, #567)
- Add a CssToAttributeConverter (#546)
- Expose the DOMDocument in AbstractHtmlProcessor (#520)
- Add an HtmlNormalizer class (#513, #516)
- Add a CssInliner class (#514, #522)
- Composer scripts for the various CI build steps
- Validate the composer.json on Travis (#476)
- Add type hint checking to the code sniffs (#566)
- Check the code with PHPMD (#561)
- Add the cyclomatic complexity to the checked code sniffs (#558)
- Use the Symfony CSS selector component (#540)
- Support for PHP 5.5 will be removed in Emogrifier 3.0.
- Support for PHP 5.6 will be removed in Emogrifier 4.0.
- The removal of invisible nodes will be removed in Emogrifier 3.0. (#473)
- Converting CSS styles to (non-CSS) HTML attributes will be removed in Emogrifier 3.0. Please use the new CssToAttributeConverter instead. (#474)
- Emogrifier 3.x.y will be the last release that supports usage without Composer (i.e., you can still require the class file). Starting with version 4.0, Emogrifier will only work with Composer.
- The Emogrifier class will be superseded by CssInliner class in Emogrifier 3.0. For this, the Emogrifier class will be deprecated for version 3.0 and removed for version 4.0.
- Allow CSS between empty
@media
rule and another@media
rule (#534) - Allow additional whitespace in media-query-list of disallowed
@media
rules (#532) - Allow multiple minified
@import
rules in the CSS without error (note:@import
s are currently ignored, #527) - Style property ordering when multiple mixed individual and shorthand properties apply (#511, #508)
- Calculation of selector precedence for selectors involving pseudo-classes and/or attributes (#502)
- Allow
@charset
in the CSS without error (note: its value is currently ignored, #507) - Allow attribute selectors in descendants (#506, #381)
- Allow adjacent sibling CSS selector combinator in minified CSS (#505)
- Allow CSS property values containing newlines (#504)
- Support for CSS :not() selector (#431)
- Automatically remove !important annotations from final inline style declarations (#420)
- Automatically move
<style>
block from<head>
to<body>
(#396) - PHP 7.2 support (#398)
- Allow PHP 7.2 in
composer.json
, cleaner PHP version constraint - Test in Travis for PHP 7.2
- Allow PHP 7.2 in
- Debug mode. Throw debug exceptions only if debug is active. (#392)
- Test with latest and oldest dependencies on Travis (#463)
- Always enable the debug mode in the tests (#448)
- Optimize the string operations (#430)
- Support for PHP 5.5 will be removed in Emogrifier 3.0.
- Support for PHP 5.6 will be removed in Emogrifier 4.0.
- Handle invalid/unrecognized selectors in media query blocks (#442)
- Throw (the correct) exception for invalid excluded selectors (#437)
- emogrifyBody must not encode umlaut entities (#414)
- Fix mapped HTML attribute values (#405)
- Make sure the HTML always has a BODY element (#410)
- Make inline style priority higher than css block priority (#404)
- Fix media regex parsing (#402)
- Silence purposefully ignored PHP Warnings (#400)
- Handling invalid xPath expression warnings (#361)
- Support for PHP 5.5 will be removed in Emogrifier 3.0.
- Support for PHP 5.4 will be removed in Emogrifier 2.0.
- Allow colon (
:
) and semi-colon (;
) when using the*=
selector (#371) - Ignore "auto" width and height (#365)
- Add support for PHP 7.1 (#342)
- Support the attr|=value selector (#337)
- Support the attr*=value selector (#330)
- Support the attr$=value selector (#329)
- Support the attr^=value selector (#324)
- Support the attr~=value selector (#323)
- Add CSS to HTML attribute mapper (#288)
- Remove composer dependency from PHP mbstring extension (Actual code dependency were removed a lot of time ago) (#295)
- Support for PHP 5.5 will be removed in Emogrifier 3.0.
- Support for PHP 5.4 will be removed in Emogrifier 2.0.
- Method emogrifyBodyContent() doesn't keeps utf8 umlauts (#349)
- Ignore value with words more than one in the attribute selector (#327)
- Ignore spaces around the > in the direct child selector (#322)
- Ignore empty media queries (#307) (#237)
- Ignore pseudo-class when combined with pseudo-element (#308)
- First-child and last-child selectors are broken (#293)
- Second !important rule needs to overwrite the first one (#292)
- Add branch alias (#231)
- Remove media queries which do not impact the document (#217)
- Allow elements to be excluded from emogrification (#215)
- Handle !important (#214)
- emogrifyBodyContent() method (#206)
- Cache combinedStyles (#211)
- Allow user to define media types to keep (#200)
- Ignore invalid CSS selectors (#194)
- isRemoveDisplayNoneEnabled option (#162)
- Allow disabling of "inline style" and "style block" parsing (#156)
- Preserve @media if necessary (#62)
- Add extraction of style blocks within the HTML
- Add several new pseudo-selectors (first-child, last-child, nth-child, and nth-of-type)
- Make HTML5 the default document type (#245)
- Make copyCssWithMediaToStyleNode private (#218)
- Stop encoding umlauts and dollar signs (#170)
- Convert the classes to namespaces (#41)
- Support for PHP 5.4 will be removed in Emogrifier 2.0.
- Drop support for PHP 5.3 (#114)
- Support for character sets other than UTF-8 was removed.
- Fix failing tests on Windows due to line endings (#263)
- Parsing CSS declaration blocks (#261)
- Fix first-child and last-child selectors (#257)
- Fix parsing of CSS for data URIs (#243)
- Fix multi-line media queries (#241)
- Keep CSS media queries even if followed by CSS comments (#201)
- Fix CSS selectors with exact attribute only (#197)
- Properly handle UTF-8 characters and entities (#189)
- Add mbstring extension to composer.json (#93)
- Prevent incorrectly capitalized CSS selectors from being stripped (#85)
- Fix CSS selectors with exact attribute only (#197)
- Wrong selector extraction from minified CSS (#69)
- Restore libxml error handler state after clearing (#65)
- Ignore all warnings produced by DOMDocument::loadHTML() (#63)
- Style tags in HTML cause an Xpath invalid query error (#60)
- Fix PHP warnings with PHP 5.5 (#26)
- Make removal of invisible nodes operate in a case-insensitive manner
- Fix a bug that was overwriting existing inline styles from the original HTML