array( 'color' => $text_color_desktop, // Typography. 'font-size' => astra_responsive_font( $content_font_size, 'desktop' ), ), $builder_widget_selector . ' a' => array( 'color' => $link_color_desktop, ), $builder_widget_selector . ' a:hover' => array( 'color' => $link_h_color_desktop, ), $selector . ' .widget-title' => array( 'color' => $title_color_desktop, // Typography. 'font-size' => astra_responsive_font( $title_font_size, 'desktop' ), ), $selector => array( // Margin CSS. 'margin-top' => astra_responsive_spacing( $margin, 'top', 'desktop' ), 'margin-bottom' => astra_responsive_spacing( $margin, 'bottom', 'desktop' ), 'margin-left' => astra_responsive_spacing( $margin, 'left', 'desktop' ), 'margin-right' => astra_responsive_spacing( $margin, 'right', 'desktop' ), ), ); $css_output_tablet = array( $builder_widget_selector => array( 'color' => $text_color_tablet, // Typography. 'font-size' => astra_responsive_font( $content_font_size, 'tablet' ), ), $selector . ' .widget-title' => array( 'color' => $title_color_tablet, // Typography. 'font-size' => astra_responsive_font( $title_font_size, 'tablet' ), ), $builder_widget_selector . ' a' => array( 'color' => $link_color_tablet, ), $builder_widget_selector . ' a:hover' => array( 'color' => $link_h_color_tablet, ), $selector => array( // Margin CSS. 'margin-top' => astra_responsive_spacing( $margin, 'top', 'tablet' ), 'margin-bottom' => astra_responsive_spacing( $margin, 'bottom', 'tablet' ), 'margin-left' => astra_responsive_spacing( $margin, 'left', 'tablet' ), 'margin-right' => astra_responsive_spacing( $margin, 'right', 'tablet' ), ), ); $css_output_mobile = array( $builder_widget_selector => array( 'color' => $text_color_mobile, // Typography. 'font-size' => astra_responsive_font( $content_font_size, 'mobile' ), ), $selector . ' .widget-title' => array( 'color' => $title_color_mobile, // Typography. 'font-size' => astra_responsive_font( $title_font_size, 'mobile' ), ), $builder_widget_selector . ' a' => array( 'color' => $link_color_mobile, ), $builder_widget_selector . ' a:hover' => array( 'color' => $link_h_color_mobile, ), $selector => array( // Margin CSS. 'margin-top' => astra_responsive_spacing( $margin, 'top', 'mobile' ), 'margin-bottom' => astra_responsive_spacing( $margin, 'bottom', 'mobile' ), 'margin-left' => astra_responsive_spacing( $margin, 'left', 'mobile' ), 'margin-right' => astra_responsive_spacing( $margin, 'right', 'mobile' ), ), ); /* Parse CSS from array() */ $css_output = astra_parse_css( $css_output_desktop ); $css_output .= astra_parse_css( $css_output_tablet, '', astra_get_tablet_breakpoint() ); $css_output .= astra_parse_css( $css_output_mobile, '', astra_get_mobile_breakpoint() ); $css_output .= Astra_Builder_Base_Dynamic_CSS::prepare_visibility_css( $_section, $selector, 'block' ); $generated_css .= $css_output; } return $generated_css; } } /** * Kicking this off by creating object of this class. */ new Astra_Widget_Component_Dynamic_CSS();