This repository has been archived on 2025-08-21. You can view files and clone it. You cannot open issues or pull requests or push a commit.
Files
hugo-mistergeek/assets/css/scss/components/_breadcrumb.scss

155 lines
3.2 KiB
SCSS

// Breadcrumb Component
.breadcrumb-wrapper {
background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
border-bottom: 1px solid #dee2e6;
padding: 1rem 0;
@media (max-width: 768px) {
padding: 0.75rem 0;
}
.breadcrumb {
display: flex;
flex-wrap: wrap;
align-items: center;
margin: 0;
padding: 0;
list-style: none;
font-size: 0.875rem;
line-height: 1.4;
@media (max-width: 576px) {
font-size: 0.8125rem;
}
.breadcrumb-item {
display: flex;
align-items: center;
&:not(:last-child) {
margin-right: 0.5rem;
// &::after {
// content: "/";
// display: inline-block;
// color: #6c757d;
// margin-left: 0.75rem;
// opacity: 0.7;
// font-weight: 500;
// @media (max-width: 576px) {
// margin-left: 0.5rem;
// }
// }
}
a {
color: #495057;
text-decoration: none;
font-weight: 500;
transition: all 0.2s ease-in-out;
padding: 0.25rem 0.5rem;
border-radius: 0.25rem;
&:hover {
color: #007bff;
background-color: rgba(0, 123, 255, 0.1);
transform: translateY(-1px);
}
&:focus {
outline: 2px solid #007bff;
outline-offset: 1px;
}
i.fas {
margin-right: 0.375rem;
font-size: 0.75rem;
@media (max-width: 576px) {
margin-right: 0.25rem;
font-size: 0.6875rem;
}
}
}
&.active {
color: #6c757d;
font-weight: 600;
padding: 0.25rem 0.5rem;
max-width: 200px;
overflow: hidden;
text-overflow: ellipsis;
white-space: nowrap;
@media (max-width: 768px) {
max-width: 150px;
}
@media (max-width: 576px) {
max-width: 120px;
}
}
}
// Responsive truncation for long breadcrumbs
@media (max-width: 576px) {
.breadcrumb-item {
&:not(:last-child):not(:nth-last-child(2)) {
display: none;
& + .breadcrumb-item::before {
content: "...";
margin: 0 0.5rem;
color: #6c757d;
font-weight: bold;
}
}
}
}
}
// Dark mode support
@media (prefers-color-scheme: dark) {
background: linear-gradient(135deg, #343a40 0%, #495057 100%);
border-bottom-color: #6c757d;
.breadcrumb {
.breadcrumb-item {
&:not(:last-child):not(:only-child)::after {
color: #adb5bd;
}
a {
color: #dee2e6;
&:hover {
color: #66b2ff;
background-color: rgba(102, 178, 255, 0.1);
}
&:focus {
outline-color: #66b2ff;
}
}
&.active {
color: #adb5bd;
}
}
}
}
}
// Accessibility improvements
.sr-only {
position: absolute;
width: 1px;
height: 1px;
padding: 0;
margin: -1px;
overflow: hidden;
clip: rect(0, 0, 0, 0);
white-space: nowrap;
border: 0;
}