Skip to content

Commit

Permalink
try basic version of varia theme styles as default
Browse files Browse the repository at this point in the history
  • Loading branch information
frontdevde committed Oct 28, 2019
1 parent b3ad226 commit b329189
Show file tree
Hide file tree
Showing 2 changed files with 108 additions and 0 deletions.
107 changes: 107 additions & 0 deletions packages/block-library/src/navigation-menu/style.scss
Original file line number Diff line number Diff line change
@@ -0,0 +1,107 @@
.wp-block-navigation-menu {

& > ul {
display: flex;
flex-wrap: wrap;
list-style: none;
margin: 0;
max-width: none;
padding-left: 0;
position: relative;

ul {
padding-left: 0;
}

li {
position: relative;
z-index: 1;

&:hover,
&:focus-within {
cursor: pointer;
z-index: 99999;
}

// Submenu Display
&:hover > ul,
&:focus-within > ul,
& ul:hover,
& ul:focus {
visibility: visible;
opacity: 1;
display: block;
}
}

& > li {
&:first-of-type > a {
padding-left: 0;
}

&:last-of-type > a {
padding-right: 0;
}
}

// Sub-menus Flyout
& > li > ul {
margin: 0;
position: absolute;
background: #fff;
box-shadow: 0 0 8px 2px rgba(0, 0, 0, 0.2);
left: 0;
top: 100%;
min-width: max-content;
opacity: 0;
transition: all 0.5s ease;
visibility: hidden;

ul {
width: 100%;
}
}
}

// Menu Link
a {
display: block;
padding: 16px;
}

// Sub-menu depth indicators
ul ul {

list-style: none;
margin-left: 0;
// Reset the counter for each UL
counter-reset: nested-list;

li a {

padding-top: 8px;
padding-bottom: 8px;

&::before {
// Increment the dashes
counter-increment: nested-list;
// Insert dashes with spaces in between
content: "\2013\00a0" counters(nested-list, "\2013\00a0", none);
}
}
}

// Top-level sub-menu indicators
// TODO: needs to apply to items with children only
& > ul > li > a {

&::after {
content: "\00a0\25BC";
display: inline-block;
font-size: 0.6rem;
height: inherit;
width: inherit;
}
}

}
1 change: 1 addition & 0 deletions packages/block-library/src/style.scss
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@
@import "./latest-comments/style.scss";
@import "./latest-posts/style.scss";
@import "./media-text/style.scss";
@import "./navigation-menu/style.scss";
@import "./paragraph/style.scss";
@import "./pullquote/style.scss";
@import "./quote/style.scss";
Expand Down

0 comments on commit b329189

Please sign in to comment.