| @@ -21,9 +21,10 @@ | ||
| 21 | 21 | $css_generator->add_class_styles( |
| 22 | 22 | '{{WRAPPER}} .ablocks-block-container', |
| 23 | 23 | $this->get_wrapper_css( $attributes ), |
| 24 | 24 | $this->get_wrapper_css( $attributes, 'Tablet' ), |
| 25 | - $this->get_wrapper_css( $attributes, 'Mobile' ) | |
| 25 | + $this->get_wrapper_css( $attributes, 'Mobile' ), | |
| 26 | + $css_generator->custom_device_map( function ( $device ) use ( $attributes ) { return $this->get_wrapper_css( $attributes, $device ); } ) | |
| 26 | 27 | ); |
| 27 | 28 | |
| 28 | 29 | // Icon Style |
| 29 | 30 | $css_generator->add_class_styles( |
| @@ -29,21 +30,24 @@ | ||
| 29 | 30 | $css_generator->add_class_styles( |
| 30 | 31 | '{{WRAPPER}} .ablocks-icon-wrap', |
| 31 | 32 | Icon::get_wrapper_css( $attributes ), |
| 32 | 33 | Icon::get_wrapper_css( $attributes, 'Tablet' ), |
| 33 | - Icon::get_wrapper_css( $attributes, 'Mobile' ) | |
| 34 | + Icon::get_wrapper_css( $attributes, 'Mobile' ), | |
| 35 | + $css_generator->custom_device_map( function ( $device ) use ( $attributes ) { return Icon::get_wrapper_css( $attributes, $device ); } ) | |
| 34 | 36 | ); |
| 35 | 37 | $css_generator->add_class_styles( |
| 36 | 38 | '{{WRAPPER}} .ablocks-icon-wrap:hover', |
| 37 | 39 | Icon::get_wrapper_hover_css( $attributes ), |
| 38 | 40 | Icon::get_wrapper_hover_css( $attributes, 'Tablet' ), |
| 39 | - Icon::get_wrapper_hover_css( $attributes, 'Mobile' ) | |
| 41 | + Icon::get_wrapper_hover_css( $attributes, 'Mobile' ), | |
| 42 | + $css_generator->custom_device_map( function ( $device ) use ( $attributes ) { return Icon::get_wrapper_hover_css( $attributes, $device ); } ) | |
| 40 | 43 | ); |
| 41 | 44 | $css_generator->add_class_styles( |
| 42 | 45 | '{{WRAPPER}} .ablocks-icon-wrap img.ablocks-image-icon', |
| 43 | 46 | Icon::get_element_image_css( $attributes ), |
| 44 | 47 | Icon::get_element_image_css( $attributes, 'Tablet' ), |
| 45 | - Icon::get_element_image_css( $attributes, 'Mobile' ) | |
| 48 | + Icon::get_element_image_css( $attributes, 'Mobile' ), | |
| 49 | + $css_generator->custom_device_map( function ( $device ) use ( $attributes ) { return Icon::get_element_image_css( $attributes, $device ); } ) | |
| 46 | 50 | ); |
| 47 | 51 | $css_generator->add_class_styles( |
| 48 | 52 | '{{WRAPPER}} .ablocks-icon-wrap img.ablocks-image-icon:hover', |
| 49 | 53 | Icon::get_element_image_hover_css( $attributes ), |
| @@ -59,9 +63,10 @@ | ||
| 59 | 63 | $css_generator->add_class_styles( |
| 60 | 64 | '{{WRAPPER}} .ablocks-icon-wrap svg.ablocks-svg-icon:hover', |
| 61 | 65 | Icon::get_element_image_hover_css( $attributes ), |
| 62 | 66 | Icon::get_element_image_hover_css( $attributes, 'Tablet' ), |
| 63 | - Icon::get_element_image_hover_css( $attributes, 'Mobile' ) | |
| 67 | + Icon::get_element_image_hover_css( $attributes, 'Mobile' ), | |
| 68 | + $css_generator->custom_device_map( function ( $device ) use ( $attributes ) { return Icon::get_element_image_hover_css( $attributes, $device ); } ) | |
| 64 | 69 | ); |
| 65 | 70 | |
| 66 | 71 | return $css_generator->generate_css(); |
| 67 | 72 | } |
| @@ -72,9 +77,10 @@ | ||
| 72 | 77 | $css_generator->add_class_styles( |
| 73 | 78 | '{{WRAPPER}}', |
| 74 | 79 | $this->get_wrapper_css( $attributes ), |
| 75 | 80 | $this->get_wrapper_css( $attributes, 'Tablet' ), |
| 76 | - $this->get_wrapper_css( $attributes, 'Mobile' ) | |
| 81 | + $this->get_wrapper_css( $attributes, 'Mobile' ), | |
| 82 | + $css_generator->custom_device_map( function ( $device ) use ( $attributes ) { return $this->get_wrapper_css( $attributes, $device ); } ) | |
| 77 | 83 | ); |
| 78 | 84 | |
| 79 | 85 | // Icon Style |
| 80 | 86 | $css_generator->add_class_styles( |
| @@ -80,21 +86,24 @@ | ||
| 80 | 86 | $css_generator->add_class_styles( |
| 81 | 87 | '{{WRAPPER}} .ablocks-icon-wrap', |
| 82 | 88 | Icon::get_wrapper_css( $attributes ), |
| 83 | 89 | Icon::get_wrapper_css( $attributes, 'Tablet' ), |
| 84 | - Icon::get_wrapper_css( $attributes, 'Mobile' ) | |
| 90 | + Icon::get_wrapper_css( $attributes, 'Mobile' ), | |
| 91 | + $css_generator->custom_device_map( function ( $device ) use ( $attributes ) { return Icon::get_wrapper_css( $attributes, $device ); } ) | |
| 85 | 92 | ); |
| 86 | 93 | $css_generator->add_class_styles( |
| 87 | 94 | '{{WRAPPER}} .ablocks-icon-wrap:hover', |
| 88 | 95 | Icon::get_wrapper_hover_css( $attributes ), |
| 89 | 96 | Icon::get_wrapper_hover_css( $attributes, 'Tablet' ), |
| 90 | - Icon::get_wrapper_hover_css( $attributes, 'Mobile' ) | |
| 97 | + Icon::get_wrapper_hover_css( $attributes, 'Mobile' ), | |
| 98 | + $css_generator->custom_device_map( function ( $device ) use ( $attributes ) { return Icon::get_wrapper_hover_css( $attributes, $device ); } ) | |
| 91 | 99 | ); |
| 92 | 100 | $css_generator->add_class_styles( |
| 93 | 101 | '{{WRAPPER}} .ablocks-icon-wrap img.ablocks-image-icon', |
| 94 | 102 | Icon::get_element_image_css( $attributes ), |
| 95 | 103 | Icon::get_element_image_css( $attributes, 'Tablet' ), |
| 96 | - Icon::get_element_image_css( $attributes, 'Mobile' ) | |
| 104 | + Icon::get_element_image_css( $attributes, 'Mobile' ), | |
| 105 | + $css_generator->custom_device_map( function ( $device ) use ( $attributes ) { return Icon::get_element_image_css( $attributes, $device ); } ) | |
| 97 | 106 | ); |
| 98 | 107 | $css_generator->add_class_styles( |
| 99 | 108 | '{{WRAPPER}} .ablocks-icon-wrap img.ablocks-image-icon:hover', |
| 100 | 109 | Icon::get_element_image_hover_css( $attributes ), |
| @@ -99,8 +108,9 @@ | ||
| 99 | 108 | '{{WRAPPER}} .ablocks-icon-wrap img.ablocks-image-icon:hover', |
| 100 | 109 | Icon::get_element_image_hover_css( $attributes ), |
| 101 | 110 | Icon::get_element_image_hover_css( $attributes, 'Tablet' ), |
| 102 | 111 | Icon::get_element_image_hover_css( $attributes, 'Mobile' ), |
| 112 | + $css_generator->custom_device_map( function ( $device ) use ( $attributes ) { return Icon::get_element_image_hover_css( $attributes, $device ); } ) | |
| 103 | 113 | ); |
| 104 | 114 | $css_generator->add_class_styles( |
| 105 | 115 | '{{WRAPPER}} .ablocks-icon-wrap svg.ablocks-svg-icon', |
| 106 | 116 | Icon::get_element_css( $attributes ), |
| @@ -105,14 +115,16 @@ | ||
| 105 | 115 | '{{WRAPPER}} .ablocks-icon-wrap svg.ablocks-svg-icon', |
| 106 | 116 | Icon::get_element_css( $attributes ), |
| 107 | 117 | Icon::get_element_css( $attributes, 'Tablet' ), |
| 108 | 118 | Icon::get_element_css( $attributes, 'Mobile' ), |
| 119 | + $css_generator->custom_device_map( function ( $device ) use ( $attributes ) { return Icon::get_element_css( $attributes, $device ); } ) | |
| 109 | 120 | ); |
| 110 | 121 | $css_generator->add_class_styles( |
| 111 | 122 | '{{WRAPPER}} .ablocks-icon-wrap svg.ablocks-svg-icon:hover', |
| 112 | 123 | Icon::get_element_image_hover_css( $attributes ), |
| 113 | 124 | Icon::get_element_image_hover_css( $attributes, 'Tablet' ), |
| 114 | - Icon::get_element_image_hover_css( $attributes, 'Mobile' ) | |
| 125 | + Icon::get_element_image_hover_css( $attributes, 'Mobile' ), | |
| 126 | + $css_generator->custom_device_map( function ( $device ) use ( $attributes ) { return Icon::get_element_image_hover_css( $attributes, $device ); } ) | |
| 115 | 127 | ); |
| 116 | 128 | |
| 117 | 129 | return $css_generator->generate_css(); |
| 118 | 130 | } |