PHP Classes
elePHPant
Icontem

Inline Style: Apply stylesheets to HTML as tag style attributes

Recommend this page to a friend!
  Info   View files View files (2)   DownloadInstall with Composer Download .zip   Reputation   Support forum (1)   Blog    
Last Updated Ratings Unique User Downloads Download Rankings
2010-03-16 (6 years ago) RSS 2.0 feedNot enough user ratingsTotal: 541 All time: 5,280 This week: 931Up
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
Age: 30
All time rank: 134040 in The Netherlands The Netherlands
Week rank: 1361 Down34 in The Netherlands The Netherlands Up
Innovation award
Innovation award
Nominee: 3x

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

 Version Control Unique User Downloads Download Rankings  
 0%
Total:541
This week:0
All time:5,280
This week:931Up