| @@ -31,9 +31,10 @@ | ||
| 31 | 31 | $css_generator->add_class_styles( |
| 32 | 32 | '{{WRAPPER}}.ablocks-block--single-accordion:hover', |
| 33 | 33 | $this->get_item_hover_css( $attributes ), |
| 34 | 34 | $this->get_item_hover_css( $attributes, 'Tablet' ), |
| 35 | - $this->get_item_hover_css( $attributes, 'Mobile' ) | |
| 35 | + $this->get_item_hover_css( $attributes, 'Mobile' ), | |
| 36 | + $css_generator->custom_device_map( function ( $device ) use ( $attributes ) { return $this->get_item_hover_css( $attributes, $device ); } ) | |
| 36 | 37 | ); |
| 37 | 38 | $css_generator->add_class_styles( |
| 38 | 39 | '{{WRAPPER}} .ablocks-block--single-accordion__heading .ablocks-block-accordion-title', |
| 39 | 40 | $this->get_title_css( $attributes ), |
| @@ -42,21 +43,24 @@ | ||
| 42 | 43 | ); |
| 43 | 44 | $css_generator->add_class_styles( |
| 44 | 45 | '{{WRAPPER}} .ablocks-block--single-accordion__heading:hover .ablocks-block-accordion-title', $this->get_title_hover_css( $attributes ), |
| 45 | 46 | $this->get_title_hover_css( $attributes, 'Tablet' ), |
| 46 | - $this->get_title_hover_css( $attributes, 'Mobile' ) | |
| 47 | + $this->get_title_hover_css( $attributes, 'Mobile' ), | |
| 48 | + $css_generator->custom_device_map( function ( $device ) use ( $attributes ) { return $this->get_title_hover_css( $attributes, $device ); } ) | |
| 47 | 49 | ); |
| 48 | 50 | $css_generator->add_class_styles( |
| 49 | 51 | '{{WRAPPER}}.ablocks-block--single-accordion-is-selected .ablocks-block-accordion-title', |
| 50 | 52 | $this->get_title_active_css( $attributes ), |
| 51 | 53 | $this->get_title_active_css( $attributes, 'Tablet' ), |
| 52 | - $this->get_title_active_css( $attributes, 'Mobile' ) | |
| 54 | + $this->get_title_active_css( $attributes, 'Mobile' ), | |
| 55 | + $css_generator->custom_device_map( function ( $device ) use ( $attributes ) { return $this->get_title_active_css( $attributes, $device ); } ) | |
| 53 | 56 | ); |
| 54 | 57 | $css_generator->add_class_styles( |
| 55 | 58 | '{{WRAPPER}} .ablocks-block--single-accordion__heading', |
| 56 | 59 | $this->get_panel_css( $attributes ), |
| 57 | 60 | $this->get_panel_css( $attributes, 'Tablet' ), |
| 58 | - $this->get_panel_css( $attributes, 'Mobile' ) | |
| 61 | + $this->get_panel_css( $attributes, 'Mobile' ), | |
| 62 | + $css_generator->custom_device_map( function ( $device ) use ( $attributes ) { return $this->get_panel_css( $attributes, $device ); } ) | |
| 59 | 63 | ); |
| 60 | 64 | $css_generator->add_class_styles( |
| 61 | 65 | '{{WRAPPER}} .ablocks-block--single-accordion__heading:hover', |
| 62 | 66 | $this->get_panel_hover_css( $attributes ), |
| @@ -66,9 +70,10 @@ | ||
| 66 | 70 | $css_generator->add_class_styles( |
| 67 | 71 | '{{WRAPPER}}.ablocks-block--single-accordion-is-selected .ablocks-block--single-accordion__heading', |
| 68 | 72 | $this->get_panel_active_css( $attributes ), |
| 69 | 73 | $this->get_panel_active_css( $attributes, 'Tablet' ), |
| 70 | - $this->get_panel_active_css( $attributes, 'Mobile' ) | |
| 74 | + $this->get_panel_active_css( $attributes, 'Mobile' ), | |
| 75 | + $css_generator->custom_device_map( function ( $device ) use ( $attributes ) { return $this->get_panel_active_css( $attributes, $device ); } ) | |
| 71 | 76 | ); |
| 72 | 77 | $css_generator->add_class_styles( |
| 73 | 78 | '{{WRAPPER}} .ablocks-block--single-accordion__heading svg.ablocks-svg-icon', |
| 74 | 79 | $this->get_icon_css( $attributes ) |
| @@ -80,15 +85,17 @@ | ||
| 80 | 85 | $css_generator->add_class_styles( |
| 81 | 86 | '{{WRAPPER}} .ablocks-block--single-accordion__body-content', |
| 82 | 87 | $this->get_content_css( $attributes ), |
| 83 | 88 | $this->get_content_css( $attributes, 'Tablet' ), |
| 84 | - $this->get_content_css( $attributes, 'Mobile' ) | |
| 89 | + $this->get_content_css( $attributes, 'Mobile' ), | |
| 90 | + $css_generator->custom_device_map( function ( $device ) use ( $attributes ) { return $this->get_content_css( $attributes, $device ); } ) | |
| 85 | 91 | ); |
| 86 | 92 | $css_generator->add_class_styles( |
| 87 | 93 | '{{WRAPPER}} .ablocks-block--single-accordion__body-content:hover', |
| 88 | 94 | $this->get_content_hover_css( $attributes ), |
| 89 | 95 | $this->get_content_hover_css( $attributes, 'Tablet' ), |
| 90 | - $this->get_content_hover_css( $attributes, 'Mobile' ) | |
| 96 | + $this->get_content_hover_css( $attributes, 'Mobile' ), | |
| 97 | + $css_generator->custom_device_map( function ( $device ) use ( $attributes ) { return $this->get_content_hover_css( $attributes, $device ); } ) | |
| 91 | 98 | ); |
| 92 | 99 | return $css_generator->generate_css(); |
| 93 | 100 | } |
| 94 | 101 | public function get_item_css( $attributes, $device = '' ) { |