| @@ -22,9 +22,10 @@ | ||
| 22 | 22 | $css_generator->add_class_styles( |
| 23 | 23 | '{{WRAPPER}} .ablocks-block-container', |
| 24 | 24 | $this->get_wrapper_css( $attributes ), |
| 25 | 25 | $this->get_wrapper_css( $attributes, 'Tablet' ), |
| 26 | - $this->get_wrapper_css( $attributes, 'Mobile' ) | |
| 26 | + $this->get_wrapper_css( $attributes, 'Mobile' ), | |
| 27 | + $css_generator->custom_device_map( function ( $device ) use ( $attributes ) { return $this->get_wrapper_css( $attributes, $device ); } ) | |
| 27 | 28 | ); |
| 28 | 29 | |
| 29 | 30 | // Icon Style |
| 30 | 31 | $css_generator->add_class_styles( |
| @@ -30,21 +31,24 @@ | ||
| 30 | 31 | $css_generator->add_class_styles( |
| 31 | 32 | '{{WRAPPER}} .ablocks-icon-wrap', |
| 32 | 33 | Icon::get_wrapper_css( $attributes ), |
| 33 | 34 | Icon::get_wrapper_css( $attributes, 'Tablet' ), |
| 34 | - Icon::get_wrapper_css( $attributes, 'Mobile' ) | |
| 35 | + Icon::get_wrapper_css( $attributes, 'Mobile' ), | |
| 36 | + $css_generator->custom_device_map( function ( $device ) use ( $attributes ) { return Icon::get_wrapper_css( $attributes, $device ); } ) | |
| 35 | 37 | ); |
| 36 | 38 | $css_generator->add_class_styles( |
| 37 | 39 | '{{WRAPPER}} .ablocks-icon-wrap:hover', |
| 38 | 40 | Icon::get_wrapper_hover_css( $attributes ), |
| 39 | 41 | Icon::get_wrapper_hover_css( $attributes, 'Tablet' ), |
| 40 | - Icon::get_wrapper_hover_css( $attributes, 'Mobile' ) | |
| 42 | + Icon::get_wrapper_hover_css( $attributes, 'Mobile' ), | |
| 43 | + $css_generator->custom_device_map( function ( $device ) use ( $attributes ) { return Icon::get_wrapper_hover_css( $attributes, $device ); } ) | |
| 41 | 44 | ); |
| 42 | 45 | $css_generator->add_class_styles( |
| 43 | 46 | '{{WRAPPER}} svg > path', |
| 44 | 47 | $this->get_svg_css( $attributes ), |
| 45 | 48 | $this->get_svg_css( $attributes, 'Tablet' ), |
| 46 | - $this->get_svg_css( $attributes, 'Mobile' ) | |
| 49 | + $this->get_svg_css( $attributes, 'Mobile' ), | |
| 50 | + $css_generator->custom_device_map( function ( $device ) use ( $attributes ) { return $this->get_svg_css( $attributes, $device ); } ) | |
| 47 | 51 | ); |
| 48 | 52 | |
| 49 | 53 | $css_generator->add_class_styles( |
| 50 | 54 | '{{WRAPPER}} .ablocks-icon-wrap img.ablocks-image-icon', |
| @@ -80,9 +84,10 @@ | ||
| 80 | 84 | $css_generator->add_class_styles( |
| 81 | 85 | '{{WRAPPER}}', |
| 82 | 86 | $this->get_wrapper_css( $attributes ), |
| 83 | 87 | $this->get_wrapper_css( $attributes, 'Tablet' ), |
| 84 | - $this->get_wrapper_css( $attributes, 'Mobile' ) | |
| 88 | + $this->get_wrapper_css( $attributes, 'Mobile' ), | |
| 89 | + $css_generator->custom_device_map( function ( $device ) use ( $attributes ) { return $this->get_wrapper_css( $attributes, $device ); } ) | |
| 85 | 90 | ); |
| 86 | 91 | |
| 87 | 92 | // Icon Style |
| 88 | 93 | $css_generator->add_class_styles( |
| @@ -88,21 +93,24 @@ | ||
| 88 | 93 | $css_generator->add_class_styles( |
| 89 | 94 | '{{WRAPPER}} .ablocks-icon-wrap', |
| 90 | 95 | Icon::get_wrapper_css( $attributes ), |
| 91 | 96 | Icon::get_wrapper_css( $attributes, 'Tablet' ), |
| 92 | - Icon::get_wrapper_css( $attributes, 'Mobile' ) | |
| 97 | + Icon::get_wrapper_css( $attributes, 'Mobile' ), | |
| 98 | + $css_generator->custom_device_map( function ( $device ) use ( $attributes ) { return Icon::get_wrapper_css( $attributes, $device ); } ) | |
| 93 | 99 | ); |
| 94 | 100 | $css_generator->add_class_styles( |
| 95 | 101 | '{{WRAPPER}} .ablocks-icon-wrap:hover', |
| 96 | 102 | Icon::get_wrapper_hover_css( $attributes ), |
| 97 | 103 | Icon::get_wrapper_hover_css( $attributes, 'Tablet' ), |
| 98 | - Icon::get_wrapper_hover_css( $attributes, 'Mobile' ) | |
| 104 | + Icon::get_wrapper_hover_css( $attributes, 'Mobile' ), | |
| 105 | + $css_generator->custom_device_map( function ( $device ) use ( $attributes ) { return Icon::get_wrapper_hover_css( $attributes, $device ); } ) | |
| 99 | 106 | ); |
| 100 | 107 | $css_generator->add_class_styles( |
| 101 | 108 | '{{WRAPPER}} svg > path', |
| 102 | 109 | $this->get_svg_css( $attributes ), |
| 103 | 110 | $this->get_svg_css( $attributes, 'Tablet' ), |
| 104 | - $this->get_svg_css( $attributes, 'Mobile' ) | |
| 111 | + $this->get_svg_css( $attributes, 'Mobile' ), | |
| 112 | + $css_generator->custom_device_map( function ( $device ) use ( $attributes ) { return $this->get_svg_css( $attributes, $device ); } ) | |
| 105 | 113 | ); |
| 106 | 114 | |
| 107 | 115 | $css_generator->add_class_styles( |
| 108 | 116 | '{{WRAPPER}} .ablocks-icon-wrap img.ablocks-image-icon', |
| @@ -108,8 +116,9 @@ | ||
| 108 | 116 | '{{WRAPPER}} .ablocks-icon-wrap img.ablocks-image-icon', |
| 109 | 117 | Icon::get_element_image_css( $attributes ), |
| 110 | 118 | Icon::get_element_image_css( $attributes, 'Tablet' ), |
| 111 | 119 | Icon::get_element_image_css( $attributes, 'Mobile' ), |
| 120 | + $css_generator->custom_device_map( function ( $device ) use ( $attributes ) { return Icon::get_element_image_css( $attributes, $device ); } ) | |
| 112 | 121 | ); |
| 113 | 122 | $css_generator->add_class_styles( |
| 114 | 123 | '{{WRAPPER}} .ablocks-icon-wrap img.ablocks-image-icon:hover', |
| 115 | 124 | Icon::get_element_image_hover_css( $attributes ), |
| @@ -114,8 +123,9 @@ | ||
| 114 | 123 | '{{WRAPPER}} .ablocks-icon-wrap img.ablocks-image-icon:hover', |
| 115 | 124 | Icon::get_element_image_hover_css( $attributes ), |
| 116 | 125 | Icon::get_element_image_hover_css( $attributes, 'Tablet' ), |
| 117 | 126 | Icon::get_element_image_hover_css( $attributes, 'Mobile' ), |
| 127 | + $css_generator->custom_device_map( function ( $device ) use ( $attributes ) { return Icon::get_element_image_hover_css( $attributes, $device ); } ) | |
| 118 | 128 | ); |
| 119 | 129 | $css_generator->add_class_styles( |
| 120 | 130 | '{{WRAPPER}} .ablocks-icon-wrap svg.ablocks-svg-icon', |
| 121 | 131 | Icon::get_element_css( $attributes ), |
| @@ -120,8 +130,9 @@ | ||
| 120 | 130 | '{{WRAPPER}} .ablocks-icon-wrap svg.ablocks-svg-icon', |
| 121 | 131 | Icon::get_element_css( $attributes ), |
| 122 | 132 | Icon::get_element_css( $attributes, 'Tablet' ), |
| 123 | 133 | Icon::get_element_css( $attributes, 'Mobile' ), |
| 134 | + $css_generator->custom_device_map( function ( $device ) use ( $attributes ) { return Icon::get_element_css( $attributes, $device ); } ) | |
| 124 | 135 | ); |
| 125 | 136 | $css_generator->add_class_styles( |
| 126 | 137 | '{{WRAPPER}} .ablocks-icon-wrap svg.ablocks-svg-icon:hover', |
| 127 | 138 | Icon::get_element_image_hover_css( $attributes ), |
| @@ -126,8 +137,9 @@ | ||
| 126 | 137 | '{{WRAPPER}} .ablocks-icon-wrap svg.ablocks-svg-icon:hover', |
| 127 | 138 | Icon::get_element_image_hover_css( $attributes ), |
| 128 | 139 | Icon::get_element_image_hover_css( $attributes, 'Tablet' ), |
| 129 | 140 | Icon::get_element_image_hover_css( $attributes, 'Mobile' ), |
| 141 | + $css_generator->custom_device_map( function ( $device ) use ( $attributes ) { return Icon::get_element_image_hover_css( $attributes, $device ); } ) | |
| 130 | 142 | ); |
| 131 | 143 | |
| 132 | 144 | return $css_generator->generate_css(); |
| 133 | 145 | } |