• Provides a Svelte action that applies inline styles for padding to a parent element or absolute positioning to the action element adjusting for any painted borders defined by CSS border-image properties of the target node / element of this action.

    When enabled, this action computes the effective visual edge insets / painted border using #runtime/util/dom/style!StyleMetric.getVisualEdgeInsets and applies these constraints to either padding or absolute inline styles so the element aligns correctly within the visible (non-border) content area of its container.

    Additionally, this action subscribes to #runtime/util/dom/theme!ThemeObserver and updates constraint calculations when any global theme is changed. To force an update of constraint calculations provide and change a superfluous / dummy property in the action options.

    You may also provide no action option, but provide a store and the visual edge constraint calculations will be updated in the store with no inline styles applied to an element.

    Parameters

    Returns ActionReturn<VisualEdgeInsetsOptions>

    Action Lifecycle functions.