astra_menu_hover_style_css()
Load Menu hover style static CSS if any one of the menu hover style is selected.
Description
Return
(string)
Source
File: inc/builder/type/header/menu/dynamic-css/dynamic.css.php
function astra_menu_hover_style_css() { $hover_style_flg = false; $menu_hover_css = ''; for ( $index = 1; $index <= Astra_Builder_Helper::$num_of_header_menu; $index++ ) { if ( '' !== astra_get_option( 'header-menu' . $index . '-menu-hover-animation' ) ) { $hover_style_flg = true; } } if ( true === $hover_style_flg ) { $menu_hover_css = ' .ast-desktop .ast-menu-hover-style-underline > .menu-item > .menu-link:before, .ast-desktop .ast-menu-hover-style-overline > .menu-item > .menu-link:before { content: ""; position: absolute; width: 100%; right: 50%; height: 1px; background-color: transparent; transform: scale(0, 0) translate(-50%, 0); transition: transform .3s ease-in-out, color .0s ease-in-out; } .ast-desktop .ast-menu-hover-style-underline > .menu-item:hover > .menu-link:before, .ast-desktop .ast-menu-hover-style-overline > .menu-item:hover > .menu-link:before { width: calc(100% - 1.2em); background-color: currentColor; transform: scale(1, 1) translate(50%, 0); } .ast-desktop .ast-menu-hover-style-underline > .menu-item > .menu-link:before { bottom: 0; } .ast-desktop .ast-menu-hover-style-overline > .menu-item > .menu-link:before { top: 0; } .ast-desktop .ast-menu-hover-style-zoom > .menu-item > .menu-link:hover { transition: all .3s ease; transform: scale(1.2); }'; } return Astra_Enqueue_Scripts::trim_css( $menu_hover_css ); }
Expand full source code Collapse full source code View on Trac
Changelog
Version | Description |
---|---|
3.5.0 | Introduced. |