mirror of
https://github.com/Icinga/icingaweb2.git
synced 2025-07-26 15:24:05 +02:00
css: Expect additional nav anchors to have styled content
anchors are part of the layout in the menu, they shouldn't be styled. Instead they're now expected to have content that is styled instead.
This commit is contained in:
parent
54acf35c69
commit
e4a39cf0e1
@ -46,7 +46,7 @@
|
||||
}
|
||||
}
|
||||
|
||||
#layout:not(.sidebar-collapsed) #menu .nav-item > a {
|
||||
#layout:not(.sidebar-collapsed) #menu .nav-item > a:first-of-type {
|
||||
// Respect overflowing content
|
||||
overflow: hidden;
|
||||
text-overflow: ellipsis;
|
||||
@ -141,7 +141,11 @@
|
||||
> a {
|
||||
.var(color, menu-2ndlvl-color);
|
||||
font-size: @font-size-small;
|
||||
padding: 0.364em 0.545em 0.364em (@icon-width + .75em)/@font-size-small;
|
||||
padding: 0.364em 0.545em 0.364em 0.545em;
|
||||
|
||||
&:first-of-type {
|
||||
padding-left: (@icon-width + .75em)/@font-size-small;
|
||||
}
|
||||
}
|
||||
|
||||
&.active {
|
||||
@ -170,11 +174,14 @@
|
||||
.var(background-color, menu-2ndlvl-active-bg-color);
|
||||
|
||||
&:hover, &:focus {
|
||||
&:first-of-type,
|
||||
&:first-of-type ~ a {
|
||||
.var(color, menu-2ndlvl-active-hover-color);
|
||||
.var(background-color, menu-2ndlvl-active-hover-bg-color);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
.no-js #menu .nav-level-2 > .nav-item {
|
||||
// Expand menu if JavaScript is disabled
|
||||
@ -286,14 +293,20 @@
|
||||
|
||||
> a {
|
||||
.var(color, menu-flyout-color);
|
||||
|
||||
&:first-of-type {
|
||||
padding-left: 1.5em;
|
||||
}
|
||||
}
|
||||
|
||||
&:not(.active) {
|
||||
a:hover, a:focus {
|
||||
&:first-of-type,
|
||||
&:first-of-type ~ a {
|
||||
.var(background-color, menu-2ndlvl-highlight-bg-color);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
&.active > a {
|
||||
.var(color, menu-color);
|
||||
@ -333,25 +346,25 @@
|
||||
display: flex;
|
||||
align-items: center;
|
||||
|
||||
a:not(.badge) {
|
||||
a:first-of-type {
|
||||
flex: 1 1 auto;
|
||||
width: 0;
|
||||
}
|
||||
|
||||
a.badge {
|
||||
.var(color, text-color-inverted);
|
||||
flex: 0 1 auto;
|
||||
margin-right: 1em;
|
||||
padding: .25em;
|
||||
a:first-of-type ~ a {
|
||||
flex: 0;
|
||||
width: auto;
|
||||
|
||||
&:hover {
|
||||
&:hover,
|
||||
&:focus {
|
||||
.badge {
|
||||
opacity: .6;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// Accessibility skip links
|
||||
.skip-links {
|
||||
@ -527,29 +540,32 @@ html.no-js #toggle-sidebar {
|
||||
align-items: center;
|
||||
}
|
||||
|
||||
&.badge-nav-item a:not(.badge) {
|
||||
&.badge-nav-item a:first-of-type {
|
||||
flex: 1 1 auto;
|
||||
width: 0;
|
||||
}
|
||||
|
||||
&.badge-nav-item a.badge {
|
||||
.var(color, text-color-inverted);
|
||||
flex: 0 1 auto;
|
||||
margin-right: 1em;
|
||||
padding: .25em;
|
||||
&.badge-nav-item a:first-of-type ~ a {
|
||||
flex: 0;
|
||||
width: auto;
|
||||
|
||||
&:hover {
|
||||
&:hover,
|
||||
&:focus {
|
||||
.badge {
|
||||
opacity: .6;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
#layout:not(.sidebar-collapsed) #menu .nav-level-1 > .nav-item.active .nav-level-2 > li {
|
||||
&.badge-nav-item:not(.selected) {
|
||||
a:hover,
|
||||
a:focus {
|
||||
&:first-of-type,
|
||||
&:first-of-type ~ a {
|
||||
.var(background-color, menu-2ndlvl-highlight-bg-color);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user