Interface CssInline
- All Known Implementing Classes:
CssInlineImpl
public interface CssInline
-
Nested Class Summary
Nested ClassesModifier and TypeInterfaceDescriptionstatic classstatic classstatic class -
Method Summary
Modifier and TypeMethodDescriptiongetElementStyles(String html, String selector) Moves the CSS rules from the<style>blocks in the document head to the elements and returns all styles of the first element that matches the selector.getElementStyles(String html, String selector, Predicate<CssInline.Rule> ruleFilter) Same asgetElementStyles(String, String), but only inlines the rules for which the givenruleFilterpredicate returnstrue.Moves the CSS rules from the<style>blocks in the document head to the elements.Moves the CSS rules from the<style>blocks in the document head to the elements and also inlines the given CSS into the html using `style` attributes.
-
Method Details
-
inlineCss
-
inlineCss
-
getElementStyles
Moves the CSS rules from the<style>blocks in the document head to the elements and returns all styles of the first element that matches the selector.- Parameters:
html- HTML string with styles in document headselector- The element to select (styles for first matching element are returned)- Returns:
- all styles of the first element that matches the selector.
-
getElementStyles
Map<String,String> getElementStyles(String html, String selector, Predicate<CssInline.Rule> ruleFilter) Same asgetElementStyles(String, String), but only inlines the rules for which the givenruleFilterpredicate returnstrue.
-