array( // Layout '--alpus-container-width' => alpus_get_option( 'container' ) . 'px', '--alpus-container-fluid-width' => alpus_get_option( 'container_fluid' ) . 'px', // Color '--alpus-primary-color' => alpus_get_option( 'primary_color' ), '--alpus-primary-color-hover' => AlpusColorLib::lighten( alpus_get_option( 'primary_color' ), 5 ), '--alpus-secondary-color' => alpus_get_option( 'secondary_color' ), '--alpus-secondary-color-hover' => AlpusColorLib::lighten( alpus_get_option( 'secondary_color' ), 5 ), '--alpus-link-color' => '#333', '--alpus-link-color-hover' => alpus_get_option( 'primary_color' ), '--alpus-danger-color' => '#F96768', '--alpus-danger-color-hover' => AlpusColorLib::lighten( '#F96768', 5 ), '--alpus-alert-color' => '#ffa800', '--alpus-alert-color-hover' => AlpusColorLib::lighten( '#ffa800', 5 ), '--alpus-success-color' => '#66bc7c', '--alpus-success-color-hover' => AlpusColorLib::lighten( '#66bc7c', 5 ), '--alpus-dark-color' => alpus_get_option( 'dark_color' ), '--alpus-dark-color-hover' => AlpusColorLib::lighten( alpus_get_option( 'dark_color' ), 5 ), '--alpus-light-color' => alpus_get_option( 'light_color' ), '--alpus-light-color-hover' => AlpusColorLib::lighten( alpus_get_option( 'light_color' ), 5 ), '--alpus-white-color' => alpus_get_option( 'white_color' ), '--alpus-grey-color' => '#999', // Heading Typography '--alpus-heading-h1-font-size' => '2em', '--alpus-heading-h1-line-height' => '1.2', '--alpus-heading-h2-font-size' => '1.7em', '--alpus-heading-h2-line-height' => '1.3', '--alpus-heading-h3-font-size' => '1.5em', '--alpus-heading-h3-line-height' => '1.4', '--alpus-heading-h4-font-size' => '1.3em', '--alpus-heading-h4-line-height' => '1.5', '--alpus-heading-h5-font-size' => '1.2em', '--alpus-heading-h5-line-height' => '1.6', '--alpus-heading-h6-font-size' => '1.1em', '--alpus-heading-h6-line-height' => '1.7', // Other Style '--alpus-border-radius-form' => '3px', /* Colors that should be changed for light/dark skins */ '--alpus-change-border-color' => '#eee', /* #2c2c2c */ '--alpus-change-color-light-1' => '#fff', /* #222 */ '--alpus-change-color-light-1-op2' => AlpusColorLib::lighten( '#fff', 20 ), /* #222 */ '--alpus-change-color-light-1-op9' => AlpusColorLib::lighten( '#fff', 90 ), /* #222 */ '--alpus-change-color-light-2' => '#f4f4f4', /* #333 */ '--alpus-change-color-light-3' => '#ccc', /* #333 */ '--alpus-change-color-dark-1' => '#333', /* #fff */ '--alpus-change-color-dark-1-op1' => AlpusColorLib::lighten( '#333', 10 ), /* #fff */ '--alpus-change-color-dark-1-op7' => AlpusColorLib::lighten( '#333', 70 ), /* #fff */ '--alpus-change-color-dark-2' => '#444', /* #ccc */ '--alpus-change-color-dark-3' => '#313438', /* #ccc */ ), '.page-wrapper' => array(), '.page-header' => array(), '.page-header .page-title' => array(), '.page-header .page-subtitle' => array(), '.page-title-bar' => array( '--alpus-ptb-height' => alpus_get_option( 'ptb_height' ) . 'px', ), '.breadcrumb' => array(), '.d-lazyload' => array( '--alpus-lazy-load-bg' => alpus_get_option( 'lazyload_bg' ), ), ); // Basic Layout $site_type = alpus_get_option( 'site_type' ); if ( 'full' != $site_type ) { alpus_dynamic_vars_bg( 'site', alpus_get_option( 'site_bg' ), $dynamic_vars['html'] ); $dynamic_vars['html']['--alpus-site-width'] = alpus_get_option( 'site_width' ) . 'px'; $dynamic_vars['html']['--alpus-site-margin'] = '0 auto'; if ( 'boxed' == $site_type ) { $dynamic_vars['html']['--alpus-site-gap'] = '0 ' . alpus_get_option( 'site_gap' ) . 'px'; } else { $dynamic_vars['html']['--alpus-site-gap'] = alpus_get_option( 'site_gap' ) . 'px'; } } else { alpus_dynamic_vars_bg( 'site', array( 'background-color' => '#fff' ), $dynamic_vars['html'] ); $dynamic_vars['html']['--alpus-site-width'] = 'false'; $dynamic_vars['html']['--alpus-site-margin'] = '0'; $dynamic_vars['html']['--alpus-site-gap'] = '0'; } /* Color & Typography */ $p_color_rgb = AlpusColorLib::hexToRGB( alpus_get_option( 'primary_color' ), false ); $dynamic_vars['html']['--alpus-primary-color-op-80'] = 'rgba(' . $p_color_rgb[0] . ',' . $p_color_rgb[1] . ',' . $p_color_rgb[2] . ', 0.8)'; alpus_dynamic_vars_typo( 'body', alpus_get_option( 'typo_default' ), $dynamic_vars['html'] ); alpus_dynamic_vars_typo( 'heading', alpus_get_option( 'typo_heading' ), $dynamic_vars['html'], array( 'font-weight' => 600 ) ); alpus_dynamic_vars_bg( 'page-wrapper', alpus_get_option( 'content_bg' ), $dynamic_vars['.page-wrapper'] ); alpus_dynamic_vars_bg( 'ptb', alpus_get_option( 'ptb_bg' ), $dynamic_vars['.page-header'] ); alpus_dynamic_vars_typo( 'ptb-title', alpus_get_option( 'typo_ptb_title' ), $dynamic_vars['.page-header .page-title'] ); alpus_dynamic_vars_typo( 'ptb-subtitle', alpus_get_option( 'typo_ptb_subtitle' ), $dynamic_vars['.page-header .page-subtitle'] ); alpus_dynamic_vars_typo( 'ptb-breadcrumb', alpus_get_option( 'typo_ptb_breadcrumb' ), $dynamic_vars['.breadcrumb'] ); /** * Filters the dynamic vars. * * @since 1.0 */ $dynamic_vars = apply_filters( 'alpus_dynamic_vars', $dynamic_vars ); $style = ''; foreach ( $dynamic_vars as $selector => $value ) { $style .= $selector . ' {' . PHP_EOL; foreach ( $value as $css_var => $option ) { $style .= $css_var . ': ' . $option . ';' . PHP_EOL; } $style .= '}' . PHP_EOL; } /* Responsive */ $style .= '@media (max-width: ' . ( (int) alpus_get_option( 'container' ) - 1 ) . 'px) { .container-fluid .container { padding-left: 0; padding-right: 0; } }' . PHP_EOL; $style .= '@media (max-width: ' . ( (int) alpus_get_option( 'container' ) - 1 ) . 'px) and (min-width: 480px) { .elementor-top-section.elementor-section-boxed > .elementor-container, .elementor-section-full_width .elementor-section-boxed > .elementor-container { width: calc(100% - var(--alpus-gap) * 4 + var(--alpus-el-section-gap) * 2); } .elementor-top-section.elementor-section-boxed > .slider-container.slider-shadow, .elementor-section-full_width .elementor-section-boxed > .slider-container.slider-shadow { width: calc(100% - var(--alpus-gap) * 4 + 40px) !important; } }' . PHP_EOL; $style .= '@media (max-width: ' . ( (int) alpus_get_option( 'container_fluid' ) - 1 ) . 'px) and (min-width: 480px) { .elementor-top-section.elementor-section-boxed > .elementor-container.container-fluid { width: calc( 100% - var(--alpus-gap) * 4 + var(--alpus-el-section-gap) * 2); } }' . PHP_EOL; $style .= '@media (max-width: ' . ( (int) alpus_get_option( 'container' ) + 119 ) . 'px) and (min-width: 992px) { .elementor-top-section.elementor-section-boxed > .elementor-container, .elementor-top-section.elementor-section-boxed > .elementor-container.container-fluid, .elementor-section-full_width .elementor-col-100 .elementor-section-boxed > .elementor-container { width: calc(86vw + var(--alpus-el-section-gap) * 2); } .container, .fixed .container { width: calc(86vw + 4 * var(--alpus-gap)); } .elementor-container > .elementor-column > .col-half-section, .elementor-container > .elementor-row > .elementor-column > .col-half-section { max-width: calc((86vw + var(--alpus-el-section-gap) * 2) / 2); } .elementor-top-section.elementor-section-boxed > .slider-container.slider-shadow, .elementor-section-full_width .elementor-section-boxed > .slider-container.slider-shadow { width: calc(86vw + 40px) !important; } }' . PHP_EOL; /** * Filters the dynamic style. * * @since 1.0 */ echo preg_replace( '/[\t]+/', '', apply_filters( 'alpus_dynamic_style', $style ) );