Strategy for generating a CSS selector using the :nth-child pseudo-class.

Implements

Constructors

Methods

Constructors

Methods

  • Generates a CSS selector part for the given element using the :nth-child pseudo-class.

    Parameters

    • element: Element

      The DOM element for which to generate the selector.

    Returns null | SelectorPart

    A SelectorPart object containing the :nth-child selector and its penalty, or null if the index cannot be determined.