Home
Docs
GitHub
Pricing
Blog
Log In

Run Sandworm Audit for your App

Get started
Hold on, we're currently generating a fresh version of this report
Generated on May 1, 2024 via composer

tijsverkoyen/css-to-inline-styles v2.2.7

CssToInlineStyles is a class that enables you to convert HTML-pages/files into HTML-pages/files with inline styles. This is very useful when you're sending emails.
Package summary
Share
0
issues
2
licenses
1
MIT
1
BSD-3-Clause
Package created
30 Sep 2012
Version published
8 Dec 2023
Maintainers
1
Total deps
2
Direct deps
1
License
BSD-3-Clause

Issues

0
This package has no issues

Licenses

MIT License

Permissive
OSI Approved
This is a human-readable summary of (and not a substitute for) the license. Disclaimer.
Can
commercial-use
modify
distribute
sublicense
private-use
Cannot
hold-liable
Must
include-copyright
include-license
1 Packages, Including:
symfony/css-selector@v7.0.7

BSD 3-Clause "New" or "Revised" License

Permissive
OSI Approved
This is a human-readable summary of (and not a substitute for) the license. Disclaimer.
Can
commercial-use
modify
distribute
place-warranty
Cannot
use-trademark
hold-liable
Must
include-copyright
include-license
1 Packages, Including:
tijsverkoyen/css-to-inline-styles@v2.2.7
Disclaimer

This deed highlights only some of the key features and terms of the actual license. It is not a license and has no legal value. You should carefully review all of the terms and conditions of the actual license before using the licensed material.

Sandworm is not a law firm and does not provide legal services. Distributing, displaying, or linking to this deed or the license that it summarizes does not create a lawyer-client or any other relationship.

Direct Dependencies

1
All Dependencies CSV
β“˜ This is a list of tijsverkoyen/css-to-inline-styles 's direct dependencies. Data on all dependencies, including transitive ones, is available via CSV download.
NameVersionSizeLicenseTypeVulnerabilities
symfony/css-selectorv7.0.7-MIT
prod

Visualizations

Frequently Asked Questions

What does tijsverkoyen/css-to-inline-styles do?

The tijsverkoyen/css-to-inline-styles package is a powerful tool that helps in converting HTML pages or files into corresponding HTML versions with inline styles. This can be profoundly useful, particularly when you are formulating and sending out HTML-based emails. Incorporating inline styles can enhance the compatibility of your emails across a diverse range of email clients, ensuring that your design and layout remains consistent in deployment.

How do you use tijsverkoyen/css-to-inline-styles?

Using the tijsverkoyen/css-to-inline-styles package is straightforward, requiring minimal setup. To begin with, you need to have Composer installed as the package is readily available there. You can get the package using the command:

$ composer require tijsverkoyen/css-to-inline-styles

To convert an HTML file with a CSS file, an instance of CssToInlineStyles class needs to be created and the convert function can then be invoked on this instance with the HTML and CSS contents as parameters.

Here is a simple example demonstrating this:

use TijsVerkoyen\CssToInlineStyles\CssToInlineStyles;

// create an instance
$cssToInlineStyles = new CssToInlineStyles();

$html = file_get_contents(__DIR__ . '/examples/sumo/index.htm');
$css = file_get_contents(__DIR__ . '/examples/sumo/style.css');

// convert and output
echo $cssToInlineStyles->convert(
    $html,
    $css
);

In this sample code, file_get_contents function is used to read the contents of the HTML and CSS files. The convert function is then used from the CssToInlineStyles object, to which the HTML and CSS contents are passed as parameters. The output after conversion is then printed.

Where are the tijsverkoyen/css-to-inline-styles docs?

The detailed documentation and various use-case examples for the tijsverkoyen/css-to-inline-styles package can be explored on its GitHub page found at https://github.com/tijsverkoyen/CssToInlineStyles. Here you will find necessary installation instructions, known issues, and practical examples to help you integrate and use the package effectively.