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