• Resolved ajaxStardust

    (@ajaxstardust)


    This isn’t something I really have an example of online to share. I’ll post a screen cap is prob the best I can do to explain what I’m trying to do, and so you can see where I’m at. I’ll post the CSS. If this belongs in another forum, let me know because I couldn’t see any other place to post about themes vs plugins. It’s a navigation sub- sub-menu. I want the sub-sub menu part to “fly-out” when the parent element is hovered (or whenever). I’m getting close, but it’s complicated. Once I get past that, I think I’ll be okay.

    Note: I realize the < li > in the sub menu are transparent. It should be solid off-white, or gray to look like the original.

    .main-navigation {
    	clear: both;
    	display: block;
    	float: right;
    	width: total_site_width();
    
    	ul {
            float:left;
    		list-style: none;
    		margin: 0;
    		padding: 0 1em;
            li {
                float:left;
                ul{
                    padding: $phi * 1rem;
                    display: none;
                    li ul:hover > li {
                        display:block;
                        left:100%;
                    }
                }
                ul {
    			box-shadow: 0 3px 3px rgba(0, 0, 0, 0.2);
    			float: left;
    			position: absolute;
    			top: 100%;
    			left: -999em;
    			z-index: 99999;
    
    			ul {
    				left: -999em;
    				/* top: 0; */
    				top: 2rem;
    				
    			}
    
    			li {
    
    				&:hover > ul,
    				&.focus > ul {
    					display: block;
    					left: auto;
    				}
    			}
    
    			a {
    				width: 200px;
    			}
    
    			:hover > a,
    			.focus > a {
        border-bottom:0.2rem solid red;
    			}
    
    			a:hover,
    			a.focus {
        border-bottom:0.2rem solid red;
    			}
    		}
    
            }
    
    		
    		li:hover > ul,
    		li.focus > ul {
    			left: auto;
    		}
    	}
    
    	li {
    		position: relative;
    
    		&:hover > a,
    		&.focus > a {
    		}
    	}
    
    	a {
    		display: block;
    		text-decoration: none;
    	}
    
    	.current_page_item > a,
    	.current-menu-item > a,
    	.current_page_ancestor > a,
    	.current-menu-ancestor > a {
    	}

    I guess You could say I started with a SASS tutorial, but abandoned it because I just wanted to dig into this project. There’s not any SASS in this part (though, it’s really cool! I wish I had more time to mess with it! i will continue as I complete this project).

    The screenshot attempts to illustrate what I am going for in appearance. What I have (one version)
    I also have a version where the sub sub-menu DOES go off to the right, but it’s only the text that’s moving.
    What I want it to look like.
    My question is:
    Can you see anything in that CSS that I’ve done wrong, and what should I focus on to try to achieve what I want?

    Thank you!

    EDIT:
    I meant to stress that I set out to complete a PSD to WP conversion project. I wanted a toturial for the ‘_s’ theme. I found one that I think is really helpful if anyone wants to check it out. There are a LOT out there. Trust me. This is the only one that really spoke to me, isn’t too fast, not too slow. It’s free, and I don’t think you’ll find anything more to the point on YouTube. It is pre FSE, however. It’s really more of a SASS tutorial. The linked URL is where I abandoned it to dive into the project.

    • This topic was modified 1 year, 11 months ago by ajaxStardust.
    • This topic was modified 1 year, 11 months ago by ajaxStardust.

    The page I need help with: [log in to see the link]

Viewing 3 replies - 1 through 3 (of 3 total)
  • Moderator bcworkz

    (@bcworkz)

    To apply SASS, you need to know what the eventual CSS should be. If you don’t know the proper CSS, trying to apply SASS is just going to confuse the issue. Lets ignore SASS for the time being and focus on the necessary CSS.

    Unfortunately, without an actual HTML page demonstrating the menu, it’s difficult to give specific advice. If you just want the submenu to appear in the right position on hover, it’s mainly a matter of applying the right positioning directives using the right selectors. If you want actual fly-out animation, determine the start and end positioning and visibility directives, then create an animation @keyframes element using those directives. Then add an animation directive to the target element.

    You likely knew as much already, but that’s about all I can offer without a specific live demo.

    Thread Starter ajaxStardust

    (@ajaxstardust)

    Hi there! Agreed (re: the complexity of CSS / SASS)

    I probably used “Fly-out” incorrectly (i think they called it that years ago, if it moved in any direction).

    I actually just came back to report that I made it over that hump, so I can close this as resolved.

    Being new to SASS, I’d forgotten to pay attention to whether the files were being compiled “on save”. The tutorial I was following uses the SASS compiler, Prepros, which does an amazing job of syncing w/ the browser, saved files, etc. I work on Win 11, so it’s installed on my Win system. I got used to its allowing for configuring where the resulting .css file will be saved, etc. However, if that’s not working, or i THINK it’s working, but it’s not… LOL. It was my oversight. (newbs!)

    I do most of my dev on a Linux box on my LAN which is much more responsive/ so fast! On occasion, I forget because I use XAMPP at times as well.

    Long story short: I was looking at the Linux server, and editing files on Windows, and believing I was on my merry way… I don’t think that will happen again after this embarrassment. ??

    Cheers!
    Thanks again, @bcworkz !!

    Thread Starter ajaxStardust

    (@ajaxstardust)

    resolved

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘Using SASS in Custom Theme. Mostly problem with Nav/ sub-menu’ is closed to new replies.