get_enum(); $registry = ( new Expander_Registry() ) ->register( new Physical_To_Logical_Expander() ) ->register( new Background_Shorthand_Expander( $variables_service ) ) ->register( new Outline_Shorthand_Expander() ) ->register( new Border_Shorthand_Expander( 'border', self::border_longhands( '' ), $style_enum, $variables_service ) ); foreach ( self::BORDER_SIDES as $side ) { $registry->register( new Border_Shorthand_Expander( "border-$side", self::border_longhands( "$side-" ), $style_enum, $variables_service ) ); } return $registry; } /** * Role -> longhand property name for the all-sides (`border`, infix '') or per-side (e.g. 'top-') * shorthand. Per-side style/color have no converter and route to custom_css. * * @return array */ public static function border_longhands( string $infix ): array { return [ Border_Shorthand_Expander::ROLE_WIDTH => "border-{$infix}width", Border_Shorthand_Expander::ROLE_STYLE => "border-{$infix}style", Border_Shorthand_Expander::ROLE_COLOR => "border-{$infix}color", ]; } }