Skip to content

Commit 5590e03

Browse files
committed
feat: list group with accent
1 parent 04d0bbf commit 5590e03

File tree

2 files changed

+42
-0
lines changed

2 files changed

+42
-0
lines changed

scss/_list-group.scss

Lines changed: 35 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,35 @@
1+
// List items with accent
2+
//
3+
// Remove top, bottome and right borders and border-radius.
4+
5+
.list-group-accent {
6+
.list-group-item {
7+
margin-bottom: 1px;
8+
border-top: 0;
9+
border-right: 0;
10+
border-bottom: 0;
11+
@include border-radius(0);
12+
13+
&.list-group-item-divider {
14+
position: relative;
15+
16+
&::before {
17+
position: absolute;
18+
bottom: -1px;
19+
left: 5%;
20+
width: 90%;
21+
height: 1px;
22+
content: "";
23+
background-color: $gray-200;
24+
}
25+
}
26+
}
27+
}
28+
29+
// Contextual variants
30+
//
31+
// Add modifier classes to change border color on individual items.
32+
33+
@each $color, $value in $theme-colors {
34+
@include list-group-item-accent-variant($color, $value);
35+
}

scss/mixins/_list-group.scss

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
// List Groups
2+
3+
@mixin list-group-item-accent-variant($state, $color) {
4+
.list-group-item-accent-#{$state} {
5+
border-left: 4px solid $color;
6+
}
7+
}

0 commit comments

Comments
 (0)