summaryrefslogtreecommitdiff
path: root/inc/builder/type/header/mobile-trigger
diff options
context:
space:
mode:
authorZach van Rijn <me@zv.io>2021-07-21 14:54:07 -0500
committerZach van Rijn <me@zv.io>2021-07-21 14:54:07 -0500
commit9d4123cee1867ee7199b06bdc92d40611f547ecc (patch)
tree6d864e2725242863afed1f8ba12d9c7a9bc63a69 /inc/builder/type/header/mobile-trigger
downloadblog-ng-9d4123cee1867ee7199b06bdc92d40611f547ecc.tar.gz
blog-ng-9d4123cee1867ee7199b06bdc92d40611f547ecc.tar.bz2
blog-ng-9d4123cee1867ee7199b06bdc92d40611f547ecc.tar.xz
blog-ng-9d4123cee1867ee7199b06bdc92d40611f547ecc.zip
Initial unmodified import from Astra (Version: 3.6.5) @ /wp-content/themes/astra/.
Diffstat (limited to 'inc/builder/type/header/mobile-trigger')
-rw-r--r--inc/builder/type/header/mobile-trigger/assets/js/minified/customizer-preview.min.js1
-rw-r--r--inc/builder/type/header/mobile-trigger/assets/js/unminified/customizer-preview.js128
-rw-r--r--inc/builder/type/header/mobile-trigger/class-astra-mobile-trigger-loader.php54
-rw-r--r--inc/builder/type/header/mobile-trigger/class-astra-mobile-trigger.php44
-rw-r--r--inc/builder/type/header/mobile-trigger/dynamic-css/dynamic.css.php184
5 files changed, 411 insertions, 0 deletions
diff --git a/inc/builder/type/header/mobile-trigger/assets/js/minified/customizer-preview.min.js b/inc/builder/type/header/mobile-trigger/assets/js/minified/customizer-preview.min.js
new file mode 100644
index 0000000..40c6536
--- /dev/null
+++ b/inc/builder/type/header/mobile-trigger/assets/js/minified/customizer-preview.min.js
@@ -0,0 +1 @@
+!function(){var i=astraBuilderPreview.tablet_break_point||768,a=astraBuilderPreview.mobile_break_point||544;astra_css("astra-settings[mobile-header-toggle-btn-color]","fill",'[data-section="section-header-mobile-trigger"] .ast-button-wrap .mobile-menu-toggle-icon .ast-mobile-svg'),astra_css("astra-settings[mobile-header-toggle-btn-color]","color",'[data-section="section-header-mobile-trigger"] .ast-button-wrap .mobile-menu-wrap .mobile-menu'),astra_css("astra-settings[mobile-header-toggle-icon-size]","width",'[data-section="section-header-mobile-trigger"] .ast-button-wrap .mobile-menu-toggle-icon .ast-mobile-svg',"px"),astra_css("astra-settings[mobile-header-toggle-icon-size]","height",'[data-section="section-header-mobile-trigger"] .ast-button-wrap .mobile-menu-toggle-icon .ast-mobile-svg',"px"),astra_css("astra-settings[mobile-header-toggle-btn-bg-color]","background",'[data-section="section-header-mobile-trigger"] .ast-button-wrap .menu-toggle.ast-mobile-menu-trigger-fill'),wp.customize("astra-settings[mobile-header-toggle-btn-border-size]",function(t){t.bind(function(t){var e='[data-section="section-header-mobile-trigger"] .ast-button-wrap .menu-toggle.main-header-menu-toggle {';e+="border-top-width:"+t.top+"px;",e+="border-right-width:"+t.right+"px;",e+="border-left-width:"+t.left+"px;",e+="border-bottom-width:"+t.bottom+"px;",e+="} ",astra_add_dynamic_css("astra-settings[mobile-header-toggle-btn-border-size]",e)})}),astra_css("astra-settings[mobile-header-toggle-border-radius]","border-radius",'[data-section="section-header-mobile-trigger"] .ast-button-wrap .menu-toggle.main-header-menu-toggle',"px"),astra_css("astra-settings[mobile-header-toggle-border-color]","border-color",'[data-section="section-header-mobile-trigger"] .ast-button-wrap .menu-toggle.ast-mobile-menu-trigger-outline, [data-section="section-header-mobile-trigger"] .ast-button-wrap .menu-toggle.ast-mobile-menu-trigger-fill'),wp.customize("astra-settings[section-header-mobile-trigger-margin]",function(t){t.bind(function(t){var e,o;""==t.desktop.bottom&&""==t.desktop.top&&""==t.desktop.left&&""==t.desktop.right&&""==t.tablet.bottom&&""==t.tablet.top&&""==t.tablet.left&&""==t.tablet.right&&""==t.mobile.bottom&&""==t.mobile.top&&""==t.mobile.left&&""==t.mobile.right||(o="",o+=(e='[data-section="section-header-mobile-trigger"] .ast-button-wrap .menu-toggle.main-header-menu-toggle')+" {",o+="margin-left: "+t.desktop.left+t["desktop-unit"]+";",o+="margin-right: "+t.desktop.right+t["desktop-unit"]+";",o+="margin-top: "+t.desktop.top+t["desktop-unit"]+";",o+="margin-bottom: "+t.desktop.bottom+t["desktop-unit"]+";",o+="} ",o+="@media (max-width: "+i+"px) {",o+=e+" {",o+="margin-left: "+t.tablet.left+t["tablet-unit"]+";",o+="margin-right: "+t.tablet.right+t["tablet-unit"]+";",o+="margin-top: "+t.tablet.top+t["desktop-unit"]+";",o+="margin-bottom: "+t.tablet.bottom+t["desktop-unit"]+";",o+="} ",o+="} ",o+="@media (max-width: "+a+"px) {",o+=e+" {",o+="margin-left: "+t.mobile.left+t["mobile-unit"]+";",o+="margin-right: "+t.mobile.right+t["mobile-unit"]+";",o+="margin-top: "+t.mobile.top+t["desktop-unit"]+";",o+="margin-bottom: "+t.mobile.bottom+t["desktop-unit"]+";",o+="} ",o+="} ",astra_add_dynamic_css("header-mobile-trigger-margin",o))})}),astra_css("astra-settings[mobile-header-label-font-size]","font-size",'[data-section="section-header-mobile-trigger"] .ast-button-wrap .mobile-menu-wrap .mobile-menu',"px")}(jQuery); \ No newline at end of file
diff --git a/inc/builder/type/header/mobile-trigger/assets/js/unminified/customizer-preview.js b/inc/builder/type/header/mobile-trigger/assets/js/unminified/customizer-preview.js
new file mode 100644
index 0000000..16c2454
--- /dev/null
+++ b/inc/builder/type/header/mobile-trigger/assets/js/unminified/customizer-preview.js
@@ -0,0 +1,128 @@
+/**
+ * This file adds some LIVE to the Customizer live preview. To leverage
+ * this, set your custom settings to 'postMessage' and then add your handling
+ * here. Your javascript should grab settings from customizer controls, and
+ * then make any necessary changes to the page using jQuery.
+ *
+ * @package Astra
+ * @since 3.0.0
+ */
+
+( function( $ ) {
+
+ var tablet_break_point = astraBuilderPreview.tablet_break_point || 768,
+ mobile_break_point = astraBuilderPreview.mobile_break_point || 544;
+
+ // Trigger Icon Color.
+ astra_css(
+ 'astra-settings[mobile-header-toggle-btn-color]',
+ 'fill',
+ '[data-section="section-header-mobile-trigger"] .ast-button-wrap .mobile-menu-toggle-icon .ast-mobile-svg'
+ );
+
+ // Trigger Label Color.
+ astra_css(
+ 'astra-settings[mobile-header-toggle-btn-color]',
+ 'color',
+ '[data-section="section-header-mobile-trigger"] .ast-button-wrap .mobile-menu-wrap .mobile-menu'
+ );
+
+ // Trigger Icon Width.
+ astra_css(
+ 'astra-settings[mobile-header-toggle-icon-size]',
+ 'width',
+ '[data-section="section-header-mobile-trigger"] .ast-button-wrap .mobile-menu-toggle-icon .ast-mobile-svg',
+ 'px'
+ );
+
+ // Trigger Icon Height.
+ astra_css(
+ 'astra-settings[mobile-header-toggle-icon-size]',
+ 'height',
+ '[data-section="section-header-mobile-trigger"] .ast-button-wrap .mobile-menu-toggle-icon .ast-mobile-svg',
+ 'px'
+ );
+
+ // Trigger Button Background Color.
+ astra_css(
+ 'astra-settings[mobile-header-toggle-btn-bg-color]',
+ 'background',
+ '[data-section="section-header-mobile-trigger"] .ast-button-wrap .menu-toggle.ast-mobile-menu-trigger-fill'
+ );
+
+ // Border Size for Trigger Button.
+ wp.customize( 'astra-settings[mobile-header-toggle-btn-border-size]', function( setting ) {
+ setting.bind( function( border ) {
+ var dynamicStyle = '[data-section="section-header-mobile-trigger"] .ast-button-wrap .menu-toggle.main-header-menu-toggle {';
+ dynamicStyle += 'border-top-width:' + border.top + 'px;';
+ dynamicStyle += 'border-right-width:' + border.right + 'px;';
+ dynamicStyle += 'border-left-width:' + border.left + 'px;';
+ dynamicStyle += 'border-bottom-width:' + border.bottom + 'px;';
+ dynamicStyle += '} ';
+ astra_add_dynamic_css( 'astra-settings[mobile-header-toggle-btn-border-size]', dynamicStyle );
+ } );
+ } );
+
+ // Border Radius.
+ astra_css(
+ 'astra-settings[mobile-header-toggle-border-radius]',
+ 'border-radius',
+ '[data-section="section-header-mobile-trigger"] .ast-button-wrap .menu-toggle.main-header-menu-toggle',
+ 'px'
+ );
+
+ // Border Color.
+ astra_css(
+ 'astra-settings[mobile-header-toggle-border-color]',
+ 'border-color',
+ '[data-section="section-header-mobile-trigger"] .ast-button-wrap .menu-toggle.ast-mobile-menu-trigger-outline, [data-section="section-header-mobile-trigger"] .ast-button-wrap .menu-toggle.ast-mobile-menu-trigger-fill'
+ );
+
+ // Margin.
+ wp.customize( 'astra-settings[section-header-mobile-trigger' + '-margin]', function( value ) {
+ value.bind( function( margin ) {
+ if(
+ margin.desktop.bottom != '' || margin.desktop.top != '' || margin.desktop.left != '' || margin.desktop.right != '' ||
+ margin.tablet.bottom != '' || margin.tablet.top != '' || margin.tablet.left != '' || margin.tablet.right != '' ||
+ margin.mobile.bottom != '' || margin.mobile.top != '' || margin.mobile.left != '' || margin.mobile.right != ''
+ ) {
+ var selector = '[data-section="section-header-mobile-trigger"] .ast-button-wrap .menu-toggle.main-header-menu-toggle';
+ var dynamicStyle = '';
+ dynamicStyle += selector + ' {';
+ dynamicStyle += 'margin-left: ' + margin['desktop']['left'] + margin['desktop-unit'] + ';';
+ dynamicStyle += 'margin-right: ' + margin['desktop']['right'] + margin['desktop-unit'] + ';';
+ dynamicStyle += 'margin-top: ' + margin['desktop']['top'] + margin['desktop-unit'] + ';';
+ dynamicStyle += 'margin-bottom: ' + margin['desktop']['bottom'] + margin['desktop-unit'] + ';';
+ dynamicStyle += '} ';
+
+ dynamicStyle += '@media (max-width: ' + tablet_break_point + 'px) {';
+ dynamicStyle += selector + ' {';
+ dynamicStyle += 'margin-left: ' + margin['tablet']['left'] + margin['tablet-unit'] + ';';
+ dynamicStyle += 'margin-right: ' + margin['tablet']['right'] + margin['tablet-unit'] + ';';
+ dynamicStyle += 'margin-top: ' + margin['tablet']['top'] + margin['desktop-unit'] + ';';
+ dynamicStyle += 'margin-bottom: ' + margin['tablet']['bottom'] + margin['desktop-unit'] + ';';
+ dynamicStyle += '} ';
+ dynamicStyle += '} ';
+
+ dynamicStyle += '@media (max-width: ' + mobile_break_point + 'px) {';
+ dynamicStyle += selector + ' {';
+ dynamicStyle += 'margin-left: ' + margin['mobile']['left'] + margin['mobile-unit'] + ';';
+ dynamicStyle += 'margin-right: ' + margin['mobile']['right'] + margin['mobile-unit'] + ';';
+ dynamicStyle += 'margin-top: ' + margin['mobile']['top'] + margin['desktop-unit'] + ';';
+ dynamicStyle += 'margin-bottom: ' + margin['mobile']['bottom'] + margin['desktop-unit'] + ';';
+ dynamicStyle += '} ';
+ dynamicStyle += '} ';
+ astra_add_dynamic_css( 'header-mobile-trigger-margin', dynamicStyle );
+ }
+ } );
+ } );
+
+ // Trigger Typography.
+ astra_css(
+ 'astra-settings[mobile-header-label-font-size]',
+ 'font-size',
+ '[data-section="section-header-mobile-trigger"] .ast-button-wrap .mobile-menu-wrap .mobile-menu',
+ 'px'
+ );
+
+} )( jQuery );
diff --git a/inc/builder/type/header/mobile-trigger/class-astra-mobile-trigger-loader.php b/inc/builder/type/header/mobile-trigger/class-astra-mobile-trigger-loader.php
new file mode 100644
index 0000000..ccfcba1
--- /dev/null
+++ b/inc/builder/type/header/mobile-trigger/class-astra-mobile-trigger-loader.php
@@ -0,0 +1,54 @@
+<?php
+/**
+ * Mobile Trigger Loader.
+ *
+ * @package astra-builder
+ * @author Brainstorm Force
+ * @copyright Copyright (c) 2020, Brainstorm Force
+ * @link https://www.brainstormforce.com
+ * @since 3.0.0
+ */
+
+if ( ! defined( 'ABSPATH' ) ) {
+ exit; // Exit if accessed directly.
+}
+
+/**
+ * Class Mobile Trigger Loader.
+ *
+ * Loads config files.
+ *
+ * @since 3.0.0
+ */
+class Astra_Mobile_Trigger_Loader {
+
+ /**
+ * Constructor
+ *
+ * @since 3.0.0
+ */
+ public function __construct() {
+ add_action( 'customize_preview_init', array( $this, 'preview_scripts' ), 110 );
+ }
+
+ /**
+ * Customizer Preview
+ *
+ * @since 3.0.0
+ */
+ public function preview_scripts() {
+ /**
+ * Load unminified if SCRIPT_DEBUG is true.
+ */
+ /* Directory and Extension */
+ $dir_name = ( SCRIPT_DEBUG ) ? 'unminified' : 'minified';
+ $file_prefix = ( SCRIPT_DEBUG ) ? '' : '.min';
+ wp_enqueue_script( 'astra-mobile-trigger-customizer-preview-js', ASTRA_MOBILE_TRIGGER_URI . '/assets/js/' . $dir_name . '/customizer-preview' . $file_prefix . '.js', array( 'customize-preview', 'astra-customizer-preview-js' ), ASTRA_THEME_VERSION, true );
+
+ }
+}
+
+/**
+* Kicking this off by creating the object of the class.
+*/
+new Astra_Mobile_Trigger_Loader();
diff --git a/inc/builder/type/header/mobile-trigger/class-astra-mobile-trigger.php b/inc/builder/type/header/mobile-trigger/class-astra-mobile-trigger.php
new file mode 100644
index 0000000..c025edf
--- /dev/null
+++ b/inc/builder/type/header/mobile-trigger/class-astra-mobile-trigger.php
@@ -0,0 +1,44 @@
+<?php
+/**
+ * Mobile Trigger.
+ *
+ * @package astra-builder
+ * @author Brainstorm Force
+ * @copyright Copyright (c) 2020, Brainstorm Force
+ * @link https://www.brainstormforce.com
+ * @since 3.0.0
+ */
+
+if ( ! defined( 'ABSPATH' ) ) {
+ exit; // Exit if accessed directly.
+}
+
+define( 'ASTRA_MOBILE_TRIGGER_DIR', ASTRA_THEME_DIR . 'inc/builder/type/header/mobile-trigger' );
+define( 'ASTRA_MOBILE_TRIGGER_URI', ASTRA_THEME_URI . 'inc/builder/type/header/mobile-trigger' );
+
+/**
+ * Mobile Trigger Initial Setup
+ *
+ * @since 3.0.0
+ */
+class Astra_Mobile_Trigger {
+
+ /**
+ * Constructor function that initializes required actions and hooks.
+ */
+ public function __construct() {
+ // @codingStandardsIgnoreStart WPThemeReview.CoreFunctionality.FileInclude.FileIncludeFound
+ require_once ASTRA_MOBILE_TRIGGER_DIR . '/class-astra-mobile-trigger-loader.php';
+
+ // Include front end files.
+ if ( ! is_admin() ) {
+ require_once ASTRA_MOBILE_TRIGGER_DIR . '/dynamic-css/dynamic.css.php';
+ }
+ // @codingStandardsIgnoreEnd WPThemeReview.CoreFunctionality.FileInclude.FileIncludeFound
+ }
+}
+
+/**
+ * Kicking this off by creating an object.
+ */
+new Astra_Mobile_Trigger();
diff --git a/inc/builder/type/header/mobile-trigger/dynamic-css/dynamic.css.php b/inc/builder/type/header/mobile-trigger/dynamic-css/dynamic.css.php
new file mode 100644
index 0000000..b7bbbbb
--- /dev/null
+++ b/inc/builder/type/header/mobile-trigger/dynamic-css/dynamic.css.php
@@ -0,0 +1,184 @@
+<?php
+/**
+ * Mobile Trigger - Dynamic CSS
+ *
+ * @package astra-builder
+ * @since 3.0.0
+ */
+
+if ( ! defined( 'ABSPATH' ) ) {
+ exit; // Exit if accessed directly.
+}
+
+/**
+ * Mobile Trigger.
+ */
+add_filter( 'astra_dynamic_theme_css', 'astra_mobile_trigger_row_setting', 11 );
+
+/**
+ * Mobile Trigger - Dynamic CSS
+ *
+ * @param string $dynamic_css Astra Dynamic CSS.
+ * @param string $dynamic_css_filtered Astra Dynamic CSS Filters.
+ * @return String Generated dynamic CSS for Heading Colors.
+ *
+ * @since 3.0.0
+ */
+function astra_mobile_trigger_row_setting( $dynamic_css, $dynamic_css_filtered = '' ) {
+
+ if ( ! Astra_Builder_Helper::is_component_loaded( 'mobile-trigger', 'header', 'mobile' ) ) {
+ return $dynamic_css;
+ }
+
+ $_section = 'section-header-mobile-trigger';
+
+ $selector = '[data-section="section-header-mobile-trigger"]';
+
+ $theme_color = astra_get_option( 'theme-color' );
+ $icon_size = astra_get_option( 'mobile-header-toggle-icon-size' );
+ $trigger_bg = astra_get_option( 'mobile-header-toggle-btn-bg-color', $theme_color );
+ $trigger_border_width = astra_get_option( 'mobile-header-toggle-btn-border-size' );
+ $trigger_border_color = astra_get_option( 'mobile-header-toggle-border-color', $trigger_bg );
+ $trigger_border_radius = astra_get_option( 'mobile-header-toggle-border-radius' );
+ $font_size = astra_get_option( 'mobile-header-label-font-size' );
+ $style = astra_get_option( 'mobile-header-toggle-btn-style' );
+ $default = '#ffffff';
+
+ if ( 'fill' !== $style ) {
+ $default = $theme_color;
+ }
+
+ $icon_color = astra_get_option( 'mobile-header-toggle-btn-color', $default );
+
+ // Border.
+ $trigger_border_width_top = ( isset( $trigger_border_width ) && isset( $trigger_border_width['top'] ) ) ? $trigger_border_width['top'] : 0;
+
+ $trigger_border_width_bottom = ( isset( $trigger_border_width ) && isset( $trigger_border_width['bottom'] ) ) ? $trigger_border_width['bottom'] : 0;
+
+ $trigger_border_width_right = ( isset( $trigger_border_width ) && isset( $trigger_border_width['right'] ) ) ? $trigger_border_width['right'] : 0;
+
+ $trigger_border_width_left = ( isset( $trigger_border_width ) && isset( $trigger_border_width['left'] ) ) ? $trigger_border_width['left'] : 0;
+
+ $margin = astra_get_option( $_section . '-margin' );
+ $margin_selector = $selector . ' .ast-button-wrap .menu-toggle';
+
+ /**
+ * Off-Canvas CSS.
+ */
+ $css_output = array(
+
+ $selector . ' .ast-button-wrap .mobile-menu-toggle-icon .ast-mobile-svg' => array(
+ 'width' => astra_get_css_value( $icon_size, 'px' ),
+ 'height' => astra_get_css_value( $icon_size, 'px' ),
+ 'fill' => $icon_color,
+ ),
+ $selector . ' .ast-button-wrap .mobile-menu-wrap .mobile-menu' => array(
+ // Color.
+ 'color' => $icon_color,
+
+ // Typography.
+ 'font-size' => astra_get_css_value( $font_size, 'px' ),
+ ),
+ $margin_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' ),
+ ),
+ );
+
+ // Execute all cases in customizer preview.
+ $is_customizer = false;
+ if ( is_customize_preview() ) {
+ $is_customizer = true;
+ }
+ switch ( $style ) {
+ case 'minimal': // phpcs:ignore PSR2.ControlStructures.SwitchDeclaration.TerminatingComment
+ $css_output_minimal = array(
+ $selector . ' .ast-button-wrap .ast-mobile-menu-trigger-minimal' => array(
+ // Color & Border.
+ 'color' => esc_attr( $icon_color ),
+ 'border' => 'none',
+ 'background' => 'transparent',
+ ),
+ );
+ $dynamic_css .= astra_parse_css( $css_output_minimal );
+ if ( false === $is_customizer ) {
+ break;
+ }
+
+ case 'fill': // phpcs:ignore PSR2.ControlStructures.SwitchDeclaration.TerminatingComment
+ $css_output_fill = array(
+ $selector . ' .ast-button-wrap .ast-mobile-menu-trigger-fill' => array(
+ // Color & Border.
+ 'color' => esc_attr( $icon_color ),
+ 'border' => 'none',
+ 'background' => esc_attr( $trigger_bg ),
+ 'border-radius' => astra_get_css_value( $trigger_border_radius, 'px' ),
+ ),
+ );
+ $dynamic_css .= astra_parse_css( $css_output_fill );
+ if ( false === $is_customizer ) {
+ break;
+ }
+
+ case 'outline': // phpcs:ignore PSR2.ControlStructures.SwitchDeclaration.TerminatingComment
+ $css_output_outline = array(
+ $selector . ' .ast-button-wrap .ast-mobile-menu-trigger-outline' => array(
+ 'background' => 'transparent',
+ 'color' => esc_attr( $icon_color ),
+ 'border-top-width' => astra_get_css_value( $trigger_border_width_top, 'px' ),
+ 'border-bottom-width' => astra_get_css_value( $trigger_border_width_bottom, 'px' ),
+ 'border-right-width' => astra_get_css_value( $trigger_border_width_right, 'px' ),
+ 'border-left-width' => astra_get_css_value( $trigger_border_width_left, 'px' ),
+ 'border-style' => 'solid',
+ 'border-color' => $trigger_border_color,
+ 'border-radius' => astra_get_css_value( $trigger_border_radius, 'px' ),
+ ),
+ );
+ $dynamic_css .= astra_parse_css( $css_output_outline );
+ if ( false === $is_customizer ) {
+ break;
+ }
+
+ default:
+ $dynamic_css .= '';
+ break;
+
+ }
+
+ // Tablet CSS.
+ $css_output_tablet = array(
+
+ $margin_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' ),
+ ),
+ );
+
+ // Mobile CSS.
+ $css_output_mobile = array(
+
+ $margin_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 );
+ $css_output .= astra_parse_css( $css_output_tablet, '', astra_get_tablet_breakpoint() );
+ $css_output .= astra_parse_css( $css_output_mobile, '', astra_get_mobile_breakpoint() );
+
+
+ $dynamic_css .= $css_output;
+
+ return $dynamic_css;
+}