PluginProbe
Elementor Website Builder – more than just a page builder / trunk
Elementor Website Builder – more than just a page builder vtrunk
4.3.3 4.3.2 4.3.1 4.3.0 4.3.0-beta3 4.3.0-beta2 4.3.0-beta1 4.2.4 4.2.3 4.2.2 4.2.1 4.2.0 4.1.5 4.2.0-beta2 4.2.0-dev2 4.2.0-beta1 4.1.4 4.1.3 4.1.2 4.1.1 4.1.0 4.1.0-beta3 4.1.0-dev3 4.0.9 4.1.0-beta2 All 456 releases
← All changes | modules/atomic-widgets/css-converter/expanders/background-shorthand-expander.php +15 -1 4.2.0-beta1 → trunk View file →
@@ -46,9 +46,23 @@
46 46 protected function get_supported_properties(): array {
47 47 return [ 'background' ];
48 48 }
49 49
50 - public function expand( array $rule ): array {
50 + const ALL_LONGHANDS = [
51 + 'background-image',
52 + 'background-repeat',
53 + 'background-attachment',
54 + 'background-position',
55 + 'background-size',
56 + 'background-clip',
57 + 'background-color',
58 + ];
59 +
60 + protected function expand_null( array $rule ): array {
61 + return array_map( fn( $p ) => $this->null_rule( $p ), self::ALL_LONGHANDS );
62 + }
63 +
64 + protected function do_expand( array $rule ): array {
51 65 $layers = Css_Token_Splitter::split_by_comma( trim( $rule['value'] ) );
52 66
53 67 if ( empty( $layers ) ) {
54 68 return [];