Skip to content

Commit b329189

Browse files
committed
try basic version of varia theme styles as default
1 parent b3ad226 commit b329189

File tree

2 files changed

+108
-0
lines changed

2 files changed

+108
-0
lines changed
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,107 @@
1+
.wp-block-navigation-menu {
2+
3+
& > ul {
4+
display: flex;
5+
flex-wrap: wrap;
6+
list-style: none;
7+
margin: 0;
8+
max-width: none;
9+
padding-left: 0;
10+
position: relative;
11+
12+
ul {
13+
padding-left: 0;
14+
}
15+
16+
li {
17+
position: relative;
18+
z-index: 1;
19+
20+
&:hover,
21+
&:focus-within {
22+
cursor: pointer;
23+
z-index: 99999;
24+
}
25+
26+
// Submenu Display
27+
&:hover > ul,
28+
&:focus-within > ul,
29+
& ul:hover,
30+
& ul:focus {
31+
visibility: visible;
32+
opacity: 1;
33+
display: block;
34+
}
35+
}
36+
37+
& > li {
38+
&:first-of-type > a {
39+
padding-left: 0;
40+
}
41+
42+
&:last-of-type > a {
43+
padding-right: 0;
44+
}
45+
}
46+
47+
// Sub-menus Flyout
48+
& > li > ul {
49+
margin: 0;
50+
position: absolute;
51+
background: #fff;
52+
box-shadow: 0 0 8px 2px rgba(0, 0, 0, 0.2);
53+
left: 0;
54+
top: 100%;
55+
min-width: max-content;
56+
opacity: 0;
57+
transition: all 0.5s ease;
58+
visibility: hidden;
59+
60+
ul {
61+
width: 100%;
62+
}
63+
}
64+
}
65+
66+
// Menu Link
67+
a {
68+
display: block;
69+
padding: 16px;
70+
}
71+
72+
// Sub-menu depth indicators
73+
ul ul {
74+
75+
list-style: none;
76+
margin-left: 0;
77+
// Reset the counter for each UL
78+
counter-reset: nested-list;
79+
80+
li a {
81+
82+
padding-top: 8px;
83+
padding-bottom: 8px;
84+
85+
&::before {
86+
// Increment the dashes
87+
counter-increment: nested-list;
88+
// Insert dashes with spaces in between
89+
content: "\2013\00a0" counters(nested-list, "\2013\00a0", none);
90+
}
91+
}
92+
}
93+
94+
// Top-level sub-menu indicators
95+
// TODO: needs to apply to items with children only
96+
& > ul > li > a {
97+
98+
&::after {
99+
content: "\00a0\25BC";
100+
display: inline-block;
101+
font-size: 0.6rem;
102+
height: inherit;
103+
width: inherit;
104+
}
105+
}
106+
107+
}

packages/block-library/src/style.scss

+1
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@
1111
@import "./latest-comments/style.scss";
1212
@import "./latest-posts/style.scss";
1313
@import "./media-text/style.scss";
14+
@import "./navigation-menu/style.scss";
1415
@import "./paragraph/style.scss";
1516
@import "./pullquote/style.scss";
1617
@import "./quote/style.scss";

0 commit comments

Comments
 (0)