Skip to content

Commit 202f23d

Browse files
authored
style: hide active item from mobile view (#180)
style: set max-width for active item
1 parent 6244cf9 commit 202f23d

File tree

1 file changed

+12
-32
lines changed

1 file changed

+12
-32
lines changed

assets/hb/modules/breadcrumb/scss/index.scss

Lines changed: 12 additions & 32 deletions
Original file line numberDiff line numberDiff line change
@@ -3,16 +3,16 @@
33
--#{$prefix}breadcrumb-divider: "";
44
--#{$prefix}link-color-rgb: var(--#{$prefix}body-secondary);
55

6-
flex-wrap: nowrap;
76
overflow: hidden;
7+
flex-wrap: nowrap;
88
white-space: nowrap;
99

1010
.breadcrumb-item {
1111
background: var(--#{$prefix}secondary-bg);
1212
clip-path: polygon(0 0, calc(100% - 1rem) 0, 100% 50%, calc(100% - 1rem) 100%, 0 100%, 1rem 50%);
1313
margin-right: -0.875rem;
14-
min-width: 48px;
15-
max-width: 360px;
14+
max-width: 240px;
15+
flex-shrink: 0;
1616
overflow: hidden;
1717
padding: 0.5rem 0;
1818
text-overflow: ellipsis;
@@ -35,38 +35,18 @@
3535
}
3636

3737
&:last-child {
38-
max-width: 100%;
39-
}
40-
}
41-
42-
.breadcrumb-item:first-child {
43-
clip-path: polygon(0 0, calc(100% - 1rem) 0, 100% 50%, calc(100% - 1rem) 100%, 0 100%);
44-
45-
a {
46-
padding-left: 0.75rem;
47-
}
48-
}
38+
max-width: 320px;
4939

50-
@include media-breakpoint-down(md) {
51-
.breadcrumb-item {
52-
max-width: 240px;
53-
54-
&:not(:first-child) {
55-
&:not(:last-child) {
56-
align-items: center;
57-
display: flex;
58-
justify-content: center;
59-
width: 2.75rem;
40+
@include media-breakpoint-up(xl) {
41+
max-width: 480px;
42+
}
6043

61-
a {
62-
display: none;
63-
}
44+
@include media-breakpoint-up(xxl) {
45+
max-width: 640px;
46+
}
6447

65-
&::after {
66-
content: "...";
67-
margin-top: -0.5rem;
68-
}
69-
}
48+
@include media-breakpoint-down(sm) {
49+
display: none;
7050
}
7151
}
7252
}

0 commit comments

Comments
 (0)