Creates a robust CSS selector that works regardless of panel structure. This is the main function that layer processors should use.
generate_robust_selector(
grob,
element_type,
svg_element,
plot_index = NULL,
max_elements = NULL
)A robust CSS selector string, or NULL if element not found
The grob tree to analyze
The element type to search for (e.g., "rect", "lines")
The SVG element to target (e.g., "rect", "polyline")
Optional plot index for multipanel layouts
Optional limit on number of elements to target