Liking cljdoc? Tell your friends :D

thereisnodot.utils.css

CSS inliner for HTML. Based on

CSS inliner for HTML. Based on 
raw docstring

inline-css-of-a-htmlclj

(inline-css-of-a-html html-string)
(inline-css-of-a-html html-string params)

The implementation is based upon: https://stackoverflow.com/a/4521740/3362518

Will inline css of a given HTML string Does not take into account linked CSS (CSS that is passed through link HTML tag) Available params are: :silent?, :strip-class?, :delete-style?

  • :silent? (true by default) will suppress potential errors e.g. (@media selectors), and continue inlining. When set to false will throw SelectorParseException
  • :strip-class? (true by default) will remove classes from the html
  • :delete-style? (true by default) will remove style tags from the source

will return a vector of two. First with inlined HTML, second with errors that occured during the inlining. In case of :silent? false the second vector will be empty.

The implementation is based upon:  https://stackoverflow.com/a/4521740/3362518

Will inline css of a given HTML string
Does not take into account linked CSS (CSS that is passed through `link` HTML tag) 
Available params are: `:silent?`, `:strip-class?`, `:delete-style?`

* `:silent?` (`true` by default) will suppress potential errors e.g. (@media selectors), 
   and continue inlining. When set to `false` will throw `SelectorParseException`
* `:strip-class?` (`true` by default)  will remove classes from the html
* `:delete-style?` (`true` by default) will remove `style` tags from the source

will return a vector of two. First with inlined HTML, second with errors that occured during the inlining. In case of `:silent?` `false` the second vector will be empty. 
sourceraw docstring

cljdoc is a website building & hosting documentation for Clojure/Script libraries

× close