Skip to content

Commit

Permalink
message edit
Browse files Browse the repository at this point in the history
  • Loading branch information
matkuliak committed Oct 4, 2024
1 parent c6f66a7 commit 1e42b2c
Showing 1 changed file with 20 additions and 34 deletions.
54 changes: 20 additions & 34 deletions src/crate/theme/rtd/crate/static/css/custom.css
Original file line number Diff line number Diff line change
Expand Up @@ -1703,94 +1703,80 @@ td > :last-child {

.main-site-menu-link {
text-decoration: none;
color: #333; /* Dark gray for links to match the site's text color */
color: #333;
padding: 10px 15px;
display: block;
font-weight: 400; /* Normal weight for consistency */
white-space: nowrap; /* Prevent wrapping */
font-weight: 400;
white-space: nowrap;
}

/* Hide all sub-menus initially */
.main-site-sub-menu {
display: none;
position: absolute;
top: 100%; /* Position the submenu directly below the parent */
left: 0; /* Align submenu to the left of the parent menu */
background-color: #fff; /* White background for sub-menu */
top: 100%;
left: 0;
background-color: #fff;
list-style: none;
padding: 0;
margin: 0;
border: 1px solid #ddd; /* Light gray border for sub-menus */
border: 1px solid #ddd;
z-index: 999;
box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1); /* Slight shadow for depth */
box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

/* Show sub-menu on hover */
.main-site-menu-item:hover > .main-site-sub-menu {
display: block;
}

/* Product menu: Ensure Database and Data Models are side by side */
.main-site-menu-item-product .main-site-sub-menu {
display: flex; /* Flexbox for Product menu */
gap: 20px; /* Space between Database and Data Models */
display: flex;
gap: 20px;
padding: 10px;
}

/* Ensure sub-menus under Database and Data Models expand vertically */
.main-site-menu-item-product .main-site-menu-item-has-children .main-site-sub-menu {
display: none; /* Hide initially */
display: none;
position: absolute;
top: 0; /* Position it to the right of the parent */
left: 100%; /* Align it to the right */
top: 0;
left: 100%;
}

/* Show sub-menus when hovering over Database or Data Models */
.main-site-menu-item-product .main-site-menu-item-has-children:hover > .main-site-sub-menu {
display: block; /* Show the submenu */
display: block;
}


/* Submenus under Database and Data Models should appear below their parent items */
.main-site-menu-item-has-children .main-site-sub-menu {
top: 100%; /* Display below the parent */
left: 0; /* Align to the left */
top: 100%;
left: 0;
position: absolute;
display: none;
}

/* Show nested submenus on hover */
.main-site-menu-item-has-children:hover > .main-site-sub-menu {
display: block;
}

/* Ensure that sub-menu items stack vertically */
.main-site-sub-menu li {
display: block;
width: 200px; /* Adjust width as needed */
width: 200px;
}

/* Style for sub-menu links */
.main-site-sub-menu a {
padding: 10px;
display: block;
color: #000; /* Default color for sub-menu links */
color: #000;
}

/* Add hover effect */
.main-site-menu-link:hover, .main-site-sub-menu a:hover {
color: #111; /* Darker color for hovered links */
color: #111;
}

/* Ensure the parent .main-site-menu-item is positioned relatively for sub-menu placement */
.main-site-menu-item {
position: relative;
}

/* Hide the entire navigation on mobile (max width: 768px) */
@media (max-width: 768px) {
.main-site-menu {
display: none; /* This hides the whole navigation on mobile */
display: none;
}
}

0 comments on commit 1e42b2c

Please sign in to comment.