Cleanup nav-stacked .active state styles, remove unnecessary nesting

This commit is contained in:
minusfive 2017-08-30 11:01:01 -04:00 committed by Robin Ward
parent 8781c6bfcb
commit 5fd4970602
4 changed files with 32 additions and 36 deletions

View File

@ -375,11 +375,6 @@ td.flaggers td {
width: 18.018%; width: 18.018%;
position: relative; position: relative;
li a.active {
color: $secondary;
background-color: $quaternary;
}
// The admin-nav becomes a slide-out menu at the mobile-nav breakpoint // The admin-nav becomes a slide-out menu at the mobile-nav breakpoint
@media (max-width: $mobile-breakpoint) { @media (max-width: $mobile-breakpoint) {
position: absolute; position: absolute;

View File

@ -27,7 +27,7 @@
// Changes the triangle arrow direction in .nav-stacked .active // Changes the triangle arrow direction in .nav-stacked .active
// The 'left' and 'right' in these selectors is not being flipped by r2. // The 'left' and 'right' in these selectors is not being flipped by r2.
.rtl .nav-stacked .active > a::after { .rtl .nav-stacked a.active::after {
border-left-color: transparent !important; border-left-color: transparent !important;
border-right-color: $secondary !important; border-right-color: $secondary !important;
} }

View File

@ -76,6 +76,7 @@
&.indent { &.indent {
padding-left: 15px; padding-left: 15px;
} }
}
a { a {
margin: 0; margin: 0;
@ -84,15 +85,12 @@
line-height: 20px; line-height: 20px;
cursor: pointer; cursor: pointer;
color: $primary; color: $primary;
}
}
.active > a, &.active {
li > a.active {
color: $secondary; color: $secondary;
background-color: $quaternary; background-color: $quaternary;
&:after { &::after {
left: 90%; left: 90%;
top: 33%; top: 33%;
content: " "; content: " ";
@ -101,6 +99,7 @@
border-left-color: $secondary; border-left-color: $secondary;
} }
} }
}
.count { .count {
font-size: 0.857em; font-size: 0.857em;

View File

@ -113,14 +113,19 @@
.nav-stacked { .nav-stacked {
background-color: transparent; background-color: transparent;
li { li {
border-bottom: none; border-bottom: none;
a { &.archive {
color: dark-light-choose(scale-color($primary, $lightness: 40%), scale-color($secondary, $lightness: 40%)); padding-left: 15px;
}
} }
a.active { a {
color: dark-light-choose(scale-color($primary, $lightness: 40%), scale-color($secondary, $lightness: 40%));
&.active {
color: $primary; color: $primary;
font-weight: bold; font-weight: bold;
background-color: transparent; background-color: transparent;
@ -129,9 +134,6 @@
display: none; display: none;
} }
} }
&.archive {
padding-left: 15px;
}
} }
} }
} }