Class CssRuleListBuilder

java.lang.Object
de.xima.fc.css.builder.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 Details

    • CssRuleListBuilder

      public CssRuleListBuilder()
  • Method Details

    • 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:
    • toString

      public String toString()
      Overrides:
      toString in class Object