PHP Classes

Inline Style: Apply stylesheets to HTML as tag style attributes

Recommend this page to a friend!
     
  Info   View files Files   Install with Composer Install with Composer   Download Download   Reputation   Support forum   Blog    
Ratings Unique User Downloads Download Rankings
StarStarStar 49%Total: 548 All time: 5,530 This week: 488Up
Version License PHP version Categories
inline-style 0.1MIT/X Consortium ...5HTML
Description 

Author

This class can be used to apply style sheets to HTML as tag style attributes.

It parses an HTML document, finds external or inline style sections, and applies the defined styles to tags that match the defined style selectors to make the tags use style attribute instead.

Innovation Award
PHP Programming Innovation award nominee
April 2010
Number 9


Prize: One book of choice by Packt
CSS stylesheets can be used to define presentation details of elements in pages.

However, in certain cases it is not possible to use external CSS stylesheets to define the page presentation.

That is the case of certain Web mail systems, like for instance Gmail, that discard all stylesheets used in an HTML e-mail message.

This class provides an alternative solution for using CSS stylesheets in HTML e-mail that works even with systems that disable CSS stylesheets in the messages.

It processes the CSS stylesheets and alter the HTML to apply the styles in each page tag setting their style attributes.

Manuel Lemos
Picture of Christiaan Baartse
Name: Christiaan Baartse <contact>
Classes: 4 packages by
Country: The Netherlands The Netherlands
Innovation award
Innovation award
Nominee: 3x

  Files folder image Files (2)  
File Role Description
Plain text file CSSQuery.php Class Dependency for main class
Plain text file InlineStyle.php Class Main Class

The PHP Classes site has supported package installation using the Composer tool since 2013, as you may verify by reading this instructions page.
Install with Composer Install with Composer
 Version Control Unique User Downloads Download Rankings  
 0%
Total:548
This week:0
All time:5,530
This week:488Up
 User Ratings  
 
 All time
Utility:83%StarStarStarStarStar
Consistency:75%StarStarStarStar
Documentation:-
Examples:-
Tests:-
Videos:-
Overall:49%StarStarStar
Rank:2885