Class ElementRule

All Implemented Interfaces:
AnimationIntf<CssRule>, BackgroundIntf<CssRule>, com.oorian.css.BasicBoxIntf<CssRule>, com.oorian.css.BasicUserInterfaceIntf<CssRule>, BorderIntf<CssRule>, com.oorian.css.ColorIntf<CssRule>, CountersIntf<CssRule>, com.oorian.css.CssStyleIntf<CssRule>, com.oorian.css.FilterEffectsIntf<CssRule>, com.oorian.css.FlexibleBoxLayoutIntf<CssRule>, com.oorian.css.FontIntf<CssRule>, com.oorian.css.GeneratedContentForPagedMediaIntf<CssRule>, com.oorian.css.ImageValuesAndReplacedContentIntf<CssRule>, com.oorian.css.ListIntf<CssRule>, com.oorian.css.MarqueeIntf<CssRule>, com.oorian.css.MaskingIntf<CssRule>, com.oorian.css.MultiColumnLayoutIntf<CssRule>, PagedMediaIntf<CssRule>, com.oorian.css.SpeechIntf<CssRule>, com.oorian.css.TableIntf<CssRule>, com.oorian.css.TextDecorationIntf<CssRule>, com.oorian.css.TextIntf<CssRule>, com.oorian.css.TransformIntf<CssRule>, com.oorian.css.TransitionIntf<CssRule>, com.oorian.css.WritingModeIntf<CssRule>
Direct Known Subclasses:
TagRule

public class ElementRule extends CssRule
Represents a CSS rule that targets HTML elements by their tag name.

ElementRule creates CSS selectors that match elements by their HTML tag name. Multiple elements can be specified to create a grouped selector rule.

Example usage:

 ElementRule headings = new ElementRule("h1", "h2", "h3");
 headings.setColor(Color.DARK_BLUE);
 // Generates: h1, h2, h3 { color: darkblue; }
 
Author:
Marvin P. Warble Jr.
See Also:
  • Constructor Details

    • ElementRule

      public ElementRule(String... elements)
      Constructs an element rule targeting the specified HTML elements.
      Parameters:
      elements - One or more HTML tag names to target.