| @@ -29,9 +29,10 @@ | ||
| 29 | 29 | $css_generator->add_class_styles( |
| 30 | 30 | '{{WRAPPER}}', |
| 31 | 31 | $this->get_wrapper_css( $attributes ), |
| 32 | 32 | $this->get_wrapper_css( $attributes, 'Tablet' ), |
| 33 | - $this->get_wrapper_css( $attributes, 'Mobile' ) | |
| 33 | + $this->get_wrapper_css( $attributes, 'Mobile' ), | |
| 34 | + $css_generator->custom_device_map( function ( $device ) use ( $attributes ) { return $this->get_wrapper_css( $attributes, $device ); } ) | |
| 34 | 35 | ); |
| 35 | 36 | // Generate wrapper CSS end |
| 36 | 37 | |
| 37 | 38 | // Generate button CSS start |
| @@ -38,9 +39,10 @@ | ||
| 38 | 39 | $css_generator->add_class_styles( |
| 39 | 40 | '{{WRAPPER}} .ablocks-block-container .ablocks-stripe-button', |
| 40 | 41 | $this->get_button_css( $attributes ), |
| 41 | 42 | $this->get_button_css( $attributes, 'Tablet' ), |
| 42 | - $this->get_button_css( $attributes, 'Mobile' ) | |
| 43 | + $this->get_button_css( $attributes, 'Mobile' ), | |
| 44 | + $css_generator->custom_device_map( function ( $device ) use ( $attributes ) { return $this->get_button_css( $attributes, $device ); } ) | |
| 43 | 45 | ); |
| 44 | 46 | // Generate button CSS end |
| 45 | 47 | |
| 46 | 48 | // Generate button hover CSS start |
| @@ -47,9 +49,10 @@ | ||
| 47 | 49 | $css_generator->add_class_styles( |
| 48 | 50 | '{{WRAPPER}} .ablocks-block-container .ablocks-stripe-button:hover', |
| 49 | 51 | $this->get_button_hover_css( $attributes ), |
| 50 | 52 | $this->get_button_hover_css( $attributes, 'Tablet' ), |
| 51 | - $this->get_button_hover_css( $attributes, 'Mobile' ) | |
| 53 | + $this->get_button_hover_css( $attributes, 'Mobile' ), | |
| 54 | + $css_generator->custom_device_map( function ( $device ) use ( $attributes ) { return $this->get_button_hover_css( $attributes, $device ); } ) | |
| 52 | 55 | ); |
| 53 | 56 | |
| 54 | 57 | // Generate button icon hover CSS |
| 55 | 58 | $css_generator->add_class_styles( |
| @@ -55,9 +58,10 @@ | ||
| 55 | 58 | $css_generator->add_class_styles( |
| 56 | 59 | '{{WRAPPER}} .ablocks-block-container .ablocks-stripe-button:hover .ablocks-icon-wrap svg.ablocks-svg-icon', |
| 57 | 60 | $this->get_icon_hover_css( $attributes ), |
| 58 | 61 | $this->get_icon_hover_css( $attributes, 'Tablet' ), |
| 59 | - $this->get_icon_hover_css( $attributes, 'Mobile' ) | |
| 62 | + $this->get_icon_hover_css( $attributes, 'Mobile' ), | |
| 63 | + $css_generator->custom_device_map( function ( $device ) use ( $attributes ) { return $this->get_icon_hover_css( $attributes, $device ); } ) | |
| 60 | 64 | ); |
| 61 | 65 | |
| 62 | 66 | // Generate button text CSS start |
| 63 | 67 | $css_generator->add_class_styles( |
| @@ -69,15 +73,17 @@ | ||
| 69 | 73 | $css_generator->add_class_styles( |
| 70 | 74 | '{{WRAPPER}} .ablocks-icon-wrap', |
| 71 | 75 | Icon::get_wrapper_css( $attributes ), |
| 72 | 76 | Icon::get_wrapper_css( $attributes, 'Tablet' ), |
| 73 | - Icon::get_wrapper_css( $attributes, 'Mobile' ) | |
| 77 | + Icon::get_wrapper_css( $attributes, 'Mobile' ), | |
| 78 | + $css_generator->custom_device_map( function ( $device ) use ( $attributes ) { return Icon::get_wrapper_css( $attributes, $device ); } ) | |
| 74 | 79 | ); |
| 75 | 80 | $css_generator->add_class_styles( |
| 76 | 81 | '{{WRAPPER}} .ablocks-icon-wrap:hover', |
| 77 | 82 | Icon::get_wrapper_hover_css( $attributes ), |
| 78 | 83 | Icon::get_wrapper_hover_css( $attributes, 'Tablet' ), |
| 79 | - Icon::get_wrapper_hover_css( $attributes, 'Mobile' ) | |
| 84 | + Icon::get_wrapper_hover_css( $attributes, 'Mobile' ), | |
| 85 | + $css_generator->custom_device_map( function ( $device ) use ( $attributes ) { return Icon::get_wrapper_hover_css( $attributes, $device ); } ) | |
| 80 | 86 | ); |
| 81 | 87 | |
| 82 | 88 | $css_generator->add_class_styles( |
| 83 | 89 | '{{WRAPPER}} .ablocks-icon-wrap img.ablocks-image-icon', |
| @@ -116,9 +122,10 @@ | ||
| 116 | 122 | $css_generator->add_class_styles( |
| 117 | 123 | '{{WRAPPER}}', |
| 118 | 124 | $this->get_wrapper_css( $attributes ), |
| 119 | 125 | $this->get_wrapper_css( $attributes, 'Tablet' ), |
| 120 | - $this->get_wrapper_css( $attributes, 'Mobile' ) | |
| 126 | + $this->get_wrapper_css( $attributes, 'Mobile' ), | |
| 127 | + $css_generator->custom_device_map( function ( $device ) use ( $attributes ) { return $this->get_wrapper_css( $attributes, $device ); } ) | |
| 121 | 128 | ); |
| 122 | 129 | // Generate wrapper CSS end |
| 123 | 130 | |
| 124 | 131 | // Generate button CSS start |
| @@ -125,9 +132,10 @@ | ||
| 125 | 132 | $css_generator->add_class_styles( |
| 126 | 133 | '{{WRAPPER}} .ablocks-stripe-button', |
| 127 | 134 | $this->get_button_css( $attributes ), |
| 128 | 135 | $this->get_button_css( $attributes, 'Tablet' ), |
| 129 | - $this->get_button_css( $attributes, 'Mobile' ) | |
| 136 | + $this->get_button_css( $attributes, 'Mobile' ), | |
| 137 | + $css_generator->custom_device_map( function ( $device ) use ( $attributes ) { return $this->get_button_css( $attributes, $device ); } ) | |
| 130 | 138 | ); |
| 131 | 139 | // Generate button CSS end |
| 132 | 140 | |
| 133 | 141 | // Generate button hover CSS start |
| @@ -134,9 +142,10 @@ | ||
| 134 | 142 | $css_generator->add_class_styles( |
| 135 | 143 | '{{WRAPPER}} .ablocks-stripe-button:hover', |
| 136 | 144 | $this->get_button_hover_css( $attributes ), |
| 137 | 145 | $this->get_button_hover_css( $attributes, 'Tablet' ), |
| 138 | - $this->get_button_hover_css( $attributes, 'Mobile' ) | |
| 146 | + $this->get_button_hover_css( $attributes, 'Mobile' ), | |
| 147 | + $css_generator->custom_device_map( function ( $device ) use ( $attributes ) { return $this->get_button_hover_css( $attributes, $device ); } ) | |
| 139 | 148 | ); |
| 140 | 149 | |
| 141 | 150 | // Generate button icon hover CSS |
| 142 | 151 | $css_generator->add_class_styles( |
| @@ -142,9 +151,10 @@ | ||
| 142 | 151 | $css_generator->add_class_styles( |
| 143 | 152 | '{{WRAPPER}} .ablocks-stripe-button:hover .ablocks-icon-wrap svg.ablocks-svg-icon', |
| 144 | 153 | $this->get_icon_hover_css( $attributes ), |
| 145 | 154 | $this->get_icon_hover_css( $attributes, 'Tablet' ), |
| 146 | - $this->get_icon_hover_css( $attributes, 'Mobile' ) | |
| 155 | + $this->get_icon_hover_css( $attributes, 'Mobile' ), | |
| 156 | + $css_generator->custom_device_map( function ( $device ) use ( $attributes ) { return $this->get_icon_hover_css( $attributes, $device ); } ) | |
| 147 | 157 | ); |
| 148 | 158 | |
| 149 | 159 | // Generate button text CSS start |
| 150 | 160 | $css_generator->add_class_styles( |
| @@ -156,15 +166,17 @@ | ||
| 156 | 166 | $css_generator->add_class_styles( |
| 157 | 167 | '{{WRAPPER}} .ablocks-icon-wrap', |
| 158 | 168 | Icon::get_wrapper_css( $attributes ), |
| 159 | 169 | Icon::get_wrapper_css( $attributes, 'Tablet' ), |
| 160 | - Icon::get_wrapper_css( $attributes, 'Mobile' ) | |
| 170 | + Icon::get_wrapper_css( $attributes, 'Mobile' ), | |
| 171 | + $css_generator->custom_device_map( function ( $device ) use ( $attributes ) { return Icon::get_wrapper_css( $attributes, $device ); } ) | |
| 161 | 172 | ); |
| 162 | 173 | $css_generator->add_class_styles( |
| 163 | 174 | '{{WRAPPER}} .ablocks-icon-wrap:hover', |
| 164 | 175 | Icon::get_wrapper_hover_css( $attributes ), |
| 165 | 176 | Icon::get_wrapper_hover_css( $attributes, 'Tablet' ), |
| 166 | - Icon::get_wrapper_hover_css( $attributes, 'Mobile' ) | |
| 177 | + Icon::get_wrapper_hover_css( $attributes, 'Mobile' ), | |
| 178 | + $css_generator->custom_device_map( function ( $device ) use ( $attributes ) { return Icon::get_wrapper_hover_css( $attributes, $device ); } ) | |
| 167 | 179 | ); |
| 168 | 180 | |
| 169 | 181 | $css_generator->add_class_styles( |
| 170 | 182 | '{{WRAPPER}} .ablocks-icon-wrap img.ablocks-image-icon', |
| @@ -170,8 +182,9 @@ | ||
| 170 | 182 | '{{WRAPPER}} .ablocks-icon-wrap img.ablocks-image-icon', |
| 171 | 183 | Icon::get_element_image_css( $attributes ), |
| 172 | 184 | Icon::get_element_image_css( $attributes, 'Tablet' ), |
| 173 | 185 | Icon::get_element_image_css( $attributes, 'Mobile' ), |
| 186 | + $css_generator->custom_device_map( function ( $device ) use ( $attributes ) { return Icon::get_element_image_css( $attributes, $device ); } ) | |
| 174 | 187 | ); |
| 175 | 188 | $css_generator->add_class_styles( |
| 176 | 189 | '{{WRAPPER}} .ablocks-icon-wrap img.ablocks-image-icon:hover', |
| 177 | 190 | Icon::get_element_image_hover_css( $attributes ), |
| @@ -176,8 +189,9 @@ | ||
| 176 | 189 | '{{WRAPPER}} .ablocks-icon-wrap img.ablocks-image-icon:hover', |
| 177 | 190 | Icon::get_element_image_hover_css( $attributes ), |
| 178 | 191 | Icon::get_element_image_hover_css( $attributes, 'Tablet' ), |
| 179 | 192 | Icon::get_element_image_hover_css( $attributes, 'Mobile' ), |
| 193 | + $css_generator->custom_device_map( function ( $device ) use ( $attributes ) { return Icon::get_element_image_hover_css( $attributes, $device ); } ) | |
| 180 | 194 | ); |
| 181 | 195 | $css_generator->add_class_styles( |
| 182 | 196 | '{{WRAPPER}} .ablocks-icon-wrap svg.ablocks-svg-icon', |
| 183 | 197 | Icon::get_element_css( $attributes ), |
| @@ -182,8 +196,9 @@ | ||
| 182 | 196 | '{{WRAPPER}} .ablocks-icon-wrap svg.ablocks-svg-icon', |
| 183 | 197 | Icon::get_element_css( $attributes ), |
| 184 | 198 | Icon::get_element_css( $attributes, 'Tablet' ), |
| 185 | 199 | Icon::get_element_css( $attributes, 'Mobile' ), |
| 200 | + $css_generator->custom_device_map( function ( $device ) use ( $attributes ) { return Icon::get_element_css( $attributes, $device ); } ) | |
| 186 | 201 | ); |
| 187 | 202 | $css_generator->add_class_styles( |
| 188 | 203 | '{{WRAPPER}} .ablocks-icon-wrap svg.ablocks-svg-icon:hover', |
| 189 | 204 | Icon::get_element_image_hover_css( $attributes ), |
| @@ -188,8 +203,9 @@ | ||
| 188 | 203 | '{{WRAPPER}} .ablocks-icon-wrap svg.ablocks-svg-icon:hover', |
| 189 | 204 | Icon::get_element_image_hover_css( $attributes ), |
| 190 | 205 | Icon::get_element_image_hover_css( $attributes, 'Tablet' ), |
| 191 | 206 | Icon::get_element_image_hover_css( $attributes, 'Mobile' ), |
| 207 | + $css_generator->custom_device_map( function ( $device ) use ( $attributes ) { return Icon::get_element_image_hover_css( $attributes, $device ); } ) | |
| 192 | 208 | ); |
| 193 | 209 | |
| 194 | 210 | return $css_generator->generate_css(); |
| 195 | 211 | } |