| @@ -52,15 +52,17 @@ | ||
| 52 | 52 | $css_generator->add_class_styles( |
| 53 | 53 | '{{WRAPPER}}.ablocks-block--counter--bar .ablocks-bar-counter__progress', |
| 54 | 54 | $this->get_counter_bar_progress_css( $attributes ), |
| 55 | 55 | $this->get_counter_bar_progress_css( $attributes, 'Tablet' ), |
| 56 | - $this->get_counter_bar_progress_css( $attributes, 'Mobile' ) | |
| 56 | + $this->get_counter_bar_progress_css( $attributes, 'Mobile' ), | |
| 57 | + $css_generator->custom_device_map( function ( $device ) use ( $attributes ) { return $this->get_counter_bar_progress_css( $attributes, $device ); } ) | |
| 57 | 58 | ); |
| 58 | 59 | $css_generator->add_class_styles( |
| 59 | 60 | '{{WRAPPER}}.ablocks-block--counter--circle', |
| 60 | 61 | $this->get_counter_circle_css( $attributes ), |
| 61 | 62 | $this->get_counter_circle_css( $attributes, 'Tablet' ), |
| 62 | - $this->get_counter_circle_css( $attributes, 'Mobile' ) | |
| 63 | + $this->get_counter_circle_css( $attributes, 'Mobile' ), | |
| 64 | + $css_generator->custom_device_map( function ( $device ) use ( $attributes ) { return $this->get_counter_circle_css( $attributes, $device ); } ) | |
| 63 | 65 | ); |
| 64 | 66 | $css_generator->add_class_styles( |
| 65 | 67 | '{{WRAPPER}}.ablocks-block--counter--circle .ablocks-circle-counter__background', |
| 66 | 68 | $this->get_counter_circle_bg_css( $attributes ) |
| @@ -74,15 +76,17 @@ | ||
| 74 | 76 | $css_generator->add_class_styles( |
| 75 | 77 | '{{WRAPPER}} .ablocks-icon-wrap', |
| 76 | 78 | Icon::get_wrapper_css( $attributes ), |
| 77 | 79 | Icon::get_wrapper_css( $attributes, 'Tablet' ), |
| 78 | - Icon::get_wrapper_css( $attributes, 'Mobile' ) | |
| 80 | + Icon::get_wrapper_css( $attributes, 'Mobile' ), | |
| 81 | + $css_generator->custom_device_map( function ( $device ) use ( $attributes ) { return Icon::get_wrapper_css( $attributes, $device ); } ) | |
| 79 | 82 | ); |
| 80 | 83 | $css_generator->add_class_styles( |
| 81 | 84 | '{{WRAPPER}} .ablocks-icon-wrap:hover', |
| 82 | 85 | Icon::get_wrapper_hover_css( $attributes ), |
| 83 | 86 | Icon::get_wrapper_hover_css( $attributes, 'Tablet' ), |
| 84 | - Icon::get_wrapper_hover_css( $attributes, 'Mobile' ) | |
| 87 | + Icon::get_wrapper_hover_css( $attributes, 'Mobile' ), | |
| 88 | + $css_generator->custom_device_map( function ( $device ) use ( $attributes ) { return Icon::get_wrapper_hover_css( $attributes, $device ); } ) | |
| 85 | 89 | ); |
| 86 | 90 | |
| 87 | 91 | $css_generator->add_class_styles( |
| 88 | 92 | '{{WRAPPER}} .ablocks-icon-wrap img.ablocks-image-icon', |
| @@ -119,8 +123,9 @@ | ||
| 119 | 123 | {{WRAPPER}}.ablocks-block--counter--bar .ablocks-block-container', |
| 120 | 124 | $this->get_counter_bar_css( $attributes ), |
| 121 | 125 | $this->get_counter_bar_css( $attributes, 'Tablet' ), |
| 122 | 126 | $this->get_counter_bar_css( $attributes, 'Mobile' ), |
| 127 | + $css_generator->custom_device_map( function ( $device ) use ( $attributes ) { return $this->get_counter_bar_css( $attributes, $device ); } ) | |
| 123 | 128 | ); |
| 124 | 129 | $css_generator->add_class_styles( |
| 125 | 130 | '{{WRAPPER}}.ablocks-block--counter--number:not(.ablocks-has-container), |
| 126 | 131 | {{WRAPPER}}.ablocks-block--counter--number .ablocks-block-container', |
| @@ -126,8 +131,9 @@ | ||
| 126 | 131 | {{WRAPPER}}.ablocks-block--counter--number .ablocks-block-container', |
| 127 | 132 | $this->get_number_wrapper_css( $attributes ), |
| 128 | 133 | $this->get_number_wrapper_css( $attributes, 'Tablet' ), |
| 129 | 134 | $this->get_number_wrapper_css( $attributes, 'Mobile' ), |
| 135 | + $css_generator->custom_device_map( function ( $device ) use ( $attributes ) { return $this->get_number_wrapper_css( $attributes, $device ); } ) | |
| 130 | 136 | ); |
| 131 | 137 | // number text css |
| 132 | 138 | $css_generator->add_class_styles( |
| 133 | 139 | '{{WRAPPER}} .ablocks-counter__content', |
| @@ -133,8 +139,9 @@ | ||
| 133 | 139 | '{{WRAPPER}} .ablocks-counter__content', |
| 134 | 140 | $this->get_number_text_css( $attributes ), |
| 135 | 141 | $this->get_number_text_css( $attributes, 'Tablet' ), |
| 136 | 142 | $this->get_number_text_css( $attributes, 'Mobile' ), |
| 143 | + $css_generator->custom_device_map( function ( $device ) use ( $attributes ) { return $this->get_number_text_css( $attributes, $device ); } ) | |
| 137 | 144 | ); |
| 138 | 145 | // heading text css |
| 139 | 146 | $css_generator->add_class_styles( |
| 140 | 147 | '{{WRAPPER}} .ablocks-counter__text', |
| @@ -140,8 +147,9 @@ | ||
| 140 | 147 | '{{WRAPPER}} .ablocks-counter__text', |
| 141 | 148 | $this->get_heading_text_css( $attributes ), |
| 142 | 149 | $this->get_heading_text_css( $attributes, 'Tablet' ), |
| 143 | 150 | $this->get_heading_text_css( $attributes, 'Mobile' ), |
| 151 | + $css_generator->custom_device_map( function ( $device ) use ( $attributes ) { return $this->get_heading_text_css( $attributes, $device ); } ) | |
| 144 | 152 | ); |
| 145 | 153 | // counter bar css |
| 146 | 154 | |
| 147 | 155 | // counter circle css |
| @@ -153,9 +161,10 @@ | ||
| 153 | 161 | $css_generator->add_class_styles( |
| 154 | 162 | '{{WRAPPER}}.ablocks-block--counter--bar .ablocks-bar-counter__progress', |
| 155 | 163 | $this->get_counter_bar_progress_css( $attributes ), |
| 156 | 164 | $this->get_counter_bar_progress_css( $attributes, 'Tablet' ), |
| 157 | - $this->get_counter_bar_progress_css( $attributes, 'Mobile' ) | |
| 165 | + $this->get_counter_bar_progress_css( $attributes, 'Mobile' ), | |
| 166 | + $css_generator->custom_device_map( function ( $device ) use ( $attributes ) { return $this->get_counter_bar_progress_css( $attributes, $device ); } ) | |
| 158 | 167 | ); |
| 159 | 168 | |
| 160 | 169 | // double for transform rotate issue in frontend |
| 161 | 170 | $css_generator->add_class_styles( |
| @@ -161,9 +170,10 @@ | ||
| 161 | 170 | $css_generator->add_class_styles( |
| 162 | 171 | '{{WRAPPER}}.ablocks-block--counter--circle:not(.ablocks-has-block-container)', |
| 163 | 172 | $this->get_counter_circle_css( $attributes ), |
| 164 | 173 | $this->get_counter_circle_css( $attributes, 'Tablet' ), |
| 165 | - $this->get_counter_circle_css( $attributes, 'Mobile' ) | |
| 174 | + $this->get_counter_circle_css( $attributes, 'Mobile' ), | |
| 175 | + $css_generator->custom_device_map( function ( $device ) use ( $attributes ) { return $this->get_counter_circle_css( $attributes, $device ); } ) | |
| 166 | 176 | ); |
| 167 | 177 | |
| 168 | 178 | $css_generator->add_class_styles( |
| 169 | 179 | '{{WRAPPER}} .ablocks-block-container', |
| @@ -168,9 +178,10 @@ | ||
| 168 | 178 | $css_generator->add_class_styles( |
| 169 | 179 | '{{WRAPPER}} .ablocks-block-container', |
| 170 | 180 | $this->get_counter_circle_css( $attributes ), |
| 171 | 181 | $this->get_counter_circle_css( $attributes, 'Tablet' ), |
| 172 | - $this->get_counter_circle_css( $attributes, 'Mobile' ) | |
| 182 | + $this->get_counter_circle_css( $attributes, 'Mobile' ), | |
| 183 | + $css_generator->custom_device_map( function ( $device ) use ( $attributes ) { return $this->get_counter_circle_css( $attributes, $device ); } ) | |
| 173 | 184 | ); |
| 174 | 185 | $css_generator->add_class_styles( |
| 175 | 186 | '{{WRAPPER}}.ablocks-block--counter--circle .ablocks-circle-counter__background', |
| 176 | 187 | $this->get_counter_circle_bg_css( $attributes ) |
| @@ -184,15 +195,17 @@ | ||
| 184 | 195 | $css_generator->add_class_styles( |
| 185 | 196 | '{{WRAPPER}} .ablocks-icon-wrap', |
| 186 | 197 | Icon::get_wrapper_css( $attributes ), |
| 187 | 198 | Icon::get_wrapper_css( $attributes, 'Tablet' ), |
| 188 | - Icon::get_wrapper_css( $attributes, 'Mobile' ) | |
| 199 | + Icon::get_wrapper_css( $attributes, 'Mobile' ), | |
| 200 | + $css_generator->custom_device_map( function ( $device ) use ( $attributes ) { return Icon::get_wrapper_css( $attributes, $device ); } ) | |
| 189 | 201 | ); |
| 190 | 202 | $css_generator->add_class_styles( |
| 191 | 203 | '{{WRAPPER}} .ablocks-icon-wrap:hover', |
| 192 | 204 | Icon::get_wrapper_hover_css( $attributes ), |
| 193 | 205 | Icon::get_wrapper_hover_css( $attributes, 'Tablet' ), |
| 194 | - Icon::get_wrapper_hover_css( $attributes, 'Mobile' ) | |
| 206 | + Icon::get_wrapper_hover_css( $attributes, 'Mobile' ), | |
| 207 | + $css_generator->custom_device_map( function ( $device ) use ( $attributes ) { return Icon::get_wrapper_hover_css( $attributes, $device ); } ) | |
| 195 | 208 | ); |
| 196 | 209 | $css_generator->add_class_styles( |
| 197 | 210 | '{{WRAPPER}} .ablocks-icon-wrap img.ablocks-image-icon', |
| 198 | 211 | Icon::get_element_image_css( $attributes ), |
| @@ -197,8 +210,9 @@ | ||
| 197 | 210 | '{{WRAPPER}} .ablocks-icon-wrap img.ablocks-image-icon', |
| 198 | 211 | Icon::get_element_image_css( $attributes ), |
| 199 | 212 | Icon::get_element_image_css( $attributes, 'Tablet' ), |
| 200 | 213 | Icon::get_element_image_css( $attributes, 'Mobile' ), |
| 214 | + $css_generator->custom_device_map( function ( $device ) use ( $attributes ) { return Icon::get_element_image_css( $attributes, $device ); } ) | |
| 201 | 215 | ); |
| 202 | 216 | $css_generator->add_class_styles( |
| 203 | 217 | '{{WRAPPER}} .ablocks-icon-wrap img.ablocks-image-icon:hover', |
| 204 | 218 | Icon::get_element_image_hover_css( $attributes ), |
| @@ -203,8 +217,9 @@ | ||
| 203 | 217 | '{{WRAPPER}} .ablocks-icon-wrap img.ablocks-image-icon:hover', |
| 204 | 218 | Icon::get_element_image_hover_css( $attributes ), |
| 205 | 219 | Icon::get_element_image_hover_css( $attributes, 'Tablet' ), |
| 206 | 220 | Icon::get_element_image_hover_css( $attributes, 'Mobile' ), |
| 221 | + $css_generator->custom_device_map( function ( $device ) use ( $attributes ) { return Icon::get_element_image_hover_css( $attributes, $device ); } ) | |
| 207 | 222 | ); |
| 208 | 223 | $css_generator->add_class_styles( |
| 209 | 224 | '{{WRAPPER}} .ablocks-icon-wrap svg.ablocks-svg-icon', |
| 210 | 225 | Icon::get_element_css( $attributes ), |
| @@ -209,8 +224,9 @@ | ||
| 209 | 224 | '{{WRAPPER}} .ablocks-icon-wrap svg.ablocks-svg-icon', |
| 210 | 225 | Icon::get_element_css( $attributes ), |
| 211 | 226 | Icon::get_element_css( $attributes, 'Tablet' ), |
| 212 | 227 | Icon::get_element_css( $attributes, 'Mobile' ), |
| 228 | + $css_generator->custom_device_map( function ( $device ) use ( $attributes ) { return Icon::get_element_css( $attributes, $device ); } ) | |
| 213 | 229 | ); |
| 214 | 230 | $css_generator->add_class_styles( |
| 215 | 231 | '{{WRAPPER}} .ablocks-icon-wrap svg.ablocks-svg-icon:hover', |
| 216 | 232 | Icon::get_element_image_hover_css( $attributes ), |
| @@ -215,8 +231,9 @@ | ||
| 215 | 231 | '{{WRAPPER}} .ablocks-icon-wrap svg.ablocks-svg-icon:hover', |
| 216 | 232 | Icon::get_element_image_hover_css( $attributes ), |
| 217 | 233 | Icon::get_element_image_hover_css( $attributes, 'Tablet' ), |
| 218 | 234 | Icon::get_element_image_hover_css( $attributes, 'Mobile' ), |
| 235 | + $css_generator->custom_device_map( function ( $device ) use ( $attributes ) { return Icon::get_element_image_hover_css( $attributes, $device ); } ) | |
| 219 | 236 | ); |
| 220 | 237 | |
| 221 | 238 | return $css_generator->generate_css(); |
| 222 | 239 | } |