| @@ -28,15 +28,17 @@ | ||
| 28 | 28 | $css_generator->add_class_styles( |
| 29 | 29 | '{{WRAPPER}} .ablocks-block-tabs', |
| 30 | 30 | $this->get_tabs_css( $attributes ), |
| 31 | 31 | $this->get_tabs_css( $attributes, 'Tablet' ), |
| 32 | - $this->get_tabs_css( $attributes, 'Mobile' ) | |
| 32 | + $this->get_tabs_css( $attributes, 'Mobile' ), | |
| 33 | + $css_generator->custom_device_map( function ( $device ) use ( $attributes ) { return $this->get_tabs_css( $attributes, $device ); } ) | |
| 33 | 34 | ); |
| 34 | 35 | $css_generator->add_class_styles( |
| 35 | 36 | '{{WRAPPER}} .ablocks-block-tabs__tab-panel', |
| 36 | 37 | $this->get_tabs_panel_css( $attributes ), |
| 37 | 38 | $this->get_tabs_panel_css( $attributes, 'Tablet' ), |
| 38 | - $this->get_tabs_panel_css( $attributes, 'Mobile' ) | |
| 39 | + $this->get_tabs_panel_css( $attributes, 'Mobile' ), | |
| 40 | + $css_generator->custom_device_map( function ( $device ) use ( $attributes ) { return $this->get_tabs_panel_css( $attributes, $device ); } ) | |
| 39 | 41 | ); |
| 40 | 42 | |
| 41 | 43 | $css_generator->add_class_styles( |
| 42 | 44 | '{{WRAPPER}} .ablocks-block-tabs__tab-panel:hover', |
| @@ -41,9 +43,10 @@ | ||
| 41 | 43 | $css_generator->add_class_styles( |
| 42 | 44 | '{{WRAPPER}} .ablocks-block-tabs__tab-panel:hover', |
| 43 | 45 | $this->get_tabs_panel_hover_css( $attributes ), |
| 44 | 46 | $this->get_tabs_panel_hover_css( $attributes, 'Tablet' ), |
| 45 | - $this->get_tabs_panel_hover_css( $attributes, 'Mobile' ) | |
| 47 | + $this->get_tabs_panel_hover_css( $attributes, 'Mobile' ), | |
| 48 | + $css_generator->custom_device_map( function ( $device ) use ( $attributes ) { return $this->get_tabs_panel_hover_css( $attributes, $device ); } ) | |
| 46 | 49 | ); |
| 47 | 50 | |
| 48 | 51 | $css_generator->add_class_styles( |
| 49 | 52 | '{{WRAPPER}} .ablocks-block-tabs__tab', |
| @@ -48,9 +51,10 @@ | ||
| 48 | 51 | $css_generator->add_class_styles( |
| 49 | 52 | '{{WRAPPER}} .ablocks-block-tabs__tab', |
| 50 | 53 | $this->get_tabs_menu_content_css( $attributes ), |
| 51 | 54 | $this->get_tabs_menu_content_css( $attributes, 'Tablet' ), |
| 52 | - $this->get_tabs_menu_content_css( $attributes, 'Mobile' ) | |
| 55 | + $this->get_tabs_menu_content_css( $attributes, 'Mobile' ), | |
| 56 | + $css_generator->custom_device_map( function ( $device ) use ( $attributes ) { return $this->get_tabs_menu_content_css( $attributes, $device ); } ) | |
| 53 | 57 | ); |
| 54 | 58 | |
| 55 | 59 | $css_generator->add_class_styles( |
| 56 | 60 | '{{WRAPPER}} .ablocks-block-tabs__tab--active', |
| @@ -55,9 +59,10 @@ | ||
| 55 | 59 | $css_generator->add_class_styles( |
| 56 | 60 | '{{WRAPPER}} .ablocks-block-tabs__tab--active', |
| 57 | 61 | $this->get_tabs_menu_content_active_css( $attributes ), |
| 58 | 62 | $this->get_tabs_menu_content_active_css( $attributes, 'Tablet' ), |
| 59 | - $this->get_tabs_menu_content_active_css( $attributes, 'Mobile' ) | |
| 63 | + $this->get_tabs_menu_content_active_css( $attributes, 'Mobile' ), | |
| 64 | + $css_generator->custom_device_map( function ( $device ) use ( $attributes ) { return $this->get_tabs_menu_content_active_css( $attributes, $device ); } ) | |
| 60 | 65 | ); |
| 61 | 66 | |
| 62 | 67 | $css_generator->add_class_styles( |
| 63 | 68 | '{{WRAPPER}} .ablocks-block-tabs__tab:hover', |
| @@ -62,15 +67,17 @@ | ||
| 62 | 67 | $css_generator->add_class_styles( |
| 63 | 68 | '{{WRAPPER}} .ablocks-block-tabs__tab:hover', |
| 64 | 69 | $this->get_tabs_menu_content_hover_css( $attributes ), |
| 65 | 70 | $this->get_tabs_menu_content_hover_css( $attributes, 'Tablet' ), |
| 66 | - $this->get_tabs_menu_content_hover_css( $attributes, 'Mobile' ) | |
| 71 | + $this->get_tabs_menu_content_hover_css( $attributes, 'Mobile' ), | |
| 72 | + $css_generator->custom_device_map( function ( $device ) use ( $attributes ) { return $this->get_tabs_menu_content_hover_css( $attributes, $device ); } ) | |
| 67 | 73 | ); |
| 68 | 74 | $css_generator->add_class_styles( |
| 69 | 75 | '{{WRAPPER}} .ablocks-block-tabs__tab-menu-title', |
| 70 | 76 | $this->get_tabs_title_css( $attributes ), |
| 71 | 77 | $this->get_tabs_title_css( $attributes, 'Tablet' ), |
| 72 | - $this->get_tabs_title_css( $attributes, 'Mobile' ) | |
| 78 | + $this->get_tabs_title_css( $attributes, 'Mobile' ), | |
| 79 | + $css_generator->custom_device_map( function ( $device ) use ( $attributes ) { return $this->get_tabs_title_css( $attributes, $device ); } ) | |
| 73 | 80 | ); |
| 74 | 81 | |
| 75 | 82 | $css_generator->add_class_styles( |
| 76 | 83 | '{{WRAPPER}} .ablocks-block-tabs__tab--active .ablocks-block-tabs__tab-menu-title', |
| @@ -75,9 +82,10 @@ | ||
| 75 | 82 | $css_generator->add_class_styles( |
| 76 | 83 | '{{WRAPPER}} .ablocks-block-tabs__tab--active .ablocks-block-tabs__tab-menu-title', |
| 77 | 84 | $this->get_tabs_active_title_css( $attributes ), |
| 78 | 85 | $this->get_tabs_active_title_css( $attributes, 'Tablet' ), |
| 79 | - $this->get_tabs_active_title_css( $attributes, 'Mobile' ) | |
| 86 | + $this->get_tabs_active_title_css( $attributes, 'Mobile' ), | |
| 87 | + $css_generator->custom_device_map( function ( $device ) use ( $attributes ) { return $this->get_tabs_active_title_css( $attributes, $device ); } ) | |
| 80 | 88 | ); |
| 81 | 89 | |
| 82 | 90 | $css_generator->add_class_styles( |
| 83 | 91 | '{{WRAPPER}} .ablocks-block-tabs__tab-menu-subtitle', |
| @@ -82,9 +90,10 @@ | ||
| 82 | 90 | $css_generator->add_class_styles( |
| 83 | 91 | '{{WRAPPER}} .ablocks-block-tabs__tab-menu-subtitle', |
| 84 | 92 | $this->get_tabs_subtitle_css( $attributes ), |
| 85 | 93 | $this->get_tabs_subtitle_css( $attributes, 'Tablet' ), |
| 86 | - $this->get_tabs_subtitle_css( $attributes, 'Mobile' ) | |
| 94 | + $this->get_tabs_subtitle_css( $attributes, 'Mobile' ), | |
| 95 | + $css_generator->custom_device_map( function ( $device ) use ( $attributes ) { return $this->get_tabs_subtitle_css( $attributes, $device ); } ) | |
| 87 | 96 | ); |
| 88 | 97 | |
| 89 | 98 | $css_generator->add_class_styles( |
| 90 | 99 | '{{WRAPPER}} .ablocks-block-tabs__tab--active .ablocks-block-tabs__tab-menu-subtitle', |
| @@ -89,9 +98,10 @@ | ||
| 89 | 98 | $css_generator->add_class_styles( |
| 90 | 99 | '{{WRAPPER}} .ablocks-block-tabs__tab--active .ablocks-block-tabs__tab-menu-subtitle', |
| 91 | 100 | $this->get_tabs_active_subtitle_text_css( $attributes ), |
| 92 | 101 | $this->get_tabs_active_subtitle_text_css( $attributes, 'Tablet' ), |
| 93 | - $this->get_tabs_active_subtitle_text_css( $attributes, 'Mobile' ) | |
| 102 | + $this->get_tabs_active_subtitle_text_css( $attributes, 'Mobile' ), | |
| 103 | + $css_generator->custom_device_map( function ( $device ) use ( $attributes ) { return $this->get_tabs_active_subtitle_text_css( $attributes, $device ); } ) | |
| 94 | 104 | ); |
| 95 | 105 | if ( isset( $attributes['showActiveSubTitle'] ) && $attributes['showActiveSubTitle'] === false ) { |
| 96 | 106 | $css_generator->add_class_styles( |
| 97 | 107 | '{{WRAPPER}} .ablocks-block-tabs__icon', |
| @@ -96,9 +106,10 @@ | ||
| 96 | 106 | $css_generator->add_class_styles( |
| 97 | 107 | '{{WRAPPER}} .ablocks-block-tabs__icon', |
| 98 | 108 | $this->get_icon_position_css( $attributes ), |
| 99 | 109 | $this->get_icon_position_css( $attributes, 'Tablet' ), |
| 100 | - $this->get_icon_position_css( $attributes, 'Mobile' ) | |
| 110 | + $this->get_icon_position_css( $attributes, 'Mobile' ), | |
| 111 | + $css_generator->custom_device_map( function ( $device ) use ( $attributes ) { return $this->get_icon_position_css( $attributes, $device ); } ) | |
| 101 | 112 | ); |
| 102 | 113 | } else { |
| 103 | 114 | $css_generator->add_class_styles( |
| 104 | 115 | '{{WRAPPER}} .ablocks-block-tabs__tab--active .ablocks-block-tabs__icon', |
| @@ -103,9 +114,10 @@ | ||
| 103 | 114 | $css_generator->add_class_styles( |
| 104 | 115 | '{{WRAPPER}} .ablocks-block-tabs__tab--active .ablocks-block-tabs__icon', |
| 105 | 116 | $this->get_icon_position_css( $attributes ), |
| 106 | 117 | $this->get_icon_position_css( $attributes, 'Tablet' ), |
| 107 | - $this->get_icon_position_css( $attributes, 'Mobile' ) | |
| 118 | + $this->get_icon_position_css( $attributes, 'Mobile' ), | |
| 119 | + $css_generator->custom_device_map( function ( $device ) use ( $attributes ) { return $this->get_icon_position_css( $attributes, $device ); } ) | |
| 108 | 120 | ); |
| 109 | 121 | } |
| 110 | 122 | $css_generator->add_class_styles( |
| 111 | 123 | '{{WRAPPER}} .ablocks-block-tabs__tab--active .ablocks-block-tabs__progressbar', |
| @@ -110,9 +122,10 @@ | ||
| 110 | 122 | $css_generator->add_class_styles( |
| 111 | 123 | '{{WRAPPER}} .ablocks-block-tabs__tab--active .ablocks-block-tabs__progressbar', |
| 112 | 124 | $this->progress_bar_style_css( $attributes ), |
| 113 | 125 | $this->progress_bar_style_css( $attributes, 'Tablet' ), |
| 114 | - $this->progress_bar_style_css( $attributes, 'Mobile' ) | |
| 126 | + $this->progress_bar_style_css( $attributes, 'Mobile' ), | |
| 127 | + $css_generator->custom_device_map( function ( $device ) use ( $attributes ) { return $this->progress_bar_style_css( $attributes, $device ); } ) | |
| 115 | 128 | ); |
| 116 | 129 | $tabs_element_icon_wrapper_styles = Icon::get_wrapper_css( $attributes ); |
| 117 | 130 | |
| 118 | 131 | $spacing_value = []; |
| @@ -214,8 +227,12 @@ | ||
| 214 | 227 | Icon::get_element_css( $attributes, 'Tablet' ), |
| 215 | 228 | Icon::get_element_css( $attributes, 'Mobile' ), |
| 216 | 229 | ); |
| 217 | 230 | $css_generator->add_class_styles( |
| 231 | + '{{WRAPPER}} .ablocks-block-tabs__tab--active .ablocks-block-tabs__icon .ablocks-icon-wrap svg.ablocks-svg-icon', | |
| 232 | + $this->get_tabs_active_icon_css( $attributes ) | |
| 233 | + ); | |
| 234 | + $css_generator->add_class_styles( | |
| 218 | 235 | '{{WRAPPER}} .ablocks-block-tabs__icon .ablocks-icon-wrap svg.ablocks-svg-icon:hover', |
| 219 | 236 | Icon::get_element_image_hover_css( $attributes ), |
| 220 | 237 | Icon::get_element_image_hover_css( $attributes, 'Tablet' ), |
| 221 | 238 | Icon::get_element_image_hover_css( $attributes, 'Mobile' ), |
| @@ -224,9 +241,10 @@ | ||
| 224 | 241 | $css_generator->add_class_styles( |
| 225 | 242 | '{{WRAPPER}} .ablocks-block-tabs__body', |
| 226 | 243 | $this->get_tabs_content_css( $attributes ), |
| 227 | 244 | $this->get_tabs_content_css( $attributes, 'Tablet' ), |
| 228 | - $this->get_tabs_content_css( $attributes, 'Mobile' ) | |
| 245 | + $this->get_tabs_content_css( $attributes, 'Mobile' ), | |
| 246 | + $css_generator->custom_device_map( function ( $device ) use ( $attributes ) { return $this->get_tabs_content_css( $attributes, $device ); } ) | |
| 229 | 247 | ); |
| 230 | 248 | |
| 231 | 249 | $css_generator->add_class_styles( |
| 232 | 250 | '{{WRAPPER}} .ablocks-block-tabs__body:hover', |
| @@ -231,27 +249,31 @@ | ||
| 231 | 249 | $css_generator->add_class_styles( |
| 232 | 250 | '{{WRAPPER}} .ablocks-block-tabs__body:hover', |
| 233 | 251 | $this->get_tabs_content_hover_css( $attributes ), |
| 234 | 252 | $this->get_tabs_content_hover_css( $attributes, 'Tablet' ), |
| 235 | - $this->get_tabs_content_hover_css( $attributes, 'Mobile' ) | |
| 253 | + $this->get_tabs_content_hover_css( $attributes, 'Mobile' ), | |
| 254 | + $css_generator->custom_device_map( function ( $device ) use ( $attributes ) { return $this->get_tabs_content_hover_css( $attributes, $device ); } ) | |
| 236 | 255 | ); |
| 237 | 256 | $css_generator->add_class_styles( |
| 238 | 257 | '{{WRAPPER}} .ablocks-block-tabs__tab-menu-content', |
| 239 | 258 | $this->get_content_css( $attributes ), |
| 240 | 259 | $this->get_content_css( $attributes, 'Tablet' ), |
| 241 | - $this->get_content_css( $attributes, 'Mobile' ) | |
| 260 | + $this->get_content_css( $attributes, 'Mobile' ), | |
| 261 | + $css_generator->custom_device_map( function ( $device ) use ( $attributes ) { return $this->get_content_css( $attributes, $device ); } ) | |
| 242 | 262 | ); |
| 243 | 263 | $css_generator->add_class_styles( |
| 244 | 264 | '{{WRAPPER}} .ablocks-block-tabs__tab-panel', |
| 245 | 265 | $this->get_tabs_width_css( $attributes ), |
| 246 | 266 | $this->get_tabs_width_css( $attributes, 'Tablet' ), |
| 247 | - $this->get_tabs_width_css( $attributes, 'Mobile' ) | |
| 267 | + $this->get_tabs_width_css( $attributes, 'Mobile' ), | |
| 268 | + $css_generator->custom_device_map( function ( $device ) use ( $attributes ) { return $this->get_tabs_width_css( $attributes, $device ); } ) | |
| 248 | 269 | ); |
| 249 | 270 | $css_generator->add_class_styles( |
| 250 | 271 | '{{WRAPPER}} .ablocks-block-tabs__body', |
| 251 | 272 | $this->get_content_width_css( $attributes ), |
| 252 | 273 | $this->get_content_width_css( $attributes, 'Tablet' ), |
| 253 | - $this->get_content_width_css( $attributes, 'Mobile' ) | |
| 274 | + $this->get_content_width_css( $attributes, 'Mobile' ), | |
| 275 | + $css_generator->custom_device_map( function ( $device ) use ( $attributes ) { return $this->get_content_width_css( $attributes, $device ); } ) | |
| 254 | 276 | ); |
| 255 | 277 | |
| 256 | 278 | return $css_generator->generate_css(); |
| 257 | 279 | } |
| @@ -261,9 +283,10 @@ | ||
| 261 | 283 | $css_generator->add_class_styles( |
| 262 | 284 | '{{WRAPPER}} .ablocks-block-tabs', |
| 263 | 285 | $this->get_tabs_css( $attributes ), |
| 264 | 286 | $this->get_tabs_css( $attributes, 'Tablet' ), |
| 265 | - $this->get_tabs_css( $attributes, 'Mobile' ) | |
| 287 | + $this->get_tabs_css( $attributes, 'Mobile' ), | |
| 288 | + $css_generator->custom_device_map( function ( $device ) use ( $attributes ) { return $this->get_tabs_css( $attributes, $device ); } ) | |
| 266 | 289 | ); |
| 267 | 290 | |
| 268 | 291 | $css_generator->add_class_styles( |
| 269 | 292 | '{{WRAPPER}} .ablocks-block-tabs__tab-panel', |
| @@ -268,9 +291,10 @@ | ||
| 268 | 291 | $css_generator->add_class_styles( |
| 269 | 292 | '{{WRAPPER}} .ablocks-block-tabs__tab-panel', |
| 270 | 293 | $this->get_tabs_panel_css( $attributes ), |
| 271 | 294 | $this->get_tabs_panel_css( $attributes, 'Tablet' ), |
| 272 | - $this->get_tabs_panel_css( $attributes, 'Mobile' ) | |
| 295 | + $this->get_tabs_panel_css( $attributes, 'Mobile' ), | |
| 296 | + $css_generator->custom_device_map( function ( $device ) use ( $attributes ) { return $this->get_tabs_panel_css( $attributes, $device ); } ) | |
| 273 | 297 | ); |
| 274 | 298 | |
| 275 | 299 | $css_generator->add_class_styles( |
| 276 | 300 | '{{WRAPPER}} .ablocks-block-tabs__tab-panel:hover', |
| @@ -275,9 +299,10 @@ | ||
| 275 | 299 | $css_generator->add_class_styles( |
| 276 | 300 | '{{WRAPPER}} .ablocks-block-tabs__tab-panel:hover', |
| 277 | 301 | $this->get_tabs_panel_hover_css( $attributes ), |
| 278 | 302 | $this->get_tabs_panel_hover_css( $attributes, 'Tablet' ), |
| 279 | - $this->get_tabs_panel_hover_css( $attributes, 'Mobile' ) | |
| 303 | + $this->get_tabs_panel_hover_css( $attributes, 'Mobile' ), | |
| 304 | + $css_generator->custom_device_map( function ( $device ) use ( $attributes ) { return $this->get_tabs_panel_hover_css( $attributes, $device ); } ) | |
| 280 | 305 | ); |
| 281 | 306 | |
| 282 | 307 | $css_generator->add_class_styles( |
| 283 | 308 | '{{WRAPPER}} .ablocks-block-tabs__tab', |
| @@ -282,9 +307,10 @@ | ||
| 282 | 307 | $css_generator->add_class_styles( |
| 283 | 308 | '{{WRAPPER}} .ablocks-block-tabs__tab', |
| 284 | 309 | $this->get_tabs_menu_content_css( $attributes ), |
| 285 | 310 | $this->get_tabs_menu_content_css( $attributes, 'Tablet' ), |
| 286 | - $this->get_tabs_menu_content_css( $attributes, 'Mobile' ) | |
| 311 | + $this->get_tabs_menu_content_css( $attributes, 'Mobile' ), | |
| 312 | + $css_generator->custom_device_map( function ( $device ) use ( $attributes ) { return $this->get_tabs_menu_content_css( $attributes, $device ); } ) | |
| 287 | 313 | ); |
| 288 | 314 | |
| 289 | 315 | $css_generator->add_class_styles( |
| 290 | 316 | '{{WRAPPER}} .ablocks-block-tabs__tab--active', |
| @@ -289,9 +315,10 @@ | ||
| 289 | 315 | $css_generator->add_class_styles( |
| 290 | 316 | '{{WRAPPER}} .ablocks-block-tabs__tab--active', |
| 291 | 317 | $this->get_tabs_menu_content_active_css( $attributes ), |
| 292 | 318 | $this->get_tabs_menu_content_active_css( $attributes, 'Tablet' ), |
| 293 | - $this->get_tabs_menu_content_active_css( $attributes, 'Mobile' ) | |
| 319 | + $this->get_tabs_menu_content_active_css( $attributes, 'Mobile' ), | |
| 320 | + $css_generator->custom_device_map( function ( $device ) use ( $attributes ) { return $this->get_tabs_menu_content_active_css( $attributes, $device ); } ) | |
| 294 | 321 | ); |
| 295 | 322 | |
| 296 | 323 | $css_generator->add_class_styles( |
| 297 | 324 | '{{WRAPPER}} .ablocks-block-tabs__tab:hover', |
| @@ -296,15 +323,17 @@ | ||
| 296 | 323 | $css_generator->add_class_styles( |
| 297 | 324 | '{{WRAPPER}} .ablocks-block-tabs__tab:hover', |
| 298 | 325 | $this->get_tabs_menu_content_hover_css( $attributes ), |
| 299 | 326 | $this->get_tabs_menu_content_hover_css( $attributes, 'Tablet' ), |
| 300 | - $this->get_tabs_menu_content_hover_css( $attributes, 'Mobile' ) | |
| 327 | + $this->get_tabs_menu_content_hover_css( $attributes, 'Mobile' ), | |
| 328 | + $css_generator->custom_device_map( function ( $device ) use ( $attributes ) { return $this->get_tabs_menu_content_hover_css( $attributes, $device ); } ) | |
| 301 | 329 | ); |
| 302 | 330 | $css_generator->add_class_styles( |
| 303 | 331 | '{{WRAPPER}} .ablocks-block-tabs__tab-menu-title', |
| 304 | 332 | $this->get_tabs_title_css( $attributes ), |
| 305 | 333 | $this->get_tabs_title_css( $attributes, 'Tablet' ), |
| 306 | - $this->get_tabs_title_css( $attributes, 'Mobile' ) | |
| 334 | + $this->get_tabs_title_css( $attributes, 'Mobile' ), | |
| 335 | + $css_generator->custom_device_map( function ( $device ) use ( $attributes ) { return $this->get_tabs_title_css( $attributes, $device ); } ) | |
| 307 | 336 | ); |
| 308 | 337 | |
| 309 | 338 | $css_generator->add_class_styles( |
| 310 | 339 | '{{WRAPPER}} .ablocks-block-tabs__tab--active .ablocks-block-tabs__tab-menu-title', |
| @@ -309,9 +338,10 @@ | ||
| 309 | 338 | $css_generator->add_class_styles( |
| 310 | 339 | '{{WRAPPER}} .ablocks-block-tabs__tab--active .ablocks-block-tabs__tab-menu-title', |
| 311 | 340 | $this->get_tabs_active_title_css( $attributes ), |
| 312 | 341 | $this->get_tabs_active_title_css( $attributes, 'Tablet' ), |
| 313 | - $this->get_tabs_active_title_css( $attributes, 'Mobile' ) | |
| 342 | + $this->get_tabs_active_title_css( $attributes, 'Mobile' ), | |
| 343 | + $css_generator->custom_device_map( function ( $device ) use ( $attributes ) { return $this->get_tabs_active_title_css( $attributes, $device ); } ) | |
| 314 | 344 | ); |
| 315 | 345 | |
| 316 | 346 | $css_generator->add_class_styles( |
| 317 | 347 | '{{WRAPPER}} .ablocks-block-tabs__tab-menu-subtitle', |
| @@ -316,9 +346,10 @@ | ||
| 316 | 346 | $css_generator->add_class_styles( |
| 317 | 347 | '{{WRAPPER}} .ablocks-block-tabs__tab-menu-subtitle', |
| 318 | 348 | $this->get_tabs_subtitle_css( $attributes ), |
| 319 | 349 | $this->get_tabs_subtitle_css( $attributes, 'Tablet' ), |
| 320 | - $this->get_tabs_subtitle_css( $attributes, 'Mobile' ) | |
| 350 | + $this->get_tabs_subtitle_css( $attributes, 'Mobile' ), | |
| 351 | + $css_generator->custom_device_map( function ( $device ) use ( $attributes ) { return $this->get_tabs_subtitle_css( $attributes, $device ); } ) | |
| 321 | 352 | ); |
| 322 | 353 | |
| 323 | 354 | $css_generator->add_class_styles( |
| 324 | 355 | '{{WRAPPER}} .ablocks-block-tabs__tab--active .ablocks-block-tabs__tab-menu-subtitle', |
| @@ -323,9 +354,10 @@ | ||
| 323 | 354 | $css_generator->add_class_styles( |
| 324 | 355 | '{{WRAPPER}} .ablocks-block-tabs__tab--active .ablocks-block-tabs__tab-menu-subtitle', |
| 325 | 356 | $this->get_tabs_active_subtitle_text_css( $attributes ), |
| 326 | 357 | $this->get_tabs_active_subtitle_text_css( $attributes, 'Tablet' ), |
| 327 | - $this->get_tabs_active_subtitle_text_css( $attributes, 'Mobile' ) | |
| 358 | + $this->get_tabs_active_subtitle_text_css( $attributes, 'Mobile' ), | |
| 359 | + $css_generator->custom_device_map( function ( $device ) use ( $attributes ) { return $this->get_tabs_active_subtitle_text_css( $attributes, $device ); } ) | |
| 328 | 360 | ); |
| 329 | 361 | if ( isset( $attributes['showActiveSubTitle'] ) && $attributes['showActiveSubTitle'] === false ) { |
| 330 | 362 | $css_generator->add_class_styles( |
| 331 | 363 | '{{WRAPPER}} .ablocks-block-tabs__icon', |
| @@ -330,9 +362,10 @@ | ||
| 330 | 362 | $css_generator->add_class_styles( |
| 331 | 363 | '{{WRAPPER}} .ablocks-block-tabs__icon', |
| 332 | 364 | $this->get_icon_position_css( $attributes ), |
| 333 | 365 | $this->get_icon_position_css( $attributes, 'Tablet' ), |
| 334 | - $this->get_icon_position_css( $attributes, 'Mobile' ) | |
| 366 | + $this->get_icon_position_css( $attributes, 'Mobile' ), | |
| 367 | + $css_generator->custom_device_map( function ( $device ) use ( $attributes ) { return $this->get_icon_position_css( $attributes, $device ); } ) | |
| 335 | 368 | ); |
| 336 | 369 | } else { |
| 337 | 370 | $css_generator->add_class_styles( |
| 338 | 371 | '{{WRAPPER}} .ablocks-block-tabs__tab--active .ablocks-block-tabs__icon', |
| @@ -337,9 +370,10 @@ | ||
| 337 | 370 | $css_generator->add_class_styles( |
| 338 | 371 | '{{WRAPPER}} .ablocks-block-tabs__tab--active .ablocks-block-tabs__icon', |
| 339 | 372 | $this->get_icon_position_css( $attributes ), |
| 340 | 373 | $this->get_icon_position_css( $attributes, 'Tablet' ), |
| 341 | - $this->get_icon_position_css( $attributes, 'Mobile' ) | |
| 374 | + $this->get_icon_position_css( $attributes, 'Mobile' ), | |
| 375 | + $css_generator->custom_device_map( function ( $device ) use ( $attributes ) { return $this->get_icon_position_css( $attributes, $device ); } ) | |
| 342 | 376 | ); |
| 343 | 377 | } |
| 344 | 378 | $css_generator->add_class_styles( |
| 345 | 379 | '{{WRAPPER}} .ablocks-block-tabs__tab--active .ablocks-block-tabs__progressbar', |
| @@ -344,15 +378,17 @@ | ||
| 344 | 378 | $css_generator->add_class_styles( |
| 345 | 379 | '{{WRAPPER}} .ablocks-block-tabs__tab--active .ablocks-block-tabs__progressbar', |
| 346 | 380 | $this->progress_bar_style_css( $attributes ), |
| 347 | 381 | $this->progress_bar_style_css( $attributes, 'Tablet' ), |
| 348 | - $this->progress_bar_style_css( $attributes, 'Mobile' ) | |
| 382 | + $this->progress_bar_style_css( $attributes, 'Mobile' ), | |
| 383 | + $css_generator->custom_device_map( function ( $device ) use ( $attributes ) { return $this->progress_bar_style_css( $attributes, $device ); } ) | |
| 349 | 384 | ); |
| 350 | 385 | $css_generator->add_class_styles( |
| 351 | 386 | '{{WRAPPER}} .ablocks-block-tabs__icon .ablocks-icon-wrap', |
| 352 | 387 | Icon::get_wrapper_css( $attributes ), |
| 353 | 388 | Icon::get_wrapper_css( $attributes, 'Tablet' ), |
| 354 | - Icon::get_wrapper_css( $attributes, 'Mobile' ) | |
| 389 | + Icon::get_wrapper_css( $attributes, 'Mobile' ), | |
| 390 | + $css_generator->custom_device_map( function ( $device ) use ( $attributes ) { return Icon::get_wrapper_css( $attributes, $device ); } ) | |
| 355 | 391 | ); |
| 356 | 392 | $css_generator->add_class_styles( |
| 357 | 393 | '{{WRAPPER}} .ablocks-block-tabs__icon .ablocks-icon-wrap:hover', |
| 358 | 394 | Icon::get_wrapper_hover_css( $attributes ), |
| @@ -357,8 +393,9 @@ | ||
| 357 | 393 | '{{WRAPPER}} .ablocks-block-tabs__icon .ablocks-icon-wrap:hover', |
| 358 | 394 | Icon::get_wrapper_hover_css( $attributes ), |
| 359 | 395 | Icon::get_wrapper_hover_css( $attributes, 'Tablet' ), |
| 360 | 396 | Icon::get_wrapper_hover_css( $attributes, 'Mobile' ), |
| 397 | + $css_generator->custom_device_map( function ( $device ) use ( $attributes ) { return Icon::get_wrapper_hover_css( $attributes, $device ); } ) | |
| 361 | 398 | ); |
| 362 | 399 | $css_generator->add_class_styles( |
| 363 | 400 | '{{WRAPPER}} .ablocks-block-tabs__icon .ablocks-icon-wrap', |
| 364 | 401 | $this->get_icon_spacing_css( $attributes ), |
| @@ -363,8 +400,9 @@ | ||
| 363 | 400 | '{{WRAPPER}} .ablocks-block-tabs__icon .ablocks-icon-wrap', |
| 364 | 401 | $this->get_icon_spacing_css( $attributes ), |
| 365 | 402 | $this->get_icon_spacing_css( $attributes, 'Tablet' ), |
| 366 | 403 | $this->get_icon_spacing_css( $attributes, 'Mobile' ), |
| 404 | + $css_generator->custom_device_map( function ( $device ) use ( $attributes ) { return $this->get_icon_spacing_css( $attributes, $device ); } ) | |
| 367 | 405 | ); |
| 368 | 406 | |
| 369 | 407 | $css_generator->add_class_styles( |
| 370 | 408 | '{{WRAPPER}} .ablocks-block-tabs__icon .ablocks-icon-wrap img.ablocks-image-icon', |
| @@ -370,8 +408,9 @@ | ||
| 370 | 408 | '{{WRAPPER}} .ablocks-block-tabs__icon .ablocks-icon-wrap img.ablocks-image-icon', |
| 371 | 409 | Icon::get_element_image_css( $attributes ), |
| 372 | 410 | Icon::get_element_image_css( $attributes, 'Tablet' ), |
| 373 | 411 | Icon::get_element_image_css( $attributes, 'Mobile' ), |
| 412 | + $css_generator->custom_device_map( function ( $device ) use ( $attributes ) { return Icon::get_element_image_css( $attributes, $device ); } ) | |
| 374 | 413 | ); |
| 375 | 414 | $css_generator->add_class_styles( |
| 376 | 415 | '{{WRAPPER}} .ablocks-block-tabs__icon .ablocks-icon-wrap img.ablocks-image-icon:hover', |
| 377 | 416 | Icon::get_element_image_hover_css( $attributes ), |
| @@ -376,8 +415,9 @@ | ||
| 376 | 415 | '{{WRAPPER}} .ablocks-block-tabs__icon .ablocks-icon-wrap img.ablocks-image-icon:hover', |
| 377 | 416 | Icon::get_element_image_hover_css( $attributes ), |
| 378 | 417 | Icon::get_element_image_hover_css( $attributes, 'Tablet' ), |
| 379 | 418 | Icon::get_element_image_hover_css( $attributes, 'Mobile' ), |
| 419 | + $css_generator->custom_device_map( function ( $device ) use ( $attributes ) { return Icon::get_element_image_hover_css( $attributes, $device ); } ) | |
| 380 | 420 | ); |
| 381 | 421 | $css_generator->add_class_styles( |
| 382 | 422 | '{{WRAPPER}} .ablocks-block-tabs__icon .ablocks-icon-wrap svg.ablocks-svg-icon', |
| 383 | 423 | Icon::get_element_css( $attributes ), |
| @@ -382,14 +422,20 @@ | ||
| 382 | 422 | '{{WRAPPER}} .ablocks-block-tabs__icon .ablocks-icon-wrap svg.ablocks-svg-icon', |
| 383 | 423 | Icon::get_element_css( $attributes ), |
| 384 | 424 | Icon::get_element_css( $attributes, 'Tablet' ), |
| 385 | 425 | Icon::get_element_css( $attributes, 'Mobile' ), |
| 426 | + $css_generator->custom_device_map( function ( $device ) use ( $attributes ) { return Icon::get_element_css( $attributes, $device ); } ) | |
| 386 | 427 | ); |
| 387 | 428 | $css_generator->add_class_styles( |
| 429 | + '{{WRAPPER}} .ablocks-block-tabs__tab--active .ablocks-block-tabs__icon .ablocks-icon-wrap svg.ablocks-svg-icon', | |
| 430 | + $this->get_tabs_active_icon_css( $attributes ) | |
| 431 | + ); | |
| 432 | + $css_generator->add_class_styles( | |
| 388 | 433 | '{{WRAPPER}} .ablocks-block-tabs__icon .ablocks-icon-wrap svg.ablocks-svg-icon:hover', |
| 389 | 434 | Icon::get_element_image_hover_css( $attributes ), |
| 390 | 435 | Icon::get_element_image_hover_css( $attributes, 'Tablet' ), |
| 391 | 436 | Icon::get_element_image_hover_css( $attributes, 'Mobile' ), |
| 437 | + $css_generator->custom_device_map( function ( $device ) use ( $attributes ) { return Icon::get_element_image_hover_css( $attributes, $device ); } ) | |
| 392 | 438 | ); |
| 393 | 439 | |
| 394 | 440 | $css_generator->add_class_styles( |
| 395 | 441 | '{{WRAPPER}} .ablocks-block-tabs__body', |
| @@ -394,9 +440,10 @@ | ||
| 394 | 440 | $css_generator->add_class_styles( |
| 395 | 441 | '{{WRAPPER}} .ablocks-block-tabs__body', |
| 396 | 442 | $this->get_tabs_content_css( $attributes ), |
| 397 | 443 | $this->get_tabs_content_css( $attributes, 'Tablet' ), |
| 398 | - $this->get_tabs_content_css( $attributes, 'Mobile' ) | |
| 444 | + $this->get_tabs_content_css( $attributes, 'Mobile' ), | |
| 445 | + $css_generator->custom_device_map( function ( $device ) use ( $attributes ) { return $this->get_tabs_content_css( $attributes, $device ); } ) | |
| 399 | 446 | ); |
| 400 | 447 | |
| 401 | 448 | $css_generator->add_class_styles( |
| 402 | 449 | '{{WRAPPER}} .ablocks-block-tabs__body:hover', |
| @@ -401,27 +448,31 @@ | ||
| 401 | 448 | $css_generator->add_class_styles( |
| 402 | 449 | '{{WRAPPER}} .ablocks-block-tabs__body:hover', |
| 403 | 450 | $this->get_tabs_content_hover_css( $attributes ), |
| 404 | 451 | $this->get_tabs_content_hover_css( $attributes, 'Tablet' ), |
| 405 | - $this->get_tabs_content_hover_css( $attributes, 'Mobile' ) | |
| 452 | + $this->get_tabs_content_hover_css( $attributes, 'Mobile' ), | |
| 453 | + $css_generator->custom_device_map( function ( $device ) use ( $attributes ) { return $this->get_tabs_content_hover_css( $attributes, $device ); } ) | |
| 406 | 454 | ); |
| 407 | 455 | $css_generator->add_class_styles( |
| 408 | 456 | '{{WRAPPER}} .ablocks-block-tabs__tab-menu-content', |
| 409 | 457 | $this->get_content_css( $attributes ), |
| 410 | 458 | $this->get_content_css( $attributes, 'Tablet' ), |
| 411 | - $this->get_content_css( $attributes, 'Mobile' ) | |
| 459 | + $this->get_content_css( $attributes, 'Mobile' ), | |
| 460 | + $css_generator->custom_device_map( function ( $device ) use ( $attributes ) { return $this->get_content_css( $attributes, $device ); } ) | |
| 412 | 461 | ); |
| 413 | 462 | $css_generator->add_class_styles( |
| 414 | 463 | '{{WRAPPER}} .ablocks-block-tabs__tab-panel', |
| 415 | 464 | $this->get_tabs_width_css( $attributes ), |
| 416 | 465 | $this->get_tabs_width_css( $attributes, 'Tablet' ), |
| 417 | - $this->get_tabs_width_css( $attributes, 'Mobile' ) | |
| 466 | + $this->get_tabs_width_css( $attributes, 'Mobile' ), | |
| 467 | + $css_generator->custom_device_map( function ( $device ) use ( $attributes ) { return $this->get_tabs_width_css( $attributes, $device ); } ) | |
| 418 | 468 | ); |
| 419 | 469 | $css_generator->add_class_styles( |
| 420 | 470 | '{{WRAPPER}} .ablocks-block-tabs__body', |
| 421 | 471 | $this->get_content_width_css( $attributes ), |
| 422 | 472 | $this->get_content_width_css( $attributes, 'Tablet' ), |
| 423 | - $this->get_content_width_css( $attributes, 'Mobile' ) | |
| 473 | + $this->get_content_width_css( $attributes, 'Mobile' ), | |
| 474 | + $css_generator->custom_device_map( function ( $device ) use ( $attributes ) { return $this->get_content_width_css( $attributes, $device ); } ) | |
| 424 | 475 | ); |
| 425 | 476 | |
| 426 | 477 | return $css_generator->generate_css(); |
| 427 | 478 | } |
| @@ -703,21 +754,14 @@ | ||
| 703 | 754 | $css, |
| 704 | 755 | $iconViewCSS ); |
| 705 | 756 | } |
| 706 | 757 | |
| 758 | + // The active tab's icon follows the title active colour. | |
| 707 | 759 | public function get_tabs_active_icon_css( $attributes ) { |
| 708 | 760 | $css = []; |
| 709 | - | |
| 710 | - // Check for active icon color | |
| 711 | - if ( isset( $attributes['iconActiveColor'] ) ) { | |
| 712 | - $css['fill'] = Color::get_css( isset( $attributes['iconActiveColor'] ) ? $attributes['iconActiveColor'] : '' ); | |
| 761 | + if ( ! empty( $attributes['titleTextActiveColor'] ) ) { | |
| 762 | + $css['fill'] = Color::get_css( $attributes['titleTextActiveColor'] ); | |
| 713 | 763 | } |
| 714 | - | |
| 715 | - // Check for icon type and active background color | |
| 716 | - if ( isset( $attributes['iconType'] ) && $attributes['iconType'] !== 'default' && $attributes['iconType'] !== 'framed' ) { | |
| 717 | - $css['background-color'] = Color::get_css( isset( $attributes['iconActiveBackground'] ) ? $attributes['iconActiveBackground'] : '' ); | |
| 718 | - } | |
| 719 | - | |
| 720 | 764 | return $css; |
| 721 | 765 | } |
| 722 | 766 | |
| 723 | 767 | public function get_tabs_content_css( $attributes, $device = '' ) { |