Skip to content

Commit cc988a4

Browse files
authored
[6.0] Add CSS to Cassiopeia for the refactored mod_menu (#45930)
* Add CSS for the corrected mod_menu * Corrected focus * Corrected z-index
1 parent f551bbe commit cc988a4

File tree

2 files changed

+41
-0
lines changed

2 files changed

+41
-0
lines changed

build/media_source/templates/site/cassiopeia/scss/blocks/_header.scss

Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -83,6 +83,34 @@
8383
display: flex;
8484
flex: 1 1 0%;
8585
flex-direction: row;
86+
:where(.mod-menu__sub:not(.mod-menu__sub *)) {
87+
position: absolute;
88+
top: 100%;
89+
z-index: 1001;
90+
display: block;
91+
min-width: 12rem;
92+
padding: 0;
93+
margin: 0;
94+
background-color: #fff;
95+
}
96+
}
97+
98+
@include media-breakpoint-down(lg) {
99+
&.mod-list > li > a:hover {
100+
text-decoration: underline;
101+
}
102+
.mod-menu__sub {
103+
a,
104+
span {
105+
color: $white;
106+
}
107+
}
108+
}
109+
110+
.mod-menu__sub {
111+
a:hover {
112+
text-decoration: underline;
113+
}
86114
}
87115

88116
> li {

build/media_source/templates/site/cassiopeia/scss/blocks/_modifiers.scss

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -328,3 +328,16 @@
328328
}
329329
}
330330
}
331+
332+
.mod-menu a,
333+
.mod-menu button {
334+
color: var(--link-color);
335+
@at-root .container-header & {
336+
color: currentColor;
337+
}
338+
&:focus-visible {
339+
outline: 2px solid currentColor;
340+
outline-offset: 2px;
341+
}
342+
}
343+

0 commit comments

Comments
 (0)