Skip to content

Commit

Permalink
fix(core/breadcrumb): fix color and alignment of button
Browse files Browse the repository at this point in the history
  • Loading branch information
danielleroux committed Sep 8, 2022
1 parent 4a92187 commit 1564fd8
Show file tree
Hide file tree
Showing 4 changed files with 44 additions and 11 deletions.
37 changes: 35 additions & 2 deletions packages/core/src/components/breadcrumb/breadcrumb.scss
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,34 @@
@import 'mixins/hover';
@import 'mixins/text-truncation';

@mixin crumb-hover($variant) {
@include hover {
background-color: var(--theme-breadcrumb-#{$variant}--background--hover);

.crumb-text,
.glyph {
color: var(--theme-breadcrumb-#{$variant}--color--hover);
}

.crumb-text + .glyph-chevron-right-small {
color: var(--theme-breadcrumb-#{$variant}-arrow--color--hover);
}
}

@include active {
background-color: var(--theme-breadcrumb-#{$variant}--background--active);

.crumb-text,
.glyph {
color: var(--theme-breadcrumb-#{$variant}--color--active);
}

.crumb-text + .glyph-chevron-right-small {
color: var(--theme-breadcrumb-#{$variant}-arrow--color--active);
}
}
}

@mixin breadcrumb($variant) {
.crumb.#{$variant} {
background-color: var(--theme-breadcrumb-#{$variant}--background);
Expand Down Expand Up @@ -86,6 +114,8 @@
outline: none;
cursor: pointer;

@include crumb-hover('btn');

.crumb-text {
@include ellipsis;
display: flex;
Expand Down Expand Up @@ -137,11 +167,14 @@
display: flex;

.more-text-ellipsis {
height: $x-large-space;
width: $x-large-space;
width: 1rem;
display: inline-block;
font-weight: $font-weight-bold;
}

.glyph {
line-height: unset;
}
}

.crumb-items {
Expand Down
18 changes: 9 additions & 9 deletions packages/core/src/components/breadcrumb/breadcrumb.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -7,14 +7,14 @@
*/

import {
Component,
Element,
Event,
EventEmitter,
h,
Host,
Prop,
State
Component,
Element,
Event,
EventEmitter,
h,
Host,
Prop,
State,
} from '@stencil/core';
import animejs from 'animejs';
import { createMutationObserver } from '../utils/mutation-observer';
Expand Down Expand Up @@ -181,7 +181,7 @@ export class Breadcrumb {
{item.label}
</span>
{!isLastItem ? (
<span class="glyph glyph-16 glyph-chevron-right-small text-default-text"></span>
<span class="glyph glyph-18 glyph-chevron-right-small text-default-text"></span>
) : null}
</div>
);
Expand Down
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.

0 comments on commit 1564fd8

Please sign in to comment.