block_name ); $css_generator->add_class_styles( '{{WRAPPER}} .ablocks-notice-header', $this->get_notice_header_css( $attributes ), $this->get_notice_header_css( $attributes, 'Tablet' ), $this->get_notice_header_css( $attributes, 'Mobile' ) ); $css_generator->add_class_styles( '{{WRAPPER}} .ablocks-notice-header .ablocks-notice-title', $this->get_notice_header_title_css( $attributes ), $this->get_notice_header_title_css( $attributes, 'Tablet' ), $this->get_notice_header_title_css( $attributes, 'Mobile' ) ); // Icon CSS $css_generator->add_class_styles( '{{WRAPPER}} .ablocks-notice-header .ablocks-icon-wrap', Icon::get_wrapper_css( $attributes ), Icon::get_wrapper_css( $attributes, 'Tablet' ), Icon::get_wrapper_css( $attributes, 'Mobile' ) ); $css_generator->add_class_styles( '{{WRAPPER}} .ablocks-notice-header .ablocks-icon-wrap img.ablocks-image-icon', Icon::get_element_image_css( $attributes ), Icon::get_element_image_css( $attributes, 'Tablet' ), Icon::get_element_image_css( $attributes, 'Mobile' ), ); $css_generator->add_class_styles( '{{WRAPPER}} .ablocks-notice-header .ablocks-icon-wrap img.ablocks-image-icon:hover', Icon::get_element_image_hover_css( $attributes ), Icon::get_element_image_hover_css( $attributes, 'Tablet' ), Icon::get_element_image_hover_css( $attributes, 'Mobile' ), ); $css_generator->add_class_styles( '{{WRAPPER}} .ablocks-notice-header .ablocks-icon-wrap svg.ablocks-svg-icon', Icon::get_element_css( $attributes ), Icon::get_element_css( $attributes, 'Tablet' ), Icon::get_element_css( $attributes, 'Mobile' ), ); $css_generator->add_class_styles( '{{WRAPPER}} .ablocks-notice-header .ablocks-icon-wrap svg.ablocks-svg-icon:hover', Icon::get_element_image_hover_css( $attributes ), Icon::get_element_image_hover_css( $attributes, 'Tablet' ), Icon::get_element_image_hover_css( $attributes, 'Mobile' ), ); return $css_generator->generate_css(); } public function get_notice_header_css( $attributes, $device = '' ) { $css = []; if ( ! empty( $attributes['backgroundColor'] ) ) { $css['background'] = $attributes['backgroundColor']; } return array_merge( Dimensions::get_css( $attributes['noticeHeaderPadding'], 'padding', $device ), $css ); } public function get_notice_header_title_css( $attributes, $device = '' ) { $css = []; if ( ! empty( $attributes['textColor'] ) ) { $css['color'] = $attributes['textColor']; } return array_merge( Alignment::get_css( $attributes['alignment'], 'justify-content', $device ), Typography::get_css( $attributes['typography'], '', $device ), TextShadow::get_css( $attributes['textShadow'], '', $device ), TextStroke::get_css( $attributes['textStroke'], '', $device ), $css, ); } }