Astra_Dynamic_CSS::load_sidebar_static_css()

Load sidebar static CSS when it is enabled.


Description


Source

File: inc/class-astra-dynamic-css.php

		public static function load_sidebar_static_css() {

			$sidebar_static_css = '
			#secondary {
				margin: 4em 0 2.5em;
				word-break: break-word;
				line-height: 2;
			}

			#secondary li {
				margin-bottom: 0.25em;
			}

			#secondary li:last-child {
				margin-bottom: 0;
			}
			@media (max-width: 768px) {
				.js_active .ast-plain-container.ast-single-post #secondary {
				  margin-top: 1.5em;
				}
			}
			.ast-separate-container.ast-two-container #secondary .widget {
				background-color: #fff;
				padding: 2em;
				margin-bottom: 2em;
			}
			';
			if ( is_rtl() ) {
				$sidebar_static_css .= '
				@media (min-width: 993px) {
					.ast-left-sidebar #secondary {
						padding-left: 60px;
					}

					.ast-right-sidebar #secondary {
						padding-right: 60px;
					}
				}
				@media (max-width: 993px) {
					.ast-right-sidebar #secondary {
						padding-right: 30px;
					}
					.ast-left-sidebar #secondary {
						padding-left: 30px;
					}

				}';
			} else {
				$sidebar_static_css .= '
				@media (min-width: 993px) {
					.ast-left-sidebar #secondary {
						padding-right: 60px;
					}

					.ast-right-sidebar #secondary {
						padding-left: 60px;
					}
				}
				@media (max-width: 993px) {
					.ast-right-sidebar #secondary {
						padding-left: 30px;
					}
					.ast-left-sidebar #secondary {
						padding-right: 30px;
					}

				}';
			}
			return $sidebar_static_css;

		}

Changelog

Changelog
Version Description
3.0.0 Introduced.


User Contributed Notes

You must log in before being able to contribute a note or feedback.