inline-style icon indicating copy to clipboard operation
inline-style copied to clipboard

added ignore and only css selectors to the stylesheet parsing

Open azt3k opened this issue 11 years ago • 0 comments

This gives enough flexibility to selectively include or exclude external style sheets. The main reason I needed this was to provide a workaround for bypassing an external style sheet with @font-face declarations.

<link id="google-font" href='http://fonts.googleapis.com/css?family=Open+Sans:400' rel='stylesheet' type='text/css'>
<link href='css/styles.css' rel='stylesheet' type='text/css'>
html = File.read 'path/to/file.html'
html = InlineStyle.process html, stylesheets_path: 'src', ignore: '#google-font'

azt3k avatar Jul 02 '14 08:07 azt3k