<commit_before>InlineStyle
===========

InlineStyle provides an easy way to apply embedded and external stylesheets
directly as inline styles on the HTML tags. This is especially targetted at mail
clients which mostly dont support stylesheets but do support the style attribute
for HTML tags.

Usage
-----

First include both InlineStyle.php and CSSQuery.php.
Then create a new InlineStyle object from either a HTML string or HTML file.

    $htmldoc = new InlineStyle("testfiles/test.html", "testfiles");

or

    $htmldoc = new InlineStyle(file_get_contents("http://github.com"), "http://github.com");

The second param is the base url that is used to parse the links to external
stylesheets.

### Apply the embedded and external stylesheets

First we'll have to extract the stylesheets from the document and then we have
to apply them.

    $htmldoc->applyStylesheet($htmldoc->extractStylesheets());

### Applying additional stylesheets

This class can also be used to apply a given css template to each processed HTML
file.

    $htmldoc->applyStylesheet(file_get_contents("testfiles/external.css"));

License
-------<commit_msg>Base param isn't used with the construct but with extractStylesheets()<commit_after>InlineStyle
===========

InlineStyle provides an easy way to apply embedded and external stylesheets
directly as inline styles on the HTML tags. This is especially targetted at mail
clients which mostly dont support stylesheets but do support the style attribute
for HTML tags.

Usage
-----

First include both InlineStyle.php and CSSQuery.php.
Then create a new InlineStyle object from either a HTML string or HTML file.

    $htmldoc = new InlineStyle("testfiles/test.html");

or

    $htmldoc = new InlineStyle(file_get_contents("http://github.com"));

### Apply the embedded and external stylesheets

First we'll have to extract the stylesheets from the document and then we have
to apply them.

    $htmldoc->applyStylesheet($htmldoc->extractStylesheets());

The second param is the base url that is used to parse the links to external
stylesheets.

    $htmldoc->applyStylesheet($htmldoc->extractStylesheets(null, "http://github.<EMAIL>"));

### Applying additional stylesheets

This class can also be used to apply a given css template to each processed HTML
file.

    $htmldoc->applyStylesheet(file_get_contents("testfiles/external.css"));

License
-------
{'fraction_non_alphanumeric': 0.08690176322418136, 'fraction_numerical': 0.0, 'mean_word_length': 4.607058823529412, 'pattern_counts': {'":': 0, '<': 4, '<?xml version=': 0, '>': 12, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '3254192', 'n_tokens_mistral': 661, 'n_tokens_neox': 629, 'n_words': 277}