Skip to content

Commit e5511d3

Browse files
committed
fix: Resolve issue with missing padding on elements on dynamic display and separator
1 parent 51b81de commit e5511d3

File tree

2 files changed

+47
-64
lines changed

2 files changed

+47
-64
lines changed
Lines changed: 40 additions & 59 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
<div class="pl-c-main">
22
<div class="pl-c-pattern-index">
3-
4-
<h3>UL list</h3>
5-
<bolt-list tag="ul" display="block" spacing="small" separator="dashed">
3+
<h3>Dynamic display</h3>
4+
<p>(block on small, inline on medium, large and full)</p>
5+
<bolt-list display="inline@small" spacing="small" separator="dashed">
66
<bolt-list-item>
77
Item 1
88
</bolt-list-item>
@@ -15,67 +15,48 @@
1515
<bolt-list-item>
1616
Item 4
1717
</bolt-list-item>
18-
<bolt-list-item>
18+
<bolt-list-item last>
1919
Item 5
2020
</bolt-list-item>
2121
</bolt-list>
2222

23-
{#<h3>OL list</h3>#}
24-
{#<bolt-list tag="ol" inset>#}
25-
{#<bolt-list-item>#}
26-
{#Item 1#}
27-
{#</bolt-list-item>#}
28-
{#<bolt-list-item>#}
29-
{#Item 2#}
30-
{#</bolt-list-item>#}
31-
{#<bolt-list-item>#}
32-
{#Item 3#}
33-
{#</bolt-list-item>#}
34-
{#<bolt-list-item>#}
35-
{#Item 4#}
36-
{#</bolt-list-item>#}
37-
{#<bolt-list-item>#}
38-
{#Item 5#}
39-
{#</bolt-list-item>#}
40-
{#</bolt-list>#}
41-
42-
{#<h3>DIV list</h3>#}
43-
{#<bolt-list tag="div" separator="solid">#}
44-
{#<bolt-list-item>#}
45-
{#Item 1#}
46-
{#</bolt-list-item>#}
47-
{#<bolt-list-item>#}
48-
{#Item 2#}
49-
{#</bolt-list-item>#}
50-
{#<bolt-list-item>#}
51-
{#Item 3#}
52-
{#</bolt-list-item>#}
53-
{#<bolt-list-item>#}
54-
{#Item 4#}
55-
{#</bolt-list-item>#}
56-
{#<bolt-list-item>#}
57-
{#Item 5#}
58-
{#</bolt-list-item>#}
59-
{#</bolt-list>#}
23+
<h3>Display inline</h3>
24+
<bolt-list display="inline" spacing="small" separator="dashed">
25+
<bolt-list-item>
26+
Item 1
27+
</bolt-list-item>
28+
<bolt-list-item>
29+
Item 2
30+
</bolt-list-item>
31+
<bolt-list-item>
32+
Item 3
33+
</bolt-list-item>
34+
<bolt-list-item>
35+
Item 4
36+
</bolt-list-item>
37+
<bolt-list-item last>
38+
Item 5
39+
</bolt-list-item>
40+
</bolt-list>
6041

61-
{#<h3>SPAN list</h3>#}
62-
{#<bolt-list tag="span" display="inline" separator="dashed">#}
63-
{#<bolt-list-item>#}
64-
{#Item 1#}
65-
{#</bolt-list-item>#}
66-
{#<bolt-list-item>#}
67-
{#Item 2#}
68-
{#</bolt-list-item>#}
69-
{#<bolt-list-item>#}
70-
{#Item 3#}
71-
{#</bolt-list-item>#}
72-
{#<bolt-list-item>#}
73-
{#Item 4#}
74-
{#</bolt-list-item>#}
75-
{#<bolt-list-item>#}
76-
{#Item 5#}
77-
{#</bolt-list-item>#}
78-
{#</bolt-list>#}
42+
<h3>Display Block</h3>
43+
<bolt-list display="block" spacing="small" separator="dashed">
44+
<bolt-list-item>
45+
Item 1
46+
</bolt-list-item>
47+
<bolt-list-item>
48+
Item 2
49+
</bolt-list-item>
50+
<bolt-list-item>
51+
Item 3
52+
</bolt-list-item>
53+
<bolt-list-item>
54+
Item 4
55+
</bolt-list-item>
56+
<bolt-list-item last>
57+
Item 5
58+
</bolt-list-item>
59+
</bolt-list>
7960
</div>
8061
</div>
8162

packages/components/bolt-list/src/_list-item.scss

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -61,11 +61,13 @@ $bolt-list-separator-styles: solid, dashed;
6161
$breakpoint-name: nth($breakpoint, 1);
6262

6363
&.c-bolt-list-item--display-inline\@#{$breakpoint-name} {
64-
border-bottom-width: 1px;
64+
&:not(.c-bolt-list-item--last-item) {
65+
border-bottom-width: 1px;
6566

66-
@include bolt-mq($breakpoint-name) {
67-
border-right-width: 1px;
68-
border-bottom-width: 0;
67+
@include bolt-mq($breakpoint-name) {
68+
border-right-width: 1px;
69+
border-bottom-width: 0;
70+
}
6971
}
7072
}
7173
}
@@ -94,7 +96,7 @@ $bolt-list-separator-styles: solid, dashed;
9496
$breakpoint-name: nth($breakpoint, 1);
9597

9698
&.c-bolt-list-item--spacing-#{$spacing-value-name} {
97-
.c-bolt-list-item--display-inline\@#{$breakpoint-name} {
99+
&.c-bolt-list-item--display-inline\@#{$breakpoint-name} {
98100
@include bolt-padding-bottom(#{$spacing-value-name});
99101

100102
@include bolt-mq($breakpoint-name) {

0 commit comments

Comments
 (0)