Skip to content

Commit

Permalink
Adds in default style variation
Browse files Browse the repository at this point in the history
Start of fixing #18552
  • Loading branch information
Tammie Lister committed Nov 19, 2019
1 parent fb234f5 commit 3d82e6b
Show file tree
Hide file tree
Showing 3 changed files with 32 additions and 2 deletions.
5 changes: 5 additions & 0 deletions packages/block-library/src/navigation/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,11 @@ export const settings = {
inserter: true,
},

styles: [
{ name: 'default', label: __( 'Default' ), isDefault: true },
{ name: 'dark', label: __( 'Dark' ) },
],

edit,

save,
Expand Down
3 changes: 1 addition & 2 deletions packages/block-library/src/navigation/style.scss
Original file line number Diff line number Diff line change
Expand Up @@ -61,9 +61,8 @@
& > li > ul {
margin: 0;
position: absolute;
background: #fff;
left: 0;
top: 100%;
top: 80%;
min-width: max-content;
opacity: 0;
transition: all 0.5s ease;
Expand Down
26 changes: 26 additions & 0 deletions packages/block-library/src/navigation/theme.scss
Original file line number Diff line number Diff line change
Expand Up @@ -3,4 +3,30 @@
ul li {
list-style: none;
}

ul > li > ul {
background: #e3e3e3;
border-radius: 4px;
transition: opacity 0.15s linear, transform 0.15s linear, right 0s 0.15s;
transform: translateY(0.6rem);

& > a {
text-decoration: none;
}

&::before {
border: solid transparent;
border-color: rgba(227, 227, 227, 0);
border-bottom-color: #e3e3e3;
border-width: 10px;
bottom: 100%;
content: " ";
height: 0;
left: 20%;
margin-left: -10px;
width: 0;
position: absolute;
pointer-events: none;
}
}
}

0 comments on commit 3d82e6b

Please sign in to comment.