| @@ -23,9 +23,10 @@ | ||
| 23 | 23 | $css_generator->add_class_styles( |
| 24 | 24 | '{{WRAPPER}}.ablocks-block--social-shares .ablocks-block-container', |
| 25 | 25 | $this->get_share_css( $attributes, '' ), |
| 26 | 26 | $this->get_share_css( $attributes, 'Tablet' ), |
| 27 | - $this->get_share_css( $attributes, 'Mobile' ) | |
| 27 | + $this->get_share_css( $attributes, 'Mobile' ), | |
| 28 | + $css_generator->custom_device_map( function ( $device ) use ( $attributes ) { return $this->get_share_css( $attributes, $device ); } ) | |
| 28 | 29 | ); |
| 29 | 30 | // Social Button Styles |
| 30 | 31 | $css_generator->add_class_styles( |
| 31 | 32 | '{{WRAPPER}} .ablocks-block-container .ablocks-social-share', |
| @@ -37,9 +38,10 @@ | ||
| 37 | 38 | $css_generator->add_class_styles( |
| 38 | 39 | '{{WRAPPER}} .ablocks-block-container .ablocks-social-share:hover', |
| 39 | 40 | $this->get_share_border_hover_css( $attributes, '' ), |
| 40 | 41 | $this->get_share_border_hover_css( $attributes, 'Tablet' ), |
| 41 | - $this->get_share_border_hover_css( $attributes, 'Mobile' ) | |
| 42 | + $this->get_share_border_hover_css( $attributes, 'Mobile' ), | |
| 43 | + $css_generator->custom_device_map( function ( $device ) use ( $attributes ) { return $this->get_share_border_hover_css( $attributes, $device ); } ) | |
| 42 | 44 | ); |
| 43 | 45 | // share Icon Size |
| 44 | 46 | $css_generator->add_class_styles( |
| 45 | 47 | '{{WRAPPER}} .ablocks-social-share > .ablocks-svg-icon', |
| @@ -57,15 +59,17 @@ | ||
| 57 | 59 | $css_generator->add_class_styles( |
| 58 | 60 | '{{WRAPPER}} .ablocks-social-share-item', |
| 59 | 61 | $this->get_item_border_css( $attributes ), |
| 60 | 62 | $this->get_item_border_css( $attributes, 'Tablet' ), |
| 61 | - $this->get_item_border_css( $attributes, 'Mobile' ) | |
| 63 | + $this->get_item_border_css( $attributes, 'Mobile' ), | |
| 64 | + $css_generator->custom_device_map( function ( $device ) use ( $attributes ) { return $this->get_item_border_css( $attributes, $device ); } ) | |
| 62 | 65 | ); |
| 63 | 66 | $css_generator->add_class_styles( |
| 64 | 67 | '{{WRAPPER}} .ablocks-block-container .ablocks-social-share-item:hover', |
| 65 | 68 | $this->get_Item_border_hover_css( $attributes ), |
| 66 | 69 | $this->get_Item_border_hover_css( $attributes, 'Tablet' ), |
| 67 | - $this->get_Item_border_hover_css( $attributes, 'Mobile' ) | |
| 70 | + $this->get_Item_border_hover_css( $attributes, 'Mobile' ), | |
| 71 | + $css_generator->custom_device_map( function ( $device ) use ( $attributes ) { return $this->get_Item_border_hover_css( $attributes, $device ); } ) | |
| 68 | 72 | ); |
| 69 | 73 | $css_generator->add_class_styles( |
| 70 | 74 | '{{WRAPPER}} .ablocks-social-share-item--icon', |
| 71 | 75 | $this->get_share_item_css( $attributes ), |
| @@ -81,9 +85,10 @@ | ||
| 81 | 85 | $css_generator->add_class_styles( |
| 82 | 86 | '{{WRAPPER}} .ablocks-social-share-item--text', |
| 83 | 87 | $this->get_share_item_text_css( $attributes, '' ), |
| 84 | 88 | $this->get_share_item_text_css( $attributes, 'Tablet' ), |
| 85 | - $this->get_share_item_text_css( $attributes, 'Mobile' ) | |
| 89 | + $this->get_share_item_text_css( $attributes, 'Mobile' ), | |
| 90 | + $css_generator->custom_device_map( function ( $device ) use ( $attributes ) { return $this->get_share_item_text_css( $attributes, $device ); } ) | |
| 86 | 91 | ); |
| 87 | 92 | return $css_generator->generate_css(); |
| 88 | 93 | } |
| 89 | 94 | public function build_css_v2( $attributes ) { |
| @@ -92,9 +97,10 @@ | ||
| 92 | 97 | '{{WRAPPER}}.ablocks-block--social-shares:not(.ablocks-has-container), |
| 93 | 98 | {{WRAPPER}}.ablocks-block--social-shares .ablocks-block-container', |
| 94 | 99 | $this->get_share_css( $attributes, '' ), |
| 95 | 100 | $this->get_share_css( $attributes, 'Tablet' ), |
| 96 | - $this->get_share_css( $attributes, 'Mobile' ) | |
| 101 | + $this->get_share_css( $attributes, 'Mobile' ), | |
| 102 | + $css_generator->custom_device_map( function ( $device ) use ( $attributes ) { return $this->get_share_css( $attributes, $device ); } ) | |
| 97 | 103 | ); |
| 98 | 104 | // Social Button Styles |
| 99 | 105 | $css_generator->add_class_styles( |
| 100 | 106 | '{{WRAPPER}} .ablocks-social-share', |
| @@ -106,9 +112,10 @@ | ||
| 106 | 112 | $css_generator->add_class_styles( |
| 107 | 113 | '{{WRAPPER}} .ablocks-social-share:hover', |
| 108 | 114 | $this->get_share_border_hover_css( $attributes, '' ), |
| 109 | 115 | $this->get_share_border_hover_css( $attributes, 'Tablet' ), |
| 110 | - $this->get_share_border_hover_css( $attributes, 'Mobile' ) | |
| 116 | + $this->get_share_border_hover_css( $attributes, 'Mobile' ), | |
| 117 | + $css_generator->custom_device_map( function ( $device ) use ( $attributes ) { return $this->get_share_border_hover_css( $attributes, $device ); } ) | |
| 111 | 118 | ); |
| 112 | 119 | |
| 113 | 120 | // share Icon Size |
| 114 | 121 | $css_generator->add_class_styles( |
| @@ -127,15 +134,17 @@ | ||
| 127 | 134 | $css_generator->add_class_styles( |
| 128 | 135 | '{{WRAPPER}} .ablocks-social-share-item', |
| 129 | 136 | $this->get_item_border_css( $attributes ), |
| 130 | 137 | $this->get_item_border_css( $attributes, 'Tablet' ), |
| 131 | - $this->get_item_border_css( $attributes, 'Mobile' ) | |
| 138 | + $this->get_item_border_css( $attributes, 'Mobile' ), | |
| 139 | + $css_generator->custom_device_map( function ( $device ) use ( $attributes ) { return $this->get_item_border_css( $attributes, $device ); } ) | |
| 132 | 140 | ); |
| 133 | 141 | $css_generator->add_class_styles( |
| 134 | 142 | '{{WRAPPER}} .ablocks-social-share-item:hover', |
| 135 | 143 | $this->get_Item_border_hover_css( $attributes ), |
| 136 | 144 | $this->get_Item_border_hover_css( $attributes, 'Tablet' ), |
| 137 | - $this->get_Item_border_hover_css( $attributes, 'Mobile' ) | |
| 145 | + $this->get_Item_border_hover_css( $attributes, 'Mobile' ), | |
| 146 | + $css_generator->custom_device_map( function ( $device ) use ( $attributes ) { return $this->get_Item_border_hover_css( $attributes, $device ); } ) | |
| 138 | 147 | ); |
| 139 | 148 | $css_generator->add_class_styles( |
| 140 | 149 | '{{WRAPPER}} .ablocks-social-share-item--icon', |
| 141 | 150 | $this->get_share_item_css( $attributes ), |
| @@ -140,8 +149,9 @@ | ||
| 140 | 149 | '{{WRAPPER}} .ablocks-social-share-item--icon', |
| 141 | 150 | $this->get_share_item_css( $attributes ), |
| 142 | 151 | $this->get_share_item_css( $attributes, 'Tablet' ), |
| 143 | 152 | $this->get_share_item_css( $attributes, 'Mobile' ), |
| 153 | + $css_generator->custom_device_map( function ( $device ) use ( $attributes ) { return $this->get_share_item_css( $attributes, $device ); } ) | |
| 144 | 154 | ); |
| 145 | 155 | $css_generator->add_class_styles( |
| 146 | 156 | '{{WRAPPER}} .ablocks-social-share-item--icon>.ablocks-svg-icon', |
| 147 | 157 | $this->shareItemIconSVG( $attributes ), |
| @@ -146,14 +156,16 @@ | ||
| 146 | 156 | '{{WRAPPER}} .ablocks-social-share-item--icon>.ablocks-svg-icon', |
| 147 | 157 | $this->shareItemIconSVG( $attributes ), |
| 148 | 158 | $this->shareItemIconSVG( $attributes, 'Tablet' ), |
| 149 | 159 | $this->shareItemIconSVG( $attributes, 'Mobile' ), |
| 160 | + $css_generator->custom_device_map( function ( $device ) use ( $attributes ) { return $this->shareItemIconSVG( $attributes, $device ); } ) | |
| 150 | 161 | ); |
| 151 | 162 | $css_generator->add_class_styles( |
| 152 | 163 | '{{WRAPPER}} .ablocks-social-share-item--text', |
| 153 | 164 | $this->get_share_item_text_css( $attributes, '' ), |
| 154 | 165 | $this->get_share_item_text_css( $attributes, 'Tablet' ), |
| 155 | - $this->get_share_item_text_css( $attributes, 'Mobile' ) | |
| 166 | + $this->get_share_item_text_css( $attributes, 'Mobile' ), | |
| 167 | + $css_generator->custom_device_map( function ( $device ) use ( $attributes ) { return $this->get_share_item_text_css( $attributes, $device ); } ) | |
| 156 | 168 | ); |
| 157 | 169 | return $css_generator->generate_css(); |
| 158 | 170 | } |
| 159 | 171 | public function build_css( $attributes ) { |