Class CssRuleListBuilder


  • public final class CssRuleListBuilder
    extends Object
    Simple builder for creating a CSS rule list string, e.g. .foo { color: red; }
    Author:
    XIMA MEDIA GmbH
    • Constructor Detail

      • CssRuleListBuilder

        public CssRuleListBuilder()
    • Method Detail

      • build

        public String build()
        Returns:
        The string representing the CSS rule list.
      • rule

        public CssRuleListBuilder rule​(Object selector,
                                       Object declarationList)
        .foo { color: red; }

        Adds a qualified rule to the list of rules.

        See declarationList() for an easy way to create a declaration.

        Parameters:
        selector - Selector to which the declarations apply.
        declarationList - A list of declarations applied to all elements matching the selector.
        Returns:
        This builder instance for chaining method calls.
        See Also:
        CssBuilder.declarationList()