Skip to content
This repository has been archived by the owner on Apr 21, 2023. It is now read-only.

Style Attribute De-duplicator #325

Open
GoogleCodeExporter opened this issue Apr 6, 2015 · 1 comment
Open

Style Attribute De-duplicator #325

GoogleCodeExporter opened this issue Apr 6, 2015 · 1 comment

Comments

@GoogleCodeExporter
Copy link

A filter that would combine duplicate style="..." into a single css class and 
assign that class to elements using the style.

Example:
<p style="text-align:left; color: red; background: blue;">FOO</p>
<p style="text-align:left; color: red; background: blue;">BAR</p>
<p style="text-align:left; color: red; background: blue;">BAZ</p>
Length:197

Converted To:

<style>.mps23456546{text-align:left;color:red;background:blue}</style>
<p class="mps23456546">FOO</p>
<p class="mps23456546">BAR</p>
<p class="mps23456546">BAZ</p>
Length: 163

Original issue reported on code.google.com by azla...@google.com on 20 Jul 2011 at 3:33

@GoogleCodeExporter
Copy link
Author

This can be high impact if the text being duplicated includes a background-url 
that we inline.

Original comment by jmara...@google.com on 24 May 2012 at 7:37

  • Changed state: Accepted

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

1 participant