def _add_style_recursive(
        self, style: ComponentStyle, theme: Component | None = None
    ) -> Component:
        """Add style to the component and its children.

        Args:
            style: The style to add.
            theme: The theme to add.

        Returns:
            The component with the style added.
        """
        new_self = super()._add_style_recursive(style, theme)

        are_components_touched = False

        if isinstance(self.contents, Var):
            for component in _components_from_var(self.contents):
                if isinstance(component, Component):
                    component._add_style_recursive(style, theme)
                    are_components_touched = True

        if are_components_touched:
            GLOBAL_CACHE.clear()

        return new_self
Add style to the component and its children.

        Args:
            style: The style to add.
            theme: The theme to add.

        Returns:
            The component with the style added.
        
reflex/components/base/bare.py