summaryrefslogtreecommitdiff
path: root/inc/dynamic-css
diff options
context:
space:
mode:
Diffstat (limited to 'inc/dynamic-css')
-rw-r--r--inc/dynamic-css/astra-icons.php84
-rw-r--r--inc/dynamic-css/block-editor-compatibility.php67
-rw-r--r--inc/dynamic-css/comments-flex.php405
-rw-r--r--inc/dynamic-css/comments.php454
-rw-r--r--inc/dynamic-css/container-layouts.php128
-rw-r--r--inc/dynamic-css/custom-menu-old-header.php194
-rw-r--r--inc/dynamic-css/inline-on-mobile.php164
-rw-r--r--inc/dynamic-css/pagination.php189
8 files changed, 1685 insertions, 0 deletions
diff --git a/inc/dynamic-css/astra-icons.php b/inc/dynamic-css/astra-icons.php
new file mode 100644
index 0000000..6850da8
--- /dev/null
+++ b/inc/dynamic-css/astra-icons.php
@@ -0,0 +1,84 @@
+<?php
+/**
+ * Astra Icons - Dynamic CSS.
+ *
+ * @package astra
+ * @since 3.5.0
+ */
+
+if ( ! defined( 'ABSPATH' ) ) {
+ exit; // Exit if accessed directly.
+}
+
+add_filter( 'astra_dynamic_theme_css', 'astra_icons_static_css' );
+
+/**
+ * Astra Icons - Dynamic CSS.
+ *
+ * @param string $dynamic_css Dynamic CSS.
+ * @since 3.5.0
+ */
+function astra_icons_static_css( $dynamic_css ) {
+
+ if ( false === Astra_Icons::is_svg_icons() ) {
+ $astra_icons = '
+ .astra-icon-down_arrow::after {
+ content: "\e900";
+ font-family: Astra;
+ }
+ .astra-icon-close::after {
+ content: "\e5cd";
+ font-family: Astra;
+ }
+ .astra-icon-drag_handle::after {
+ content: "\e25d";
+ font-family: Astra;
+ }
+ .astra-icon-format_align_justify::after {
+ content: "\e235";
+ font-family: Astra;
+ }
+ .astra-icon-menu::after {
+ content: "\e5d2";
+ font-family: Astra;
+ }
+ .astra-icon-reorder::after {
+ content: "\e8fe";
+ font-family: Astra;
+ }
+ .astra-icon-search::after {
+ content: "\e8b6";
+ font-family: Astra;
+ }
+ .astra-icon-zoom_in::after {
+ content: "\e56b";
+ font-family: Astra;
+ }
+ .astra-icon-check-circle::after {
+ content: "\e901";
+ font-family: Astra;
+ }
+ .astra-icon-shopping-cart::after {
+ content: "\f07a";
+ font-family: Astra;
+ }
+ .astra-icon-shopping-bag::after {
+ content: "\f290";
+ font-family: Astra;
+ }
+ .astra-icon-shopping-basket::after {
+ content: "\f291";
+ font-family: Astra;
+ }
+ .astra-icon-circle-o::after {
+ content: "\e903";
+ font-family: Astra;
+ }
+ .astra-icon-certificate::after {
+ content: "\e902";
+ font-family: Astra;
+ }';
+ return $dynamic_css .= Astra_Enqueue_Scripts::trim_css( $astra_icons );
+ }
+ return $dynamic_css;
+}
diff --git a/inc/dynamic-css/block-editor-compatibility.php b/inc/dynamic-css/block-editor-compatibility.php
new file mode 100644
index 0000000..9784513
--- /dev/null
+++ b/inc/dynamic-css/block-editor-compatibility.php
@@ -0,0 +1,67 @@
+<?php
+/**
+ * Astra WordPress-5.8 compatibility - Dynamic CSS.
+ *
+ * @package astra
+ * @since 3.6.5
+ */
+
+if ( ! defined( 'ABSPATH' ) ) {
+ exit; // Exit if accessed directly.
+}
+
+add_filter( 'astra_dynamic_theme_css', 'astra_block_editor_compatibility_css' );
+
+/**
+ * Astra WordPress compatibility - Dynamic CSS.
+ *
+ * @param string $dynamic_css Dynamic CSS.
+ * @since 3.6.5
+ */
+function astra_block_editor_compatibility_css( $dynamic_css ) {
+
+ if ( Astra_Dynamic_CSS::is_block_editor_support_enabled() ) {
+
+ $compatibility_css = '
+ .wp-block-search {
+ margin-bottom: 20px;
+ }
+ .wp-block-site-tagline {
+ margin-top: 20px;
+ }
+ form.wp-block-search .wp-block-search__input, .wp-block-search.wp-block-search__button-inside .wp-block-search__inside-wrapper, .wp-block-search.wp-block-search__button-inside .wp-block-search__inside-wrapper {
+ border-color: #eaeaea;
+ background: #fafafa;
+ }
+ .wp-block-search.wp-block-search__button-inside .wp-block-search__inside-wrapper .wp-block-search__input:focus, .wp-block-loginout input:focus {
+ outline: thin dotted;
+ }
+ .wp-block-loginout input:focus {
+ border-color: transparent;
+ }
+ form.wp-block-search .wp-block-search__inside-wrapper .wp-block-search__input {
+ padding: 12px;
+ }
+ form.wp-block-search .wp-block-search__button svg {
+ fill: currentColor;
+ width: 20px;
+ height: 20px;
+ }
+ .wp-block-loginout p label {
+ display: block;
+ }
+ .wp-block-loginout p:not(.login-remember):not(.login-submit) input {
+ width: 100%;
+ }
+ .wp-block-loginout .login-remember input {
+ width: 1.1rem;
+ height: 1.1rem;
+ margin: 0 5px 4px 0;
+ vertical-align: middle;
+ }';
+
+ return $dynamic_css .= Astra_Enqueue_Scripts::trim_css( $compatibility_css );
+ }
+
+ return $dynamic_css;
+}
diff --git a/inc/dynamic-css/comments-flex.php b/inc/dynamic-css/comments-flex.php
new file mode 100644
index 0000000..a905e6a
--- /dev/null
+++ b/inc/dynamic-css/comments-flex.php
@@ -0,0 +1,405 @@
+<?php
+/**
+ * Comments - Dynamic CSS
+ *
+ * @package astra-builder
+ * @since 3.2.0
+ */
+
+if ( ! defined( 'ABSPATH' ) ) {
+ exit; // Exit if accessed directly.
+}
+
+add_filter( 'astra_dynamic_theme_css', 'astra_comments_css', 11 );
+
+/**
+ * Comments - Dynamic CSS
+ *
+ * @param string $dynamic_css Astra Dynamic CSS.
+ * @return String Generated dynamic CSS for Pagination.
+ *
+ * @since 3.2.0
+ */
+function astra_comments_css( $dynamic_css ) {
+
+ if ( is_current_post_comment_enabled() || 0 < get_comments_number() ) {
+
+ $body_font_size = astra_get_option( 'font-size-body' );
+ $theme_color = astra_get_option( 'theme-color' );
+ $link_color = astra_get_option( 'link-color', $theme_color );
+ $is_site_rtl = is_rtl();
+
+ if ( is_array( $body_font_size ) ) {
+ $body_font_size_desktop = ( isset( $body_font_size['desktop'] ) && '' != $body_font_size['desktop'] ) ? $body_font_size['desktop'] : 15;
+ } else {
+ $body_font_size_desktop = ( '' != $body_font_size ) ? $body_font_size : 15;
+ }
+
+ $desktop_comment_global = array(
+ '.comment-reply-title' => array(
+ 'font-size' => astra_get_font_css_value( (int) $body_font_size_desktop * 1.66666 ),
+ ),
+ // Single Post Meta.
+ '.ast-comment-meta' => array(
+ 'line-height' => '1.666666667',
+ 'color' => esc_attr( $link_color ),
+ 'font-size' => astra_get_font_css_value( (int) $body_font_size_desktop * 0.8571428571 ),
+ ),
+ '.ast-comment-list #cancel-comment-reply-link' => array(
+ 'font-size' => astra_responsive_font( $body_font_size, 'desktop' ),
+ ),
+ );
+ $dynamic_css .= astra_parse_css( $desktop_comment_global );
+
+ $single_post_comment_css = '.comments-title {
+ padding: 2em 0;
+ }
+
+ .comments-title {
+ font-weight: normal;
+ word-wrap: break-word;
+ }
+
+ .ast-comment-list {
+ margin: 0;
+ word-wrap: break-word;
+ padding-bottom: 0.5em;
+ list-style: none;
+ }
+
+ .ast-comment-list li {
+ list-style: none;
+ }
+
+ .ast-comment-list .ast-comment-edit-reply-wrap {
+ -js-display: flex;
+ display: flex;
+ justify-content: flex-end;
+ }
+
+ .ast-comment-list .ast-edit-link {
+ flex: 1;
+ }
+
+ .ast-comment-list .comment-awaiting-moderation {
+ margin-bottom: 0;
+ }
+
+ .ast-comment {
+ padding: 1em 0;
+ }
+ .ast-comment-info img {
+ border-radius: 50%;
+ }
+ .ast-comment-cite-wrap cite {
+ font-style: normal;
+ }
+
+ .comment-reply-title {
+ padding-top: 1em;
+ font-weight: normal;
+ line-height: 1.65;
+ }
+
+ .ast-comment-meta {
+ margin-bottom: 0.5em;
+ }
+
+ .comments-area {
+ border-top: 1px solid #eeeeee;
+ margin-top: 2em;
+ }
+
+ .comments-area .comment-form-comment {
+ width: 100%;
+ border: none;
+ margin: 0;
+ padding: 0;
+ }
+ .comments-area .comment-notes,
+ .comments-area .comment-textarea,
+ .comments-area .form-allowed-tags {
+ margin-bottom: 1.5em;
+ }
+ .comments-area .form-submit {
+ margin-bottom: 0;
+ }
+ .comments-area textarea#comment,
+ .comments-area .ast-comment-formwrap input[type="text"] {
+ width: 100%;
+ border-radius: 0;
+ vertical-align: middle;
+ margin-bottom: 10px;
+ }
+ .comments-area .no-comments {
+ margin-top: 0.5em;
+ margin-bottom: 0.5em;
+ }
+ .comments-area p.logged-in-as {
+ margin-bottom: 1em;
+ }
+ .ast-separate-container .comments-title {
+ background-color: #fff;
+ padding: 1.2em 3.99em 0;
+ }
+ .ast-separate-container .comments-area {
+ border-top: 0;
+ }
+ .ast-separate-container .ast-comment-list {
+ padding-bottom: 0;
+ }
+ .ast-separate-container .ast-comment-list li {
+ background-color: #fff;
+ }
+ .ast-separate-container .ast-comment-list li.depth-1 {
+ padding: 4em 6.67em;
+ margin-bottom: 2em;
+ }
+ @media (max-width: 1200px) {
+ .ast-separate-container .ast-comment-list li.depth-1 {
+ padding: 3em 3.34em;
+ }
+ }
+
+ .ast-separate-container .ast-comment-list li.depth-1 .children li {
+ padding-bottom: 0;
+ padding-top: 0;
+ margin-bottom: 0;
+ }
+
+ .ast-separate-container .ast-comment-list li.depth-1 .ast-comment,
+ .ast-separate-container .ast-comment-list li.depth-2 .ast-comment {
+ border-bottom: 0;
+ }
+
+ .ast-separate-container .ast-comment-list .comment-respond {
+ padding-top: 0;
+ padding-bottom: 1em;
+ background-color: transparent;
+ }
+
+ .ast-separate-container .ast-comment-list .pingback p {
+ margin-bottom: 0;
+ }
+
+ .ast-separate-container .ast-comment-list .bypostauthor {
+ padding: 2em;
+ margin-bottom: 1em;
+ }
+
+ .ast-separate-container .ast-comment-list .bypostauthor li {
+ background: transparent;
+ margin-bottom: 0;
+ padding: 0 0 0 2em;
+ }
+
+ .ast-separate-container .comment-respond {
+ background-color: #fff;
+ padding: 4em 6.67em;
+ border-bottom: 0;
+ }
+
+ @media (max-width: 1200px) {
+ .ast-separate-container .comment-respond {
+ padding: 3em 2.34em;
+ }
+ }
+
+ .ast-separate-container .comment-reply-title {
+ padding-top: 0;
+ }
+ .comment-content a {
+ word-wrap: break-word;
+ }';
+ if ( 'page-builder' == astra_get_content_layout() || 'plain-container' == astra_get_content_layout() ) {
+ $single_post_comment_css .= '
+ .ast-comment-list li.depth-1 .ast-comment,
+ .ast-comment-list li.depth-2 .ast-comment {
+ border-bottom: 1px solid #eeeeee;
+ }';
+ }
+ if ( $is_site_rtl ) {
+ $single_post_comment_css .= '
+ .ast-comment-list .children {
+ margin-right: 2em;
+ }
+
+ @media (max-width: 992px) {
+ .ast-comment-list .children {
+ margin-right: 1em;
+ }
+ }
+
+ .ast-comment-list #cancel-comment-reply-link {
+ white-space: nowrap;
+ font-size: 15px;
+ font-size: 1rem;
+ margin-right: 1em;
+ }
+
+ .ast-comment-meta {
+ justify-content: left;
+ padding: 0 3.4em 1.333em;
+ }
+
+ .ast-comment-time .timendate,
+ .ast-comment-time .reply {
+ margin-left: 0.5em;
+ }
+ .comments-area #wp-comment-cookies-consent {
+ margin-left: 10px;
+ }
+ .ast-page-builder-template .comments-area {
+ padding-right: 20px;
+ padding-left: 20px;
+ margin-top: 0;
+ margin-bottom: 2em;
+ }
+ .ast-separate-container .ast-comment-list .bypostauthor .bypostauthor {
+ background: transparent;
+ margin-bottom: 0;
+ padding-left: 0;
+ padding-bottom: 0;
+ padding-top: 0;
+ }';
+ } else {
+ $single_post_comment_css .= '
+ .ast-comment-list .children {
+ margin-left: 2em;
+ }
+
+ @media (max-width: 992px) {
+ .ast-comment-list .children {
+ margin-left: 1em;
+ }
+ }
+
+ .ast-comment-list #cancel-comment-reply-link {
+ white-space: nowrap;
+ font-size: 15px;
+ font-size: 1rem;
+ margin-left: 1em;
+ }
+
+ .ast-comment-info {
+ display: flex;
+ position: relative;
+ }
+ .ast-comment-meta {
+ justify-content: right;
+ padding: 0 3.4em 1.60em;
+ }
+ .ast-comment-time .timendate{
+ margin-right: 0.5em;
+ }
+ .comments-area #wp-comment-cookies-consent {
+ margin-right: 10px;
+ }
+ .ast-page-builder-template .comments-area {
+ padding-left: 20px;
+ padding-right: 20px;
+ margin-top: 0;
+ margin-bottom: 2em;
+ }
+ .ast-separate-container .ast-comment-list .bypostauthor .bypostauthor {
+ background: transparent;
+ margin-bottom: 0;
+ padding-right: 0;
+ padding-bottom: 0;
+ padding-top: 0;
+ }';
+ }
+
+ $dynamic_css .= Astra_Enqueue_Scripts::trim_css( $single_post_comment_css );
+
+ $static_layout_css_min_comment = array(
+ '.ast-separate-container .ast-comment-list li .comment-respond' => array(
+ 'padding-left' => '2.66666em',
+ 'padding-right' => '2.66666em',
+ ),
+ );
+
+ $dynamic_css .= astra_parse_css( $static_layout_css_min_comment, astra_get_tablet_breakpoint( '', '1' ) );
+ $global_button_comment_mobile = array(
+ '.ast-separate-container .ast-comment-list li.depth-1' => array(
+ 'padding' => '1.5em 1em',
+ 'margin-bottom' => '1.5em',
+ ),
+ '.ast-separate-container .ast-comment-list .bypostauthor' => array(
+ 'padding' => '.5em',
+ ),
+ '.ast-separate-container .comment-respond' => array(
+ 'padding' => '1.5em 1em',
+ ),
+ // Single Post Meta.
+ '.ast-comment-meta' => array(
+ 'font-size' => ! empty( $body_font_size['mobile'] ) ? astra_get_font_css_value( (int) $body_font_size['mobile'] * 0.8571428571, 'px', 'mobile' ) : '',
+ ),
+ '.comment-reply-title' => array(
+ 'font-size' => ! empty( $body_font_size['mobile'] ) ? astra_get_font_css_value( (int) $body_font_size['mobile'] * 1.66666, 'px', 'mobile' ) : '',
+ ),
+ '.ast-comment-list #cancel-comment-reply-link' => array(
+ 'font-size' => astra_responsive_font( $body_font_size, 'mobile' ),
+ ),
+ '.ast-separate-container .ast-comment-list .bypostauthor li' => array(
+ 'padding' => '0 0 0 .5em',
+ ),
+ );
+
+ if ( $is_site_rtl ) {
+ $global_button_comment_mobile['.ast-comment-list .children'] = array(
+ 'margin-right' => '0.66666em',
+ );
+ } else {
+ $global_button_comment_mobile['.ast-comment-list .children'] = array(
+ 'margin-left' => '0.66666em',
+ );
+ }
+
+ $dynamic_css .= astra_parse_css( $global_button_comment_mobile, '', astra_get_mobile_breakpoint() );
+
+ $global_button_comment_tablet = array(
+ '.ast-comment-avatar-wrap img' => array(
+ 'max-width' => '2.5em',
+ ),
+ '.comments-area' => array(
+ 'margin-top' => '1.5em',
+ ),
+ '.ast-separate-container .comments-title' => array(
+ 'padding' => '1.43em 1.48em',
+ ),
+ '.ast-comment-meta' => array(
+ 'padding' => '0 1.8888em 1.3333em',
+ 'font-size' => ! empty( $body_font_size['tablet'] ) ? astra_get_font_css_value( (int) $body_font_size['tablet'] * 0.8571428571, 'px', 'tablet' ) : '',
+ ),
+ '.ast-separate-container .ast-comment-list li.depth-1' => array(
+ 'padding' => '1.5em 2.14em',
+ ),
+ '.ast-separate-container .comment-respond' => array(
+ 'padding' => '2em 2.14em',
+ ),
+ '.comment-reply-title' => array(
+ 'font-size' => ! empty( $body_font_size['tablet'] ) ? astra_get_font_css_value( (int) $body_font_size['tablet'] * 1.66666, 'px', 'tablet' ) : '',
+ ),
+ '.ast-comment-list #cancel-comment-reply-link' => array(
+ 'font-size' => astra_responsive_font( $body_font_size, 'tablet' ),
+ ),
+ '.ast-comment-meta' => array(
+ 'padding' => '0 1.8888em 1.3333em',
+ ),
+ );
+
+ if ( $is_site_rtl ) {
+ $global_button_comment_tablet['.ast-comment-avatar-wrap'] = array(
+ 'margin-left' => '0.5em',
+ );
+ } else {
+ $global_button_comment_tablet['.ast-comment-avatar-wrap'] = array(
+ 'margin-right' => '0.5em',
+ );
+ }
+
+ return $dynamic_css .= astra_parse_css( $global_button_comment_tablet, '', astra_get_tablet_breakpoint() );
+ }
+ return $dynamic_css;
+}
diff --git a/inc/dynamic-css/comments.php b/inc/dynamic-css/comments.php
new file mode 100644
index 0000000..3c0e226
--- /dev/null
+++ b/inc/dynamic-css/comments.php
@@ -0,0 +1,454 @@
+<?php
+/**
+ * Comments - Dynamic CSS
+ *
+ * @package astra-builder
+ * @since 3.2.0
+ */
+
+if ( ! defined( 'ABSPATH' ) ) {
+ exit; // Exit if accessed directly.
+}
+
+add_filter( 'astra_dynamic_theme_css', 'astra_comments_css', 11 );
+
+/**
+ * Comments - Dynamic CSS
+ *
+ * @param string $dynamic_css Astra Dynamic CSS.
+ * @return String Generated dynamic CSS for Pagination.
+ *
+ * @since 3.2.0
+ */
+function astra_comments_css( $dynamic_css ) {
+
+ if ( is_current_post_comment_enabled() || 0 < get_comments_number() ) {
+
+ $body_font_size = astra_get_option( 'font-size-body' );
+ $theme_color = astra_get_option( 'theme-color' );
+ $link_color = astra_get_option( 'link-color', $theme_color );
+ $is_site_rtl = is_rtl();
+
+ if ( is_array( $body_font_size ) ) {
+ $body_font_size_desktop = ( isset( $body_font_size['desktop'] ) && '' != $body_font_size['desktop'] ) ? $body_font_size['desktop'] : 15;
+ } else {
+ $body_font_size_desktop = ( '' != $body_font_size ) ? $body_font_size : 15;
+ }
+
+ $desktop_comment_global = array(
+ '.comment-reply-title' => array(
+ 'font-size' => astra_get_font_css_value( (int) $body_font_size_desktop * 1.66666 ),
+ ),
+ // Single Post Meta.
+ '.ast-comment-meta' => array(
+ 'line-height' => '1.666666667',
+ 'color' => esc_attr( $link_color ),
+ 'font-size' => astra_get_font_css_value( (int) $body_font_size_desktop * 0.8571428571 ),
+ ),
+ '.ast-comment-list #cancel-comment-reply-link' => array(
+ 'font-size' => astra_responsive_font( $body_font_size, 'desktop' ),
+ ),
+ );
+ $dynamic_css .= astra_parse_css( $desktop_comment_global );
+
+ $single_post_comment_css = '.comments-count-wrapper {
+ padding: 2em 0;
+ }
+
+ .comments-count-wrapper .comments-title {
+ font-weight: normal;
+ word-wrap: break-word;
+ }
+
+ .ast-comment-list {
+ margin: 0;
+ word-wrap: break-word;
+ padding-bottom: 0.5em;
+ list-style: none;
+ }
+
+ .ast-comment-list li {
+ list-style: none;
+ }
+
+ .ast-comment-list li.depth-1 .ast-comment,
+ .ast-comment-list li.depth-2 .ast-comment {
+ border-bottom: 1px solid #eeeeee;
+ }
+
+ .ast-comment-list .comment-respond {
+ padding: 1em 0;
+ border-bottom: 1px solid #eeeeee;
+ }
+
+ .ast-comment-list .comment-respond .comment-reply-title {
+ margin-top: 0;
+ padding-top: 0;
+ }
+
+ .ast-comment-list .comment-respond p {
+ margin-bottom: .5em;
+ }
+
+ .ast-comment-list .ast-comment-edit-reply-wrap {
+ -js-display: flex;
+ display: flex;
+ justify-content: flex-end;
+ }
+
+ .ast-comment-list .ast-edit-link {
+ flex: 1;
+ }
+
+ .ast-comment-list .comment-awaiting-moderation {
+ margin-bottom: 0;
+ }
+
+ .ast-comment {
+ padding: 1em 0;
+ }
+ .ast-comment-avatar-wrap img {
+ border-radius: 50%;
+ }
+ .ast-comment-content {
+ clear: both;
+ }
+
+ .ast-comment-cite-wrap {
+ text-align: left;
+ }
+
+ .ast-comment-cite-wrap cite {
+ font-style: normal;
+ }
+
+ .comment-reply-title {
+ padding-top: 1em;
+ font-weight: normal;
+ line-height: 1.65;
+ }
+
+ .ast-comment-meta {
+ margin-bottom: 0.5em;
+ }
+ .comments-area {
+ border-top: 1px solid #eeeeee;
+ margin-top: 2em;
+ }
+
+ .comments-area .comment-form-comment {
+ width: 100%;
+ border: none;
+ margin: 0;
+ padding: 0;
+ }
+
+ .comments-area .comment-notes,
+ .comments-area .comment-textarea,
+ .comments-area .form-allowed-tags {
+ margin-bottom: 1.5em;
+ }
+
+ .comments-area .form-submit {
+ margin-bottom: 0;
+ }
+
+ .comments-area textarea#comment,
+ .comments-area .ast-comment-formwrap input[type="text"] {
+ width: 100%;
+ border-radius: 0;
+ vertical-align: middle;
+ margin-bottom: 10px;
+ }
+ .comments-area .no-comments {
+ margin-top: 0.5em;
+ margin-bottom: 0.5em;
+ }
+ .comments-area p.logged-in-as {
+ margin-bottom: 1em;
+ }
+ .ast-separate-container .comments-count-wrapper {
+ background-color: #fff;
+ padding: 2em 6.67em 0;
+ }
+
+ @media (max-width: 1200px) {
+ .ast-separate-container .comments-count-wrapper {
+ padding: 2em 3.34em;
+ }
+ }
+
+ .ast-separate-container .comments-area {
+ border-top: 0;
+ }
+
+ .ast-separate-container .ast-comment-list {
+ padding-bottom: 0;
+ }
+
+ .ast-separate-container .ast-comment-list li {
+ background-color: #fff;
+ }
+
+ .ast-separate-container .ast-comment-list li.depth-1 {
+ padding: 4em 6.67em;
+ margin-bottom: 2em;
+ }
+
+ @media (max-width: 1200px) {
+ .ast-separate-container .ast-comment-list li.depth-1 {
+ padding: 3em 3.34em;
+ }
+ }
+
+ .ast-separate-container .ast-comment-list li.depth-1 .children li {
+ padding-bottom: 0;
+ padding-top: 0;
+ margin-bottom: 0;
+ }
+
+ .ast-separate-container .ast-comment-list li.depth-1 .ast-comment,
+ .ast-separate-container .ast-comment-list li.depth-2 .ast-comment {
+ border-bottom: 0;
+ }
+
+ .ast-separate-container .ast-comment-list .comment-respond {
+ padding-top: 0;
+ padding-bottom: 1em;
+ background-color: transparent;
+ }
+
+ .ast-separate-container .ast-comment-list .pingback p {
+ margin-bottom: 0;
+ }
+
+ .ast-separate-container .ast-comment-list .bypostauthor {
+ padding: 2em;
+ margin-bottom: 1em;
+ }
+
+ .ast-separate-container .ast-comment-list .bypostauthor li {
+ background: transparent;
+ margin-bottom: 0;
+ padding: 0 0 0 2em;
+ }
+
+ .ast-separate-container .comment-respond {
+ background-color: #fff;
+ padding: 4em 6.67em;
+ border-bottom: 0;
+ }
+
+ @media (max-width: 1200px) {
+ .ast-separate-container .comment-respond {
+ padding: 3em 2.34em;
+ }
+ }
+
+ .ast-separate-container .comment-reply-title {
+ padding-top: 0;
+ }
+
+ .comment-content a {
+ word-wrap: break-word;
+ }';
+
+ if ( $is_site_rtl ) {
+ $single_post_comment_css .= '
+ .ast-comment-list .children {
+ margin-right: 2em;
+ }
+
+ @media (max-width: 992px) {
+ .ast-comment-list .children {
+ margin-right: 1em;
+ }
+ }
+
+ .ast-comment-list #cancel-comment-reply-link {
+ white-space: nowrap;
+ font-size: 15px;
+ font-size: 1rem;
+ margin-right: 1em;
+ }
+
+ .ast-comment-avatar-wrap {
+ float: right;
+ clear: left;
+ margin-left: 1.33333em;
+ }
+ .ast-comment-meta-wrap {
+ float: right;
+ clear: left;
+ padding: 0 0 1.33333em;
+ }
+ .ast-comment-time .timendate,
+ .ast-comment-time .reply {
+ margin-left: 0.5em;
+ }
+ .comments-area #wp-comment-cookies-consent {
+ margin-left: 10px;
+ }
+ .ast-page-builder-template .comments-area {
+ padding-right: 20px;
+ padding-left: 20px;
+ margin-top: 0;
+ margin-bottom: 2em;
+ }
+ .ast-separate-container .ast-comment-list .bypostauthor .bypostauthor {
+ background: transparent;
+ margin-bottom: 0;
+ padding-left: 0;
+ padding-bottom: 0;
+ padding-top: 0;
+ }';
+ } else {
+ $single_post_comment_css .= '
+ .ast-comment-list .children {
+ margin-left: 2em;
+ }
+
+ @media (max-width: 992px) {
+ .ast-comment-list .children {
+ margin-left: 1em;
+ }
+ }
+
+ .ast-comment-list #cancel-comment-reply-link {
+ white-space: nowrap;
+ font-size: 15px;
+ font-size: 1rem;
+ margin-left: 1em;
+ }
+
+ .ast-comment-avatar-wrap {
+ float: left;
+ clear: right;
+ margin-right: 1.33333em;
+ }
+ .ast-comment-meta-wrap {
+ float: left;
+ clear: right;
+ padding: 0 0 1.33333em;
+ }
+ .ast-comment-time .timendate,
+ .ast-comment-time .reply {
+ margin-right: 0.5em;
+ }
+ .comments-area #wp-comment-cookies-consent {
+ margin-right: 10px;
+ }
+ .ast-page-builder-template .comments-area {
+ padding-left: 20px;
+ padding-right: 20px;
+ margin-top: 0;
+ margin-bottom: 2em;
+ }
+ .ast-separate-container .ast-comment-list .bypostauthor .bypostauthor {
+ background: transparent;
+ margin-bottom: 0;
+ padding-right: 0;
+ padding-bottom: 0;
+ padding-top: 0;
+ }';
+ }
+
+ $dynamic_css .= Astra_Enqueue_Scripts::trim_css( $single_post_comment_css );
+
+ $static_layout_css_min_comment = array(
+ '.ast-separate-container .ast-comment-list li .comment-respond' => array(
+ 'padding-left' => '2.66666em',
+ 'padding-right' => '2.66666em',
+ ),
+ );
+ $dynamic_css .= astra_parse_css( $static_layout_css_min_comment, astra_get_tablet_breakpoint( '', '1' ) );
+
+ $global_button_comment_mobile = array(
+ '.ast-separate-container .comments-count-wrapper' => array(
+ 'padding' => '1.5em 1em',
+ ),
+ '.ast-separate-container .ast-comment-list li.depth-1' => array(
+ 'padding' => '1.5em 1em',
+ 'margin-bottom' => '1.5em',
+ ),
+ '.ast-separate-container .ast-comment-list .bypostauthor' => array(
+ 'padding' => '.5em',
+ ),
+ '.ast-separate-container .comment-respond' => array(
+ 'padding' => '1.5em 1em',
+ ),
+ // Single Post Meta.
+ '.ast-comment-meta' => array(
+ 'font-size' => ! empty( $body_font_size['mobile'] ) ? astra_get_font_css_value( (int) $body_font_size['mobile'] * 0.8571428571, 'px', 'mobile' ) : '',
+ ),
+ '.comment-reply-title' => array(
+ 'font-size' => ! empty( $body_font_size['mobile'] ) ? astra_get_font_css_value( (int) $body_font_size['mobile'] * 1.66666, 'px', 'mobile' ) : '',
+ ),
+ '.ast-comment-list #cancel-comment-reply-link' => array(
+ 'font-size' => astra_responsive_font( $body_font_size, 'mobile' ),
+ ),
+ '.ast-separate-container .ast-comment-list .bypostauthor li' => array(
+ 'padding' => '0 0 0 .5em',
+ ),
+ );
+
+ if ( $is_site_rtl ) {
+ $global_button_comment_mobile['.ast-comment-list .children'] = array(
+ 'margin-right' => '0.66666em',
+ );
+ } else {
+ $global_button_comment_mobile['.ast-comment-list .children'] = array(
+ 'margin-left' => '0.66666em',
+ );
+ }
+
+ $dynamic_css .= astra_parse_css( $global_button_comment_mobile, '', astra_get_mobile_breakpoint() );
+
+ $global_button_comment_tablet = array(
+ '.ast-comment-avatar-wrap img' => array(
+ 'max-width' => '2.5em',
+ ),
+ '.comments-area' => array(
+ 'margin-top' => '1.5em',
+ ),
+ '.ast-separate-container .comments-count-wrapper' => array(
+ 'padding' => '2em 2.14em',
+ ),
+ '.ast-separate-container .ast-comment-list li.depth-1' => array(
+ 'padding' => '1.5em 2.14em',
+ ),
+ '.ast-separate-container .comment-respond' => array(
+ 'padding' => '2em 2.14em',
+ ),
+ // Single Post Meta.
+ '.ast-comment-meta' => array(
+ 'font-size' => ! empty( $body_font_size['tablet'] ) ? astra_get_font_css_value( (int) $body_font_size['tablet'] * 0.8571428571, 'px', 'tablet' ) : '',
+ ),
+ '.comment-reply-title' => array(
+ 'font-size' => ! empty( $body_font_size['tablet'] ) ? astra_get_font_css_value( (int) $body_font_size['tablet'] * 1.66666, 'px', 'tablet' ) : '',
+ ),
+ '.ast-comment-list #cancel-comment-reply-link' => array(
+ 'font-size' => astra_responsive_font( $body_font_size, 'tablet' ),
+ ),
+
+ );
+
+ $dynamic_css .= astra_parse_css( $global_button_comment_tablet, '', astra_get_tablet_breakpoint() );
+
+ if ( $is_site_rtl ) {
+ $global_button_tablet_lang_direction_css = array(
+ '.ast-comment-avatar-wrap' => array(
+ 'margin-left' => '0.5em',
+ ),
+ );
+ } else {
+ $global_button_tablet_lang_direction_css = array(
+ '.ast-comment-avatar-wrap' => array(
+ 'margin-right' => '0.5em',
+ ),
+ );
+ }
+ return $dynamic_css .= astra_parse_css( $global_button_tablet_lang_direction_css, '', astra_get_tablet_breakpoint() );
+ }
+ return $dynamic_css;
+}
diff --git a/inc/dynamic-css/container-layouts.php b/inc/dynamic-css/container-layouts.php
new file mode 100644
index 0000000..82196fb
--- /dev/null
+++ b/inc/dynamic-css/container-layouts.php
@@ -0,0 +1,128 @@
+<?php
+/**
+ * Container Layout - Dynamic CSS
+ *
+ * @package astra
+ * @since 3.3.0
+ */
+
+if ( ! defined( 'ABSPATH' ) ) {
+ exit; // Exit if accessed directly.
+}
+
+/**
+ * Container Layout - Dynamic CSS.
+ *
+ * @since 3.3.0
+ */
+function astra_container_layout_css() {
+ $container_layout = astra_get_content_layout();
+
+ $page_container_css = '';
+
+ if ( 'page-builder' === $container_layout ) {
+
+ $page_container_css = '
+ .ast-page-builder-template .hentry {
+ margin: 0;
+ }
+ .ast-page-builder-template .site-content > .ast-container {
+ max-width: 100%;
+ padding: 0;
+ }
+ .ast-page-builder-template .site-content #primary {
+ padding: 0;
+ margin: 0;
+ }
+ .ast-page-builder-template .no-results {
+ text-align: center;
+ margin: 4em auto;
+ }
+ .ast-page-builder-template .ast-pagination {
+ padding: 2em;
+ }
+
+ .ast-page-builder-template .entry-header.ast-no-title.ast-no-thumbnail {
+ margin-top: 0;
+ }
+ .ast-page-builder-template .entry-header.ast-header-without-markup {
+ margin-top: 0;
+ margin-bottom: 0;
+ }
+
+ .ast-page-builder-template .entry-header.ast-no-title.ast-no-meta {
+ margin-bottom: 0;
+ }
+ .ast-page-builder-template.single .post-navigation {
+ padding-bottom: 2em;
+ }
+ .ast-page-builder-template.single-post .site-content > .ast-container {
+ max-width: 100%;
+ }
+ .ast-page-builder-template.single-post .site-content > .ast-container {
+ max-width: 100%;
+ }';
+
+ if ( is_rtl() ) {
+
+ $page_container_css .= '
+ .ast-page-builder-template .entry-header {
+ margin-top: 4em;
+ margin-right: auto;
+ margin-left: auto;
+ padding-right: 20px;
+ padding-left: 20px;
+ }
+ .ast-page-builder-template .ast-archive-description {
+ margin-top: 4em;
+ margin-right: auto;
+ margin-left: auto;
+ padding-right: 20px;
+ padding-left: 20px;
+ }
+ .ast-page-builder-template.ast-no-sidebar .entry-content .alignwide {
+ margin-right: 0;
+ margin-left: 0;
+ }
+ .single.ast-page-builder-template .entry-header {
+ padding-right: 20px;
+ padding-left: 20px;
+ }
+ .ast-page-builder-template.ast-no-sidebar .entry-content .alignwide {
+ margin-right: 0;
+ margin-left: 0;
+ }';
+
+ } else {
+ $page_container_css .= '
+ .ast-page-builder-template .entry-header {
+ margin-top: 4em;
+ margin-left: auto;
+ margin-right: auto;
+ padding-left: 20px;
+ padding-right: 20px;
+ }
+ .ast-page-builder-template .ast-archive-description {
+ margin-top: 4em;
+ margin-left: auto;
+ margin-right: auto;
+ padding-left: 20px;
+ padding-right: 20px;
+ }
+ .ast-page-builder-template.ast-no-sidebar .entry-content .alignwide {
+ margin-left: 0;
+ margin-right: 0;
+ }
+ .single.ast-page-builder-template .entry-header {
+ padding-left: 20px;
+ padding-right: 20px;
+ }
+ .ast-page-builder-template.ast-no-sidebar .entry-content .alignwide {
+ margin-left: 0;
+ margin-right: 0;
+ }';
+ }
+ return Astra_Enqueue_Scripts::trim_css( $page_container_css );
+ }
+ return $page_container_css;
+}
diff --git a/inc/dynamic-css/custom-menu-old-header.php b/inc/dynamic-css/custom-menu-old-header.php
new file mode 100644
index 0000000..7c4323f
--- /dev/null
+++ b/inc/dynamic-css/custom-menu-old-header.php
@@ -0,0 +1,194 @@
+<?php
+/**
+ * Old Header Menu Last Item - Dynamic CSS
+ *
+ * @package astra
+ * @since 3.5.0
+ */
+
+if ( ! defined( 'ABSPATH' ) ) {
+ exit; // Exit if accessed directly.
+}
+
+add_filter( 'astra_dynamic_theme_css', 'astra_old_header_custom_menu_css' );
+
+/**
+ * Old Header Menu Last Item - Dynamic CSS.
+ *
+ * @param string $dynamic_css
+ * @since 3.5.0
+ */
+function astra_old_header_custom_menu_css( $dynamic_css ) {
+
+ $menu_item = astra_get_option( 'header-main-rt-section' );
+ if ( false === Astra_Builder_Helper::$is_header_footer_builder_active ) {
+ $static_css = '';
+ if ( 'widget' == $menu_item ) {
+
+ $static_css .= '
+ .ast-header-widget-area {
+ line-height: 1.65;
+ }
+ .ast-header-widget-area .widget-title,
+ .ast-header-widget-area .no-widget-text {
+ margin-bottom: 0;
+ }
+ .ast-header-widget-area .widget {
+ margin: .5em;
+ display: inline-block;
+ vertical-align: middle;
+ }
+ .ast-header-widget-area .widget p {
+ margin-bottom: 0;
+ }
+ .ast-header-widget-area .widget ul {
+ position: static;
+ border: 0;
+ width: auto;
+ }
+ .ast-header-widget-area .widget ul a {
+ border: 0;
+ }
+
+ .ast-header-widget-area .widget.widget_search .search-field,
+ .ast-header-widget-area .widget.widget_search .search-field:focus {
+ padding: 10px 45px 10px 15px;
+ }
+ .ast-header-widget-area .widget:last-child {
+ margin-bottom: 0.5em;
+ margin-right: 0;
+ }
+ .submenu-with-border .ast-header-widget-area .widget ul {
+ position: static;
+ border: 0;
+ width: auto;
+ }
+ .submenu-with-border .ast-header-widget-area .widget ul a {
+ border: 0;
+ }
+ .ast-header-break-point .ast-header-widget-area .widget {
+ margin: .5em 0;
+ display: block;
+ }';
+ }
+ if ( 'button' == $menu_item ) {
+ $static_css .= '
+ .ast-header-break-point .main-navigation ul .button-custom-menu-item .menu-link {
+ padding: 0 20px;
+ display: inline-block;
+ width: 100%;
+ border-bottom-width: 1px;
+ border-style: solid;
+ border-color: #eaeaea;
+ }
+ .button-custom-menu-item .ast-custom-button-link .ast-custom-button {
+ font-size: inherit;
+ font-family: inherit;
+ font-weight: inherit;
+ }
+ .button-custom-menu-item .ast-custom-button-link .ast-custom-button:hover {
+ transition: all 0.1s ease-in-out;
+ }';
+
+ }
+
+ $static_css .= '
+ .ast-header-break-point.ast-header-custom-item-inside .main-header-bar .main-header-bar-navigation .ast-search-icon {
+ display: none;
+ }
+ .ast-header-break-point.ast-header-custom-item-inside .main-header-bar .ast-search-menu-icon .search-form {
+ padding: 0;
+ display: block;
+ overflow: hidden;
+ }
+ .ast-header-break-point .ast-header-custom-item .widget:last-child {
+ margin-bottom: 1em;
+ }
+ .ast-header-custom-item .widget {
+ margin: 0.5em;
+ display: inline-block;
+ vertical-align: middle;
+ }
+ .ast-header-custom-item .widget p {
+ margin-bottom: 0;
+ }
+ .ast-header-custom-item .widget li {
+ width: auto;
+ }
+ .ast-header-custom-item-inside .button-custom-menu-item .menu-link {
+ display: none;
+ }
+
+ .ast-header-custom-item-inside.ast-header-break-point .button-custom-menu-item .ast-custom-button-link {
+ display: none;
+ }
+ .ast-header-custom-item-inside.ast-header-break-point .button-custom-menu-item .menu-link {
+ display: block;
+ }';
+ if ( is_rtl() ) {
+ $static_css .= '
+ .ast-header-break-point.ast-header-custom-item-outside .main-header-bar .ast-search-icon {
+ margin-left: 1em;
+ }
+ .ast-header-break-point.ast-header-custom-item-inside .main-header-bar .ast-search-menu-icon .search-field,
+ .ast-header-break-point.ast-header-custom-item-inside .main-header-bar .ast-search-menu-icon.ast-inline-search .search-field {
+ width: 100%;
+ padding-left: 5.5em;
+ }
+ .ast-header-break-point.ast-header-custom-item-inside .main-header-bar .ast-search-menu-icon .search-submit {
+ display: block;
+ position: absolute;
+ height: 100%;
+ top: 0;
+ left: 0;
+ padding: 0 1em;
+ border-radius: 0;
+ }
+ .ast-header-break-point .ast-header-custom-item .ast-masthead-custom-menu-items {
+ padding-right: 20px;
+ padding-left: 20px;
+ margin-bottom: 1em;
+ margin-top: 1em;
+ }
+ .ast-header-custom-item-inside.ast-header-break-point .button-custom-menu-item {
+ padding-right: 0;
+ padding-left: 0;
+ margin-top: 0;
+ margin-bottom: 0;
+ }';
+ } else {
+ $static_css .= '
+ .ast-header-break-point.ast-header-custom-item-outside .main-header-bar .ast-search-icon {
+ margin-right: 1em;
+ }
+ .ast-header-break-point.ast-header-custom-item-inside .main-header-bar .ast-search-menu-icon .search-field,
+ .ast-header-break-point.ast-header-custom-item-inside .main-header-bar .ast-search-menu-icon.ast-inline-search .search-field {
+ width: 100%;
+ padding-right: 5.5em;
+ }
+ .ast-header-break-point.ast-header-custom-item-inside .main-header-bar .ast-search-menu-icon .search-submit {
+ display: block;
+ position: absolute;
+ height: 100%;
+ top: 0;
+ right: 0;
+ padding: 0 1em;
+ border-radius: 0;
+ }
+ .ast-header-break-point .ast-header-custom-item .ast-masthead-custom-menu-items {
+ padding-left: 20px;
+ padding-right: 20px;
+ margin-bottom: 1em;
+ margin-top: 1em;
+ }
+ .ast-header-custom-item-inside.ast-header-break-point .button-custom-menu-item {
+ padding-left: 0;
+ padding-right: 0;
+ margin-top: 0;
+ margin-bottom: 0;
+ }';
+ }
+ $dynamic_css .= Astra_Enqueue_Scripts::trim_css( $static_css );
+ }
+ return $dynamic_css;
+}
diff --git a/inc/dynamic-css/inline-on-mobile.php b/inc/dynamic-css/inline-on-mobile.php
new file mode 100644
index 0000000..ac0bd05
--- /dev/null
+++ b/inc/dynamic-css/inline-on-mobile.php
@@ -0,0 +1,164 @@
+<?php
+/**
+ * Inline On Mobile - Dynamic CSS.
+ *
+ * @package astra
+ * @since 3.5.0
+ */
+
+if ( ! defined( 'ABSPATH' ) ) {
+ exit; // Exit if accessed directly.
+}
+
+add_filter( 'astra_dynamic_theme_css', 'astra_inline_on_mobile_css' );
+
+/**
+ * Inline On Mobile - Dynamic CSS.
+ *
+ * @param string $dynamic_css Dynamic CSS.
+ * @since 3.5.0
+ * @return string
+ */
+function astra_inline_on_mobile_css( $dynamic_css ) {
+
+ $inline_on_mobile_enable = false;
+ for ( $index = 1; $index <= Astra_Builder_Helper::$component_limit; $index++ ) {
+ if ( false === astra_get_option( 'header-menu' . $index . '-menu-stack-on-mobile' ) ) {
+ $inline_on_mobile_enable = true;
+ break;
+ }
+ }
+
+ if ( false === $inline_on_mobile_enable ) {
+ return $dynamic_css;
+ }
+
+ $inline_on_mobile_css = '
+ .ast-header-break-point .ast-mobile-header-wrap .ast-above-header-wrap .main-header-bar-navigation .inline-on-mobile .menu-item .menu-link,
+ .ast-header-break-point .ast-mobile-header-wrap .ast-main-header-wrap .main-header-bar-navigation .inline-on-mobile .menu-item .menu-link,
+ .ast-header-break-point .ast-mobile-header-wrap .ast-below-header-wrap .main-header-bar-navigation .inline-on-mobile .menu-item .menu-link {
+ border: none;
+ }
+
+ .ast-header-break-point .ast-mobile-header-wrap .ast-above-header-wrap .main-header-bar-navigation .inline-on-mobile .menu-item-has-children > .ast-menu-toggle::before,
+ .ast-header-break-point .ast-mobile-header-wrap .ast-main-header-wrap .main-header-bar-navigation .inline-on-mobile .menu-item-has-children > .ast-menu-toggle::before,
+ .ast-header-break-point .ast-mobile-header-wrap .ast-below-header-wrap .main-header-bar-navigation .inline-on-mobile .menu-item-has-children > .ast-menu-toggle::before {
+ font-size: .6rem;
+ }
+ .ast-header-break-point .ast-mobile-header-wrap .ast-flex.inline-on-mobile {
+ flex-wrap: unset;
+ }
+ .ast-header-break-point .ast-mobile-header-wrap .ast-flex.inline-on-mobile .menu-item.ast-submenu-expanded > .sub-menu .menu-link {
+ padding: .1em 1em;
+ }
+ .ast-header-break-point .ast-mobile-header-wrap .ast-flex.inline-on-mobile .menu-item.ast-submenu-expanded > .sub-menu > .menu-item .ast-menu-toggle::before {
+ transform: rotate(-90deg);
+ }
+ .ast-header-break-point .ast-mobile-header-wrap .ast-flex.inline-on-mobile .menu-item.ast-submenu-expanded > .sub-menu > .menu-item.ast-submenu-expanded .ast-menu-toggle::before {
+ transform: rotate(-270deg);
+ }
+ .ast-header-break-point .ast-mobile-header-wrap .ast-flex.inline-on-mobile .menu-item > .sub-menu > .menu-item .menu-link:before {
+ content: none;
+ }
+ .ast-header-break-point .ast-mobile-header-wrap .ast-flex.inline-on-mobile {
+ flex-wrap: unset;
+ }
+
+ .ast-header-break-point .ast-mobile-header-wrap .ast-flex.inline-on-mobile .menu-item.ast-submenu-expanded > .sub-menu .menu-link {
+ padding: .1em 1em;
+ }
+ .ast-header-break-point .ast-mobile-header-wrap .ast-flex.inline-on-mobile .menu-item.ast-submenu-expanded > .sub-menu > .menu-item .ast-menu-toggle::before {
+ transform: rotate(-90deg);
+ }
+ .ast-header-break-point .ast-mobile-header-wrap .ast-flex.inline-on-mobile .menu-item.ast-submenu-expanded > .sub-menu > .menu-item.ast-submenu-expanded .ast-menu-toggle::before {
+ transform: rotate(-270deg);
+ }
+ .ast-header-break-point .ast-mobile-header-wrap .ast-flex.inline-on-mobile .menu-item > .sub-menu > .menu-item .menu-link:before {
+ content: none;
+ }
+ .ast-header-break-point .inline-on-mobile .sub-menu {
+ width: 150px;
+ }';
+
+ if ( is_rtl() ) {
+ $inline_on_mobile_css .= '
+ .ast-header-break-point .ast-mobile-header-wrap .ast-flex.inline-on-mobile .menu-item.menu-item-has-children {
+ margin-left: 10px;
+ }
+ .ast-header-break-point .ast-mobile-header-wrap .ast-flex.inline-on-mobile .menu-item.ast-submenu-expanded > .sub-menu {
+ display: block;
+ position: absolute;
+ left: auto;
+ right: 0;
+ }
+ .ast-header-break-point .ast-mobile-header-wrap .ast-flex.inline-on-mobile .menu-item.ast-submenu-expanded > .sub-menu .menu-item .ast-menu-toggle {
+ padding: 0;
+ left: 1em;
+ }
+ .ast-header-break-point .ast-mobile-header-wrap .ast-flex.inline-on-mobile .menu-item.ast-submenu-expanded > .sub-menu > .menu-item > .sub-menu {
+ right: 100%;
+ left: auto;
+ }
+ .ast-header-break-point .ast-mobile-header-wrap .ast-flex.inline-on-mobile .ast-menu-toggle {
+ left: -15px;
+ }
+ .ast-header-break-point .ast-mobile-header-wrap .ast-flex.inline-on-mobile .menu-item.menu-item-has-children {
+ margin-left: 10px;
+ }
+
+ .ast-header-break-point .ast-mobile-header-wrap .ast-flex.inline-on-mobile .menu-item.ast-submenu-expanded > .sub-menu {
+ display: block;
+ position: absolute;
+ left: auto;
+ right: 0;
+ }
+
+ .ast-header-break-point .ast-mobile-header-wrap .ast-flex.inline-on-mobile .menu-item.ast-submenu-expanded > .sub-menu > .menu-item > .sub-menu {
+ right: 100%;
+ left: auto;
+ }
+ .ast-header-break-point .ast-mobile-header-wrap .ast-flex.inline-on-mobile .ast-menu-toggle {
+ left: -15px;
+ }';
+ } else {
+ $inline_on_mobile_css .= '
+ .ast-header-break-point .ast-mobile-header-wrap .ast-flex.inline-on-mobile .menu-item.menu-item-has-children {
+ margin-right: 10px;
+ }
+ .ast-header-break-point .ast-mobile-header-wrap .ast-flex.inline-on-mobile .menu-item.ast-submenu-expanded > .sub-menu {
+ display: block;
+ position: absolute;
+ right: auto;
+ left: 0;
+ }
+ .ast-header-break-point .ast-mobile-header-wrap .ast-flex.inline-on-mobile .menu-item.ast-submenu-expanded > .sub-menu .menu-item .ast-menu-toggle {
+ padding: 0;
+ right: 1em;
+ }
+ .ast-header-break-point .ast-mobile-header-wrap .ast-flex.inline-on-mobile .menu-item.ast-submenu-expanded > .sub-menu > .menu-item > .sub-menu {
+ left: 100%;
+ right: auto;
+ }
+ .ast-header-break-point .ast-mobile-header-wrap .ast-flex.inline-on-mobile .ast-menu-toggle {
+ right: -15px;
+ }
+ .ast-header-break-point .ast-mobile-header-wrap .ast-flex.inline-on-mobile .menu-item.menu-item-has-children {
+ margin-right: 10px;
+ }
+ .ast-header-break-point .ast-mobile-header-wrap .ast-flex.inline-on-mobile .menu-item.ast-submenu-expanded > .sub-menu {
+ display: block;
+ position: absolute;
+ right: auto;
+ left: 0;
+ }
+ .ast-header-break-point .ast-mobile-header-wrap .ast-flex.inline-on-mobile .menu-item.ast-submenu-expanded > .sub-menu > .menu-item > .sub-menu {
+ left: 100%;
+ right: auto;
+ }
+ .ast-header-break-point .ast-mobile-header-wrap .ast-flex.inline-on-mobile .ast-menu-toggle {
+ right: -15px;
+ }';
+ }
+
+ return $dynamic_css .= Astra_Enqueue_Scripts::trim_css( $inline_on_mobile_css );
+}
diff --git a/inc/dynamic-css/pagination.php b/inc/dynamic-css/pagination.php
new file mode 100644
index 0000000..2a9d83a
--- /dev/null
+++ b/inc/dynamic-css/pagination.php
@@ -0,0 +1,189 @@
+<?php
+/**
+ * Pagination - Dynamic CSS
+ *
+ * @package astra-builder
+ * @since 3.3.0
+ */
+
+if ( ! defined( 'ABSPATH' ) ) {
+ exit; // Exit if accessed directly.
+}
+
+add_filter( 'astra_dynamic_theme_css', 'astra_pagination_css', 11 );
+
+/**
+ * Pagination - Dynamic CSS
+ *
+ * @param string $dynamic_css Astra Dynamic CSS.
+ * @return String Generated dynamic CSS for Pagination.
+ *
+ * @since 3.3.0
+ */
+function astra_pagination_css( $dynamic_css ) {
+
+ if ( is_astra_pagination_enabled() || false !== apply_filters( 'astra_enable_pagination_css', false ) ) {
+
+ $theme_color = astra_get_option( 'theme-color' );
+ $link_color = astra_get_option( 'link-color', $theme_color );
+ $link_hover_color = astra_get_option( 'link-h-color' );
+
+ $pagination_color_output = array(
+ '.ast-pagination .next.page-numbers' => array(
+ 'display' => 'inherit',
+ 'float' => 'none',
+ ),
+ '.ast-pagination a' => array(
+ 'color' => esc_attr( $link_color ),
+ ),
+ '.ast-pagination a:hover, .ast-pagination a:focus, .ast-pagination > span:hover:not(.dots), .ast-pagination > span.current' => array(
+ 'color' => esc_attr( $link_hover_color ),
+ ),
+ );
+ $dynamic_css .= astra_parse_css( $pagination_color_output );
+
+ $pagination_static_css = '
+ .ast-pagination .prev.page-numbers,
+ .ast-pagination .next.page-numbers {
+ padding: 0 1.5em;
+ height: 2.33333em;
+ line-height: calc(2.33333em - 3px);
+ }
+ .ast-pagination {
+ display: inline-block;
+ width: 100%;
+ padding-top: 2em;
+ text-align: center;
+ }
+ .ast-pagination .page-numbers {
+ display: inline-block;
+ width: 2.33333em;
+ height: 2.33333em;
+ font-size: 16px;
+ font-size: 1.06666rem;
+ line-height: calc(2.33333em - 3px);
+ }
+ .ast-pagination .nav-links {
+ display: inline-block;
+ width: 100%;
+ }
+ @media (max-width: 420px) {
+ .ast-pagination .prev.page-numbers,
+ .ast-pagination .next.page-numbers {
+ width: 100%;
+ text-align: center;
+ margin: 0;
+ }
+ }
+ .ast-pagination .prev,
+ .ast-pagination .prev:visited,
+ .ast-pagination .prev:focus,
+ .ast-pagination .next,
+ .ast-pagination .next:visited,
+ .ast-pagination .next:focus {
+ display: inline-block;
+ width: auto;
+ }
+ .ast-page-builder-template .ast-pagination {
+ padding: 2em;
+ }';
+
+ if ( ! Astra_Builder_Helper::apply_flex_based_css() ) {
+ $pagination_static_css .= '
+ .ast-pagination .prev.page-numbers.dots, .ast-pagination .prev.page-numbers.dots:hover, .ast-pagination .prev.page-numbers.dots:focus,
+ .ast-pagination .prev.page-numbers:visited.dots,
+ .ast-pagination .prev.page-numbers:visited.dots:hover,
+ .ast-pagination .prev.page-numbers:visited.dots:focus,
+ .ast-pagination .prev.page-numbers:focus.dots,
+ .ast-pagination .prev.page-numbers:focus.dots:hover,
+ .ast-pagination .prev.page-numbers:focus.dots:focus,
+ .ast-pagination .next.page-numbers.dots,
+ .ast-pagination .next.page-numbers.dots:hover,
+ .ast-pagination .next.page-numbers.dots:focus,
+ .ast-pagination .next.page-numbers:visited.dots,
+ .ast-pagination .next.page-numbers:visited.dots:hover,
+ .ast-pagination .next.page-numbers:visited.dots:focus,
+ .ast-pagination .next.page-numbers:focus.dots,
+ .ast-pagination .next.page-numbers:focus.dots:hover,
+ .ast-pagination .next.page-numbers:focus.dots:focus {
+ border: 2px solid #eaeaea;
+ background: transparent;
+ }
+
+ .ast-pagination .prev.page-numbers.dots,
+ .ast-pagination .prev.page-numbers:visited.dots,
+ .ast-pagination .prev.page-numbers:focus.dots,
+ .ast-pagination .next.page-numbers.dots,
+ .ast-pagination .next.page-numbers:visited.dots,
+ .ast-pagination .next.page-numbers:focus.dots {
+ cursor: default;
+ }';
+ }
+
+ if ( is_rtl() ) {
+ $pagination_static_css .= '
+ @media (min-width: 993px) {
+ .ast-pagination {
+ padding-right: 3.33333em;
+ padding-left: 3.33333em;
+ }
+ .ast-pagination .next.page-numbers {
+ float: left;
+ text-align: left;
+ }
+ @media (max-width: 768px) {
+ .ast-pagination .next.page-numbers .page-navigation {
+ padding-left: 0;
+ }
+ }';
+
+ if ( ! Astra_Builder_Helper::apply_flex_based_css() ) {
+ $pagination_static_css .= '
+ @media (min-width: 769px) {
+ .ast-pagination .prev.page-numbers.next,
+ .ast-pagination .prev.page-numbers:visited.next,
+ .ast-pagination .prev.page-numbers:focus.next,
+ .ast-pagination .next.page-numbers.next,
+ .ast-pagination .next.page-numbers:visited.next,
+ .ast-pagination .next.page-numbers:focus.next {
+ margin-left: 0;
+ }
+ }';
+ }
+ } else {
+ $pagination_static_css .= '
+ @media (min-width: 993px) {
+ .ast-pagination {
+ padding-left: 3.33333em;
+ padding-right: 3.33333em;
+ }
+ }
+ .ast-pagination .next.page-numbers {
+ float: right;
+ }
+
+ @media (max-width: 768px) {
+ .ast-pagination .next.page-numbers .page-navigation {
+ padding-right: 0;
+ }
+ }';
+
+ if ( ! Astra_Builder_Helper::apply_flex_based_css() ) {
+ $pagination_static_css .= '
+ @media (min-width: 769px) {
+ .ast-pagination .prev.page-numbers.next,
+ .ast-pagination .prev.page-numbers:visited.next,
+ .ast-pagination .prev.page-numbers:focus.next,
+ .ast-pagination .next.page-numbers.next,
+ .ast-pagination .next.page-numbers:visited.next,
+ .ast-pagination .next.page-numbers:focus.next {
+ margin-right: 0;
+ }
+ }';
+ }
+ }
+ return $dynamic_css .= Astra_Enqueue_Scripts::trim_css( $pagination_static_css );
+ }
+ return $dynamic_css;
+
+}