Automattic\WooCommerce\Blocks\BlockTypes\OrderConfirmation

Downloads::get_inline_styles()protectedWC 1.0

Enqueue frontend assets for this block, just in time for rendering.

Method of the class: Downloads{}

No Hooks.

Return

String.

Usage

// protected - for code of main (parent) or child class
$result = $this->get_inline_styles( $attributes );
$attributes(array) (required)
Any attributes that currently are available from the block.

Downloads::get_inline_styles() code WC 9.0.1

protected function get_inline_styles( array $attributes ) {
	$link_classes_and_styles       = StyleAttributesUtils::get_link_color_class_and_style( $attributes );
	$link_hover_classes_and_styles = StyleAttributesUtils::get_link_hover_color_class_and_style( $attributes );
	$border_classes_and_styles     = StyleAttributesUtils::get_classes_and_styles_by_attributes( $attributes, [ 'border_color', 'border_radius', 'border_width', 'border_style' ] );

	return '
		.wc-block-order-confirmation-downloads__table a {' . $link_classes_and_styles['style'] . '}
		.wc-block-order-confirmation-downloads__table a:hover, .wc-block-order-confirmation-downloads__table a:focus {' . $link_hover_classes_and_styles['style'] . '}
		.wc-block-order-confirmation-downloads__table {' . $border_classes_and_styles['styles'] . '}
		.wc-block-order-confirmation-downloads__table th, .wc-block-order-confirmation-downloads__table td {' . $border_classes_and_styles['styles'] . '}
	';
}