View Single Post
Old 05-20-2016, 11:53 PM   #5
kovidgoyal
creator of calibre
kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.
 
kovidgoyal's Avatar
 
Posts: 45,382
Karma: 27756918
Join Date: Oct 2006
Location: Mumbai, India
Device: Various
@KevinH: Perhaps you should add a note that this plugin can destroy your styles, since there is no way to robustly convert an inline style to a class based style. The CSS selector specificity will always be wrong. For example

Code:
#test {
color: red
}


<span id="test" style="color:green">test</test>
will render green before this plugin runs and red after it runs.

This is because in the CSS cascading spec the specificity of an inline style declaration is always higher than the specificity of any selector based rule.
kovidgoyal is offline   Reply With Quote