Skip to content

Commit

Permalink
Fix submenu positioning on desktop
Browse files Browse the repository at this point in the history
  • Loading branch information
timothyjensen committed Dec 19, 2020
1 parent b2adc54 commit c93b860
Show file tree
Hide file tree
Showing 4 changed files with 93 additions and 94 deletions.
4 changes: 2 additions & 2 deletions mix-manifest.json
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
{
"/style.css": "/style.css?id=6f4ef5e319d4e125c80b",
"/style.css": "/style.css?id=1fc305f3e125f0efcaa6",
"/lib/amp/amp.css": "/lib/amp/amp.css?id=a59f306a6f431a2ac143",
"/lib/gutenberg/front-end.css": "/lib/gutenberg/front-end.css?id=f77aa7901fa9a11430aa",
"/lib/gutenberg/style-editor.css": "/lib/gutenberg/style-editor.css?id=1807e3c20a28ae6a5fef",
"/lib/woocommerce/genesis-sample-woocommerce.css": "/lib/woocommerce/genesis-sample-woocommerce.css?id=bd66cf5a828d0f78703c",
"/mix.js.map": "/mix.js.map?id=29fe08cff1f2ee1cfbea",
"/style.css.map": "/style.css.map?id=2811b8a6f1d8bbfb3f9d",
"/style.css.map": "/style.css.map?id=cb3d576a2955d2ecdc9e",
"/lib/amp/amp.css.map": "/lib/amp/amp.css.map?id=dd7640d771c35411cf97",
"/lib/gutenberg/front-end.css.map": "/lib/gutenberg/front-end.css.map?id=dacf2d50fcbe77450e2f",
"/lib/gutenberg/style-editor.css.map": "/lib/gutenberg/style-editor.css.map?id=77594a959cac0d5adb82",
Expand Down
109 changes: 54 additions & 55 deletions resources/css/main/site-navigation/_site-navigation.scss
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,60 @@
}
}

a {
color: #333;
display: block;
font-size: 15px;
font-weight: 400;
outline-offset: -1px;
padding-bottom: 12px;
padding-top: 12px;
text-decoration: none;
}

a:focus,
a:hover,
.current-menu-item > a,
.sub-menu .current-menu-item > a:focus,
.sub-menu .current-menu-item > a:hover {
color: $color--accent;
text-decoration: none;
}

.sub-menu,
.sub-menu a {
width: 100%;
}

.sub-menu {
clear: both;
display: none;
left: -9999px;
margin: 0;
opacity: 1;
padding-left: 15px;
position: static;
z-index: 99;
}

.sub-menu a {
background-color: #fff;
font-size: 14px;
position: relative;
word-wrap: break-word;
}

.menu-item:focus,
.menu-item:hover {
position: relative;
}

.menu-item:hover > .sub-menu {
display: block;
left: auto;
opacity: 1;
}

@include breakpoint(md) {
> .menu-bold > a {
font-weight: 700;
Expand Down Expand Up @@ -59,59 +113,4 @@
}
}
}

}

.genesis-nav-menu a {
color: #333;
display: block;
font-size: 15px;
font-weight: 400;
outline-offset: -1px;
padding-bottom: 12px;
padding-top: 12px;
text-decoration: none;
}

.genesis-nav-menu a:focus,
.genesis-nav-menu a:hover,
.genesis-nav-menu .current-menu-item > a,
.genesis-nav-menu .sub-menu .current-menu-item > a:focus,
.genesis-nav-menu .sub-menu .current-menu-item > a:hover {
color: $color--accent;
text-decoration: none;
}

.genesis-nav-menu .sub-menu,
.genesis-nav-menu .sub-menu a {
width: 100%;
}

.genesis-nav-menu .sub-menu {
clear: both;
display: none;
left: -9999px;
margin: 0;
opacity: 1;
padding-left: 15px;
position: static;
z-index: 99;
}

.genesis-nav-menu .sub-menu a {
background-color: #fff;
font-size: 14px;
position: relative;
word-wrap: break-word;
}

.genesis-nav-menu .menu-item:focus,
.genesis-nav-menu .menu-item:hover {
position: relative;
}

.genesis-nav-menu .menu-item:hover > .sub-menu {
display: block;
left: auto;
opacity: 1;
}
72 changes: 36 additions & 36 deletions style.css

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion style.css.map

Large diffs are not rendered by default.

0 comments on commit c93b860

Please sign in to comment.