# elementor/4.3.1/modules/atomic-widgets/styles/style-props-to-css.php

Elementor Website Builder – more than just a page builder, version 4.3.1. 30 lines.

- Page: https://pluginprobe.com/plugins/elementor/4.3.1/code/modules/atomic-widgets/styles/style-props-to-css.php
- Raw: https://pluginprobe.com/plugins/elementor/4.3.1/raw/modules/atomic-widgets/styles/style-props-to-css.php
- Modified: 2026-09-01T11:47:36+00:00

Line numbers below start at 1. Link to a line or a range by appending a fragment to the
page URL, for example `https://pluginprobe.com/plugins/elementor/4.3.1/code/modules/atomic-widgets/styles/style-props-to-css.php#L10-L20`.

```php
<?php

namespace Elementor\Modules\AtomicWidgets\Styles;

use Elementor\Modules\AtomicWidgets\PropsResolver\Render_Props_Resolver;

if ( ! defined( 'ABSPATH' ) ) {
	exit;
}

class Style_Props_To_Css {

	/**
	 * Resolve a map of style PropValue envelopes into a flat `{cssProp: cssValue}` map.
	 * Null/empty resolved values are filtered out.
	 *
	 * @param array<string, mixed> $props Style props as stored (PropValue envelopes).
	 * @return array<string, string>
	 */
	public static function to_map( array $props ): array {
		if ( empty( $props ) ) {
			return [];
		}

		$resolved = Render_Props_Resolver::for_styles()->resolve( Style_Schema::get(), $props );

		return array_filter( $resolved, fn( $value ) => null !== $value && '' !== $value );
	}
}

```
