Skip to content
This repository was archived by the owner on Apr 28, 2025. It is now read-only.

Commit 51d81ea

Browse files
authored
feat(list): new component (#2468)
1 parent 32b6d59 commit 51d81ea

File tree

6 files changed

+859
-0
lines changed

6 files changed

+859
-0
lines changed

.changeset/strong-dingos-suffer.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
---
2+
"@ebay/skin": minor
3+
---
4+
5+
feat(list): new component

dist/list/list.css

Lines changed: 76 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,76 @@
1+
.list {
2+
max-width: 480px;
3+
}
4+
5+
.list ul {
6+
list-style: none;
7+
margin: 0;
8+
padding: 0;
9+
}
10+
11+
.list ul li > * {
12+
align-items: center;
13+
background-color: var(
14+
--list-background-color,
15+
var(--color-background-primary)
16+
);
17+
box-sizing: border-box;
18+
color: var(--color-foreground-on-primary);
19+
display: inline-flex;
20+
font-size: var(--font-size-16);
21+
margin-block: 1px;
22+
min-height: var(--spacing-600);
23+
padding: var(--spacing-150) var(--spacing-200);
24+
width: 100%;
25+
}
26+
27+
.list__leading {
28+
margin-inline-end: var(--spacing-200);
29+
}
30+
31+
.list__trailing {
32+
margin-inline-start: var(--spacing-200);
33+
}
34+
35+
.list__body {
36+
flex: 1;
37+
}
38+
39+
.list li > a,
40+
.list li > button {
41+
border: none;
42+
text-align: left;
43+
text-decoration: none;
44+
}
45+
46+
.list li > a:focus,
47+
.list li > a:hover,
48+
.list li > button:focus,
49+
.list li > button:hover {
50+
color: var(--color-foreground-on-primary);
51+
}
52+
53+
.list li > a:active,
54+
.list li > a:focus,
55+
.list li > a:hover,
56+
.list li > button:active,
57+
.list li > button:focus,
58+
.list li > button:hover {
59+
background-color: var(
60+
--list-background-hover-color,
61+
var(--color-state-primary-hover)
62+
);
63+
}
64+
65+
.list hr {
66+
border: 0;
67+
border-top: 1px solid var(--color-stroke-subtle);
68+
height: 1px;
69+
margin-inline: var(--spacing-200);
70+
padding: 0;
71+
}
72+
73+
[dir="rtl"] .list li > a,
74+
[dir="rtl"] .list li > button {
75+
text-align: right;
76+
}

0 commit comments

Comments
 (0)