breadcrumbs with only last item colorized
This commit is contained in:
parent
43c4dea41f
commit
b11ade054f
@ -4,4 +4,4 @@ $newline never
|
||||
$forall bc <- parents
|
||||
<li .breadcrumbs__item>
|
||||
<a .breadcrumbs__link href="@{fst bc}">#{snd bc}
|
||||
<li .breadcrumbs__item.breadcrumbs__item--active>#{title}
|
||||
<li ..breadcrumbs__item.breadcrumbs__last-item>#{title}
|
||||
|
||||
@ -6,7 +6,6 @@
|
||||
margin-left: -40px;
|
||||
margin-right: -40px;
|
||||
margin-bottom: 10px;
|
||||
padding-left: 30px;
|
||||
transition: margin-bottom .2s ease;
|
||||
}
|
||||
|
||||
@ -23,76 +22,57 @@
|
||||
}
|
||||
|
||||
.breadcrumbs__item {
|
||||
padding-left: 10px;
|
||||
padding-right: 4px;
|
||||
padding-left: 25px;
|
||||
padding-right: 14px;
|
||||
position: relative;
|
||||
line-height: 28px;
|
||||
opacity: 0.8;
|
||||
z-index: 1;
|
||||
|
||||
--color-bg-odd: transparent;
|
||||
--color-bg-odd-after: var(--color-dark);
|
||||
--color-bg-even: var(--color-primary);
|
||||
--color-bg-even-after: var(--color-primary);
|
||||
--color-separator: var(--color-primary);
|
||||
|
||||
&:hover {
|
||||
opacity: 1;
|
||||
}
|
||||
|
||||
&:first-child {
|
||||
padding-left: 20px;
|
||||
padding-left: 50px;
|
||||
}
|
||||
|
||||
&:nth-child(even) {
|
||||
background-color: var(--color-bg-even);
|
||||
|
||||
&::before {
|
||||
border-left-color: var(--color-bg-odd-after) !important;
|
||||
}
|
||||
|
||||
&::after {
|
||||
border-left-color: var(--color-bg-even-after) !important;
|
||||
}
|
||||
}
|
||||
|
||||
&:nth-child(odd) {
|
||||
background-color: var(--color-bg-odd);
|
||||
|
||||
&::before {
|
||||
border-left-color: var(--color-bg-even-after) !important;
|
||||
}
|
||||
|
||||
&::after {
|
||||
border-left-color: var(--color-bg-odd-after) !important;
|
||||
}
|
||||
}
|
||||
|
||||
&:not(:first-child) {
|
||||
padding-left: 25px;
|
||||
|
||||
&::before {
|
||||
content: '';
|
||||
position: absolute;
|
||||
top: 0;
|
||||
left: 0;
|
||||
border-top: 14px solid transparent;
|
||||
border-bottom: 14px solid transparent;
|
||||
border-left: 14px solid transparent;
|
||||
z-index: 10;
|
||||
}
|
||||
}
|
||||
|
||||
&:last-child {
|
||||
|
||||
&::after {
|
||||
content: '';
|
||||
position: absolute;
|
||||
top: 0;
|
||||
right: -14px;
|
||||
border-top: 14px solid transparent;
|
||||
border-bottom: 14px solid transparent;
|
||||
border-left: 14px solid transparent;
|
||||
z-index: 10;
|
||||
}
|
||||
&::after {
|
||||
content: '';
|
||||
position: absolute;
|
||||
top: 4px;
|
||||
right: -13px;
|
||||
width: 18px;
|
||||
height: 18px;
|
||||
border-bottom: 2px solid var(--color-separator);
|
||||
border-right: 2px solid var(--color-separator);
|
||||
transform: rotate(-45deg);
|
||||
z-index: 10;
|
||||
}
|
||||
}
|
||||
|
||||
.breadcrumbs__last-item {
|
||||
padding-right: 20px;
|
||||
background-color: var(--color-separator);
|
||||
|
||||
&::before {
|
||||
content: '';
|
||||
position: absolute;
|
||||
top: 4px;
|
||||
left: -8px;
|
||||
width: 18px;
|
||||
height: 18px;
|
||||
background-color: var(--color-dark);
|
||||
border-bottom: 2px solid var(--color-primary);
|
||||
border-right: 2px solid var(--color-primary);
|
||||
transform: rotate(-45deg);
|
||||
z-index: 10;
|
||||
}
|
||||
|
||||
&::after {
|
||||
background-color: var(--color-separator);
|
||||
right: -8px;
|
||||
}
|
||||
}
|
||||
|
||||
Loading…
Reference in New Issue
Block a user