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/border-shorthand-expander.php +12 -6 4.2.0-beta1 → trunk View file →
@@ -66,11 +66,17 @@
66 66 protected function get_supported_properties(): array {
67 67 return [ $this->property ];
68 68 }
69 69
70 - public function expand( array $rule ): array {
71 - $tokens = Css_Token_Splitter::split_by_whitespace( trim( $rule['value'] ) );
70 + protected function expand_null( array $rule ): array {
71 + return array_map( fn( $p ) => $this->null_rule( $p ), array_values( $this->longhands ) );
72 + }
72 73
74 + protected function do_expand( array $rule ): array {
75 + $value = $rule['value'];
76 +
77 + $tokens = Css_Token_Splitter::split_by_whitespace( trim( $value ) );
78 +
73 79 if ( empty( $tokens ) ) {
74 80 return [];
75 81 }
76 82
@@ -91,10 +97,10 @@
91 97 }
92 98
93 99 $rules = [];
94 100
95 - foreach ( $slots as $role => $value ) {
96 - if ( null === $value ) {
101 + foreach ( $slots as $role => $slot_value ) {
102 + if ( null === $slot_value ) {
97 103 continue;
98 104 }
99 105
100 106 $property = $this->longhands[ $role ];
@@ -100,10 +106,10 @@
100 106 $property = $this->longhands[ $role ];
101 107
102 108 $rules[] = [
103 109 'property' => $property,
104 - 'value' => $value,
105 - 'declaration' => $property . ': ' . $value,
110 + 'value' => $slot_value,
111 + 'declaration' => $property . ': ' . $slot_value,
106 112 ];
107 113 }
108 114
109 115 return $rules;