Skip to content

Commit

Permalink
refactor(theme-classic): little breadcrumbs improvements (#6932)
Browse files Browse the repository at this point in the history
  • Loading branch information
lex111 authored and slorber committed Mar 18, 2022
1 parent b19cab5 commit c3a8afe
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 19 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ function BreadcrumbsItemLink({
children: ReactNode;
href?: string;
}): JSX.Element {
const className = clsx('breadcrumbs__link', styles.breadcrumbsItemLink);
const className = 'breadcrumbs__link';
return href ? (
<Link className={className} href={href} itemProp="item">
<span itemProp="name">{children}</span>
Expand Down Expand Up @@ -98,7 +98,8 @@ export default function DocBreadcrumbs(): JSX.Element | null {
key={idx}
active={idx === breadcrumbs.length - 1}
index={idx}>
<BreadcrumbsItemLink href={item.href}>
<BreadcrumbsItemLink
href={idx < breadcrumbs.length - 1 ? item.href : undefined}>
{item.label}
</BreadcrumbsItemLink>
</BreadcrumbsItem>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,21 +6,6 @@
*/

.breadcrumbsContainer {
margin-bottom: 0.4rem;
}

.breadcrumbsItemLink {
--ifm-breadcrumb-size-multiplier: 0.7 !important;
margin-bottom: 0.4rem;
background: var(--ifm-color-gray-100);
}

html[data-theme='dark'] .breadcrumbsItemLink {
background-color: var(--ifm-color-gray-900);
}

@media (min-width: 997px) {
.breadcrumbsItemLink {
--ifm-breadcrumb-size-multiplier: 0.8;
}
--ifm-breadcrumb-size-multiplier: 0.8;
margin-bottom: 0.8rem;
}

0 comments on commit c3a8afe

Please sign in to comment.