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' => '#3a3a3a', '--alpus-link-color-hover' => alpus_get_option( 'primary_color' ), '--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', '--alpus-success-color' => alpus_get_option( 'success_color' ), '--alpus-success-color-hover' => AlpusColorLib::lighten( alpus_get_option( 'success_color' ), '10%' ), '--alpus-alert-color' => alpus_get_option( 'alert_color' ), '--alpus-alert-color-hover' => AlpusColorLib::lighten( alpus_get_option( 'alert_color' ), '10%' ), '--alpus-danger-color' => alpus_get_option( 'danger_color' ), '--alpus-danger-color-hover' => AlpusColorLib::lighten( alpus_get_option( 'danger_color' ), '10%' ), // Heading Typography '--alpus-heading-h1-font-size' => '2em', '--alpus-heading-h2-font-size' => '1.7em', '--alpus-heading-h3-font-size' => '1.5em', '--alpus-heading-h4-font-size' => '1.3em', '--alpus-heading-h5-font-size' => '1.2em', '--alpus-heading-h6-font-size' => '1.1em', '--alpus-heading-line-height' => '1.2', // Other Style '--alpus-border-radius-form' => '0', /* Colors that should be changed for light/dark skins */ '--alpus-heading-color' => '#111', /* #fff */ '--alpus-change-border-color' => '#ccc', /* #444 */ '--alpus-change-light-border-color' => '#e1e1e1', /* #282828 */ '--alpus-change-color-light-1' => '#fff', /* #111 */ '--alpus-change-color-light-2' => '#aaa', /* #555 */ '--alpus-change-color-light-3' => '#ddd', /* #3a3a3a */ '--alpus-change-color-light-4' => '#999', /* #666 */ '--alpus-change-color-light-5' => '#f6f6f6', /* #181818 */ '--alpus-change-color-dark-1' => '#222', /* #ccc */ '--alpus-change-color-dark-2' => '#3a3a3a', /* #aaa */ '--alpus-change-color-dark-3' => '#555', /* #999 */ ), '.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'] ); $headings = array( 'h1', 'h2', 'h3', 'h4', 'h5', 'h6' ); foreach ( $headings as $heading ) { $size = alpus_get_option( 'typo_' . $heading . '_size' ); if ( $size ) { $unit = trim( preg_replace( '/[0-9.]/', '', $size ) ); if ( ! $unit ) { $size .= 'px'; } $dynamic_vars['html'][ '--alpus-heading-' . $heading . '-font-size' ] = esc_html( $size ); } } $heading_font = alpus_get_option( 'typo_heading' ); alpus_dynamic_vars_typo( 'heading', $heading_font, $dynamic_vars['html'], array( 'font-weight' => 600 ) ); 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 ) );