| @@ -53,15 +53,17 @@ | ||
| 53 | 53 | $css_generator->add_class_styles( |
| 54 | 54 | '{{WRAPPER}} .ablocks-divider__element-icon .ablocks-icon-wrap', |
| 55 | 55 | Icon::get_wrapper_css( $attributes ), |
| 56 | 56 | Icon::get_wrapper_css( $attributes, 'Tablet' ), |
| 57 | - Icon::get_wrapper_css( $attributes, 'Mobile' ) | |
| 57 | + Icon::get_wrapper_css( $attributes, 'Mobile' ), | |
| 58 | + $css_generator->custom_device_map( function ( $device ) use ( $attributes ) { return Icon::get_wrapper_css( $attributes, $device ); } ) | |
| 58 | 59 | ); |
| 59 | 60 | $css_generator->add_class_styles( |
| 60 | 61 | '{{WRAPPER}} .ablocks-divider__element-icon .ablocks-icon-wrap:hover', |
| 61 | 62 | Icon::get_wrapper_hover_css( $attributes ), |
| 62 | 63 | Icon::get_wrapper_hover_css( $attributes, 'Tablet' ), |
| 63 | - Icon::get_wrapper_hover_css( $attributes, 'Mobile' ) | |
| 64 | + Icon::get_wrapper_hover_css( $attributes, 'Mobile' ), | |
| 65 | + $css_generator->custom_device_map( function ( $device ) use ( $attributes ) { return Icon::get_wrapper_hover_css( $attributes, $device ); } ) | |
| 64 | 66 | ); |
| 65 | 67 | |
| 66 | 68 | $css_generator->add_class_styles( |
| 67 | 69 | '{{WRAPPER}} .ablocks-divider__element-icon .ablocks-icon-wrap', |
| @@ -66,9 +68,10 @@ | ||
| 66 | 68 | $css_generator->add_class_styles( |
| 67 | 69 | '{{WRAPPER}} .ablocks-divider__element-icon .ablocks-icon-wrap', |
| 68 | 70 | array_merge( Icon::get_wrapper_css( $attributes ), $this->get_icon_spacing_margins( $attributes, '' ) ), |
| 69 | 71 | array_merge( Icon::get_wrapper_css( $attributes, 'Tablet' ), $this->get_icon_spacing_margins( $attributes, 'Tablet' ) ), |
| 70 | - array_merge( Icon::get_wrapper_css( $attributes, 'Mobile' ), $this->get_icon_spacing_margins( $attributes, 'Mobile' ) ) | |
| 72 | + array_merge( Icon::get_wrapper_css( $attributes, 'Mobile' ), $this->get_icon_spacing_margins( $attributes, 'Mobile' ) ), | |
| 73 | + $css_generator->custom_device_map( function ( $device ) use ( $attributes ) { return array_merge( Icon::get_wrapper_css( $attributes, $device ), $this->get_icon_spacing_margins( $attributes, $device ) ); } ) | |
| 71 | 74 | ); |
| 72 | 75 | $css_generator->add_class_styles( |
| 73 | 76 | '{{WRAPPER}} .ablocks-divider__element-icon .ablocks-icon-wrap img.ablocks-image-icon', |
| 74 | 77 | Icon::get_element_image_css( $attributes ), |
| @@ -102,8 +105,9 @@ | ||
| 102 | 105 | .ablocks-block--divider .ablocks-block-container', |
| 103 | 106 | $this->get_wrapper_css( $attributes ), |
| 104 | 107 | $this->get_wrapper_css( $attributes, 'Tablet' ), |
| 105 | 108 | $this->get_wrapper_css( $attributes, 'Mobile' ), |
| 109 | + $css_generator->custom_device_map( function ( $device ) use ( $attributes ) { return $this->get_wrapper_css( $attributes, $device ); } ) | |
| 106 | 110 | ); |
| 107 | 111 | |
| 108 | 112 | $css_generator->add_class_styles( |
| 109 | 113 | '{{WRAPPER}}.ablocks-block--divider:not(.ablocks-has-block-container), |
| @@ -109,9 +113,10 @@ | ||
| 109 | 113 | '{{WRAPPER}}.ablocks-block--divider:not(.ablocks-has-block-container), |
| 110 | 114 | .ablocks-block--divider .ablocks-block-container', |
| 111 | 115 | $this->get_divider_container_css( $attributes ), |
| 112 | 116 | $this->get_divider_container_css( $attributes, 'Tablet' ), |
| 113 | - $this->get_divider_container_css( $attributes, 'Mobile' ) | |
| 117 | + $this->get_divider_container_css( $attributes, 'Mobile' ), | |
| 118 | + $css_generator->custom_device_map( function ( $device ) use ( $attributes ) { return $this->get_divider_container_css( $attributes, $device ); } ) | |
| 114 | 119 | ); |
| 115 | 120 | |
| 116 | 121 | $css_generator->add_class_styles( |
| 117 | 122 | '{{WRAPPER}} .ablocks-divider', |
| @@ -117,8 +122,9 @@ | ||
| 117 | 122 | '{{WRAPPER}} .ablocks-divider', |
| 118 | 123 | $this->get_divider_css( $attributes ), |
| 119 | 124 | $this->get_divider_css( $attributes, 'Tablet' ), |
| 120 | 125 | $this->get_divider_css( $attributes, 'Mobile' ), |
| 126 | + $css_generator->custom_device_map( function ( $device ) use ( $attributes ) { return $this->get_divider_css( $attributes, $device ); } ) | |
| 121 | 127 | ); |
| 122 | 128 | // element text |
| 123 | 129 | |
| 124 | 130 | $css_generator->add_class_styles( |
| @@ -125,8 +131,9 @@ | ||
| 125 | 131 | '{{WRAPPER}} .ablocks-divider__element-text', |
| 126 | 132 | $this->get_divider_element_text_css( $attributes ), |
| 127 | 133 | $this->get_divider_element_text_css( $attributes, 'Tablet' ), |
| 128 | 134 | $this->get_divider_element_text_css( $attributes, 'Mobile' ), |
| 135 | + $css_generator->custom_device_map( function ( $device ) use ( $attributes ) { return $this->get_divider_element_text_css( $attributes, $device ); } ) | |
| 129 | 136 | ); |
| 130 | 137 | // Icon Style |
| 131 | 138 | $css_generator->add_class_styles( |
| 132 | 139 | '{{WRAPPER}} .ablocks-divider__element-icon .ablocks-icon-wrap', |
| @@ -131,21 +138,24 @@ | ||
| 131 | 138 | $css_generator->add_class_styles( |
| 132 | 139 | '{{WRAPPER}} .ablocks-divider__element-icon .ablocks-icon-wrap', |
| 133 | 140 | Icon::get_wrapper_css( $attributes ), |
| 134 | 141 | Icon::get_wrapper_css( $attributes, 'Tablet' ), |
| 135 | - Icon::get_wrapper_css( $attributes, 'Mobile' ) | |
| 142 | + Icon::get_wrapper_css( $attributes, 'Mobile' ), | |
| 143 | + $css_generator->custom_device_map( function ( $device ) use ( $attributes ) { return Icon::get_wrapper_css( $attributes, $device ); } ) | |
| 136 | 144 | ); |
| 137 | 145 | $css_generator->add_class_styles( |
| 138 | 146 | '{{WRAPPER}} .ablocks-divider__element-icon .ablocks-icon-wrap:hover', |
| 139 | 147 | Icon::get_wrapper_hover_css( $attributes ), |
| 140 | 148 | Icon::get_wrapper_hover_css( $attributes, 'Tablet' ), |
| 141 | - Icon::get_wrapper_hover_css( $attributes, 'Mobile' ) | |
| 149 | + Icon::get_wrapper_hover_css( $attributes, 'Mobile' ), | |
| 150 | + $css_generator->custom_device_map( function ( $device ) use ( $attributes ) { return Icon::get_wrapper_hover_css( $attributes, $device ); } ) | |
| 142 | 151 | ); |
| 143 | 152 | $css_generator->add_class_styles( |
| 144 | 153 | '{{WRAPPER}} .ablocks-divider__element-icon .ablocks-icon-wrap', |
| 145 | 154 | array_merge( Icon::get_wrapper_css( $attributes ), $this->get_icon_spacing_margins( $attributes, '' ) ), |
| 146 | 155 | array_merge( Icon::get_wrapper_css( $attributes, 'Tablet' ), $this->get_icon_spacing_margins( $attributes, 'Tablet' ) ), |
| 147 | - array_merge( Icon::get_wrapper_css( $attributes, 'Mobile' ), $this->get_icon_spacing_margins( $attributes, 'Mobile' ) ) | |
| 156 | + array_merge( Icon::get_wrapper_css( $attributes, 'Mobile' ), $this->get_icon_spacing_margins( $attributes, 'Mobile' ) ), | |
| 157 | + $css_generator->custom_device_map( function ( $device ) use ( $attributes ) { return array_merge( Icon::get_wrapper_css( $attributes, $device ), $this->get_icon_spacing_margins( $attributes, $device ) ); } ) | |
| 148 | 158 | ); |
| 149 | 159 | $css_generator->add_class_styles( |
| 150 | 160 | '{{WRAPPER}} .ablocks-divider__element-icon .ablocks-icon-wrap img.ablocks-image-icon', |
| 151 | 161 | Icon::get_element_image_css( $attributes ), |
| @@ -150,8 +160,9 @@ | ||
| 150 | 160 | '{{WRAPPER}} .ablocks-divider__element-icon .ablocks-icon-wrap img.ablocks-image-icon', |
| 151 | 161 | Icon::get_element_image_css( $attributes ), |
| 152 | 162 | Icon::get_element_image_css( $attributes, 'Tablet' ), |
| 153 | 163 | Icon::get_element_image_css( $attributes, 'Mobile' ), |
| 164 | + $css_generator->custom_device_map( function ( $device ) use ( $attributes ) { return Icon::get_element_image_css( $attributes, $device ); } ) | |
| 154 | 165 | ); |
| 155 | 166 | $css_generator->add_class_styles( |
| 156 | 167 | '{{WRAPPER}} .ablocks-divider__element-icon .ablocks-icon-wrap img.ablocks-image-icon:hover', |
| 157 | 168 | Icon::get_element_image_hover_css( $attributes ), |
| @@ -156,8 +167,9 @@ | ||
| 156 | 167 | '{{WRAPPER}} .ablocks-divider__element-icon .ablocks-icon-wrap img.ablocks-image-icon:hover', |
| 157 | 168 | Icon::get_element_image_hover_css( $attributes ), |
| 158 | 169 | Icon::get_element_image_hover_css( $attributes, 'Tablet' ), |
| 159 | 170 | Icon::get_element_image_hover_css( $attributes, 'Mobile' ), |
| 171 | + $css_generator->custom_device_map( function ( $device ) use ( $attributes ) { return Icon::get_element_image_hover_css( $attributes, $device ); } ) | |
| 160 | 172 | ); |
| 161 | 173 | $css_generator->add_class_styles( |
| 162 | 174 | '{{WRAPPER}} .ablocks-divider__element-icon .ablocks-icon-wrap svg.ablocks-svg-icon', |
| 163 | 175 | Icon::get_element_css( $attributes ), |
| @@ -162,8 +174,9 @@ | ||
| 162 | 174 | '{{WRAPPER}} .ablocks-divider__element-icon .ablocks-icon-wrap svg.ablocks-svg-icon', |
| 163 | 175 | Icon::get_element_css( $attributes ), |
| 164 | 176 | Icon::get_element_css( $attributes, 'Tablet' ), |
| 165 | 177 | Icon::get_element_css( $attributes, 'Mobile' ), |
| 178 | + $css_generator->custom_device_map( function ( $device ) use ( $attributes ) { return Icon::get_element_css( $attributes, $device ); } ) | |
| 166 | 179 | ); |
| 167 | 180 | $css_generator->add_class_styles( |
| 168 | 181 | '{{WRAPPER}} .ablocks-divider__element-icon .ablocks-icon-wrap svg.ablocks-svg-icon:hover', |
| 169 | 182 | Icon::get_element_image_hover_css( $attributes ), |
| @@ -168,8 +181,9 @@ | ||
| 168 | 181 | '{{WRAPPER}} .ablocks-divider__element-icon .ablocks-icon-wrap svg.ablocks-svg-icon:hover', |
| 169 | 182 | Icon::get_element_image_hover_css( $attributes ), |
| 170 | 183 | Icon::get_element_image_hover_css( $attributes, 'Tablet' ), |
| 171 | 184 | Icon::get_element_image_hover_css( $attributes, 'Mobile' ), |
| 185 | + $css_generator->custom_device_map( function ( $device ) use ( $attributes ) { return Icon::get_element_image_hover_css( $attributes, $device ); } ) | |
| 172 | 186 | ); |
| 173 | 187 | return $css_generator->generate_css(); |
| 174 | 188 | } |
| 175 | 189 | public function build_css( $attributes ) { |