Download the PHP package voku/css-to-inline-styles without Composer

On this page you can find all versions of the php package voku/css-to-inline-styles. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.

FAQ

After the download, you have to make one include require_once('vendor/autoload.php');. After that you have to import the classes with use statements.

Example:
If you use only one package a project is not needed. But if you use more then one package, without a project it is not possible to import the classes with use statements.

In general, it is recommended to use always a project to download your libraries. In an application normally there is more than one library needed.
Some PHP packages are not free to download and because of that hosted in private repositories. In this case some credentials are needed to access such packages. Please use the auth.json textarea to insert credentials, if a package is coming from a private repository. You can look here for more information.

  • Some hosting areas are not accessible by a terminal or SSH. Then it is not possible to use Composer.
  • To use Composer is sometimes complicated. Especially for beginners.
  • Composer needs much resources. Sometimes they are not available on a simple webspace.
  • If you are using private repositories you don't need to share your credentials. You can set up everything on our site and then you provide a simple download link to your team member.
  • Simplify your Composer build process. Use our own command line tool to download the vendor folder as binary. This makes your build process faster and you don't need to expose your credentials for private repositories.
Please rate this library. Is it a good library?

Informations about the package css-to-inline-styles

Build Status codecov.io Coverage Status Scrutinizer Code Quality Codacy Badge SensioLabsInsight Latest Stable Version Total Downloads Latest Unstable Version PHP 7 ready License

CssToInlineStyles class

WARNING: this is only a Extended-Fork of "https://github.com/tijsverkoyen/CssToInlineStyles"

CssToInlineStyles is a class that enables you to convert HTML-pages/files into HTML-pages/files with inline styles. This is very usefull when you're sending emails.

About

PHP CssToInlineStyles is a class to convert HTML into HTML with inline styles.

Installation

The recommended installation way is through Composer.

Example

use voku\CssToInlineStyles\CssToInlineStyles;

// Convert HTML + CSS to HTML with inlined CSS
$cssToInlineStyles= new CssToInlineStyles();
$cssToInlineStyles->setHTML($html);
$cssToInlineStyles->setCSS($css);
$html = $cssToInlineStyles->convert();

// Or use inline-styles blocks from the HTML as CSS
$cssToInlineStyles = new CssToInlineStyles($html);
$cssToInlineStyles->setUseInlineStylesBlock(true);
$html = $cssToInlineStyles->convert();

// Or use linked files from the HTML as CSS
$cssToInlineStyles = new CssToInlineStyles($html);
$cssToInlineStyles->setLoadCSSFromHTML(true);
$html = $cssToInlineStyles->convert(false, 0, __DIR__ . '/../tests/');

Documentation

The following properties exists and have set methods available:

Property Default Description
cleanup false Should the generated HTML be cleaned?
useInlineStylesBlock false Use inline-styles block as CSS.
stripOriginalStyleTags false Strip original style tags.
excludeMediaQueries true Exclude media queries from extra "css" and keep media queries for inline-styles blocks.
excludeConditionalInlineStylesBlock true Exclude conditional inline-style blocks.

Warning

Also if the default is , you maybe need to use this feature, because Outlook has some special features where the inline-CSS will be ignored and it will fallback to use only the CSS-Class- or ID-properties.

Known issues


All versions of css-to-inline-styles with dependencies

PHP Build Version
Package Version
Requires php Version >=7.0.0
symfony/css-selector Version ~3.0 || ~4.0 || ~5.0
voku/simple_html_dom Version ~4.7
ext-dom Version *
Composer command for our command line client (download client) This client runs in each environment. You don't need a specific PHP version etc. The first 20 API calls are free. Standard composer command

The package voku/css-to-inline-styles contains the following files

Loading the files please wait ....