| @@ -24,15 +24,17 @@ | ||
| 24 | 24 | $css_generator->add_class_styles( |
| 25 | 25 | '{{WRAPPER}}', |
| 26 | 26 | $this->get_wrapper_css( $attributes ), |
| 27 | 27 | $this->get_wrapper_css( $attributes, 'Tablet' ), |
| 28 | - $this->get_wrapper_css( $attributes, 'Mobile' ) | |
| 28 | + $this->get_wrapper_css( $attributes, 'Mobile' ), | |
| 29 | + $css_generator->custom_device_map( function ( $device ) use ( $attributes ) { return $this->get_wrapper_css( $attributes, $device ); } ) | |
| 29 | 30 | ); |
| 30 | 31 | $css_generator->add_class_styles( |
| 31 | 32 | '{{WRAPPER}} .ablocks-block--certificate__verification-id', |
| 32 | 33 | $this->get_verification_id_css( $attributes ), |
| 33 | 34 | $this->get_verification_id_css( $attributes, 'Tablet' ), |
| 34 | - $this->get_verification_id_css( $attributes, 'Mobile' ) | |
| 35 | + $this->get_verification_id_css( $attributes, 'Mobile' ), | |
| 36 | + $css_generator->custom_device_map( function ( $device ) use ( $attributes ) { return $this->get_verification_id_css( $attributes, $device ); } ) | |
| 35 | 37 | ); |
| 36 | 38 | |
| 37 | 39 | return $css_generator->generate_css(); |
| 38 | 40 | } |
| @@ -42,9 +44,10 @@ | ||
| 42 | 44 | } |
| 43 | 45 | |
| 44 | 46 | public function get_verification_id_css( $attributes, $device = '' ) { |
| 45 | 47 | $css = array(); |
| 46 | - $typography_css = ! empty( $attributes['typography'] ) ? Typography::get_css( $attributes['typography'], '', $device ) : array(); | |
| 48 | + $typographyValueGlobal = ! empty( $attributes['typographyGlobal'] ) ? $attributes['typographyGlobal'] : ''; | |
| 49 | + $typography_css = ! empty( $attributes['typography'] ) ? Typography::get_css( $attributes['typography'], '', $device, $typographyValueGlobal ) : array(); | |
| 47 | 50 | $textAlignCss = ! empty( $attributes['alignment'] ) ? Alignment::get_css( $attributes['alignment'], 'text-align', $device ) : []; |
| 48 | 51 | $css['width'] = '100%'; |
| 49 | 52 | $css['display'] = 'block'; |
| 50 | 53 | return array_merge( $typography_css, $textAlignCss, $css ); |