<div class="container">
<ul>
<li class="list-item" style="--slist: #ebac79,#d65b56">Unordered list item</li>
<li class="list-item" style="--slist: #90cbb7,#2fb1a9">Ordered list item</li>
<li class="list-item" style="--slist: #8a7876,#32201c">display list item</li>
</ul>
</div>
@import url("https://fonts.googleapis.com/css2?family=Exo:wght@600&display=swap");
* {
margin: 0;
padding: 0;
box-sizing: border-box;
}
body {
inline-size: 100vw;
min-block-size: 100vh;
display: flex;
flex-direction: column;
align-items: center;
justify-content: center;
gap: 10px;
font-family: "Exo", Arial, sans-serif;
background-color: #f7f7f7;
line-height: 2;
}
.container {
padding: 40px;
background: #fff;
box-sizing: border-box;
box-shadow: 0 2px 4px rgb(0 0 0 / 20%);
min-width: 60vw;
max-width: 60vw;
border-radius: 5px;
position: relative;
margin-bottom: 20px;
}
select {
max-width: 200px;
}
ul {
filter: drop-shadow(0 1em 1em rgba(0, 0, 0, 0.2));
display: grid;
grid-template-columns: repeat(auto-fill, minmax(min(100%, 320px), 1fr));
gap: 20px;
}
@counter-style custom-counter-style {
system: cyclic;
symbols: "🐶";
}
.list-item {
display: flex;
align-items: center;
justify-content: space-between;
position: relative;
margin: 0.25em auto;
border: solid 0.5em transparent;
padding: 0.25em;
width: 100%;
height: 5em;
border-radius: 2.5em;
background: linear-gradient(#dbdbdb, #fff) content-box,
linear-gradient(var(--slist)) padding-box,
Linear-gradient(#fff, #dcdcdc) border-box;
font: 1.5em/1.375 trebuchet ms, verdana, sans-serif;
text-align: center;
text-indent: 1em;
clip-path: inset(0 round 2.5em);
}
.list-item::before {
position: absolute;
right: -0.5em;
width: 5em;
height: 5em;
border-radius: 0.5em;
transform: rotate(45deg);
box-shadow: 0 0 7px rgb(0 0 0 / 20%);
background: linear-gradient(
-45deg,
#e4e4e4 calc(50% - 2.5em),
#fff calc(50% + 2.5em)
);
content: "";
}
.list-item::after {
box-sizing: inherit;
display: grid;
place-content: center;
position: relative;
border: inherit;
margin-right: -0.25em;
width: 4em;
height: 4em;
border-radius: 50%;
box-shadow: inset 0 0 1px 1px #efefef, inset 0 -0.5em rgb(0 0 0 / 10%);
background: linear-gradient(var(--slist)) padding-box,
linear-gradient(#d0d0d0, #e7e7e7) border-box;
color: #fff;
text-indent: 0;
}
ul {
counter-reset: order;
}
li {
counter-increment: order;
}
li::after {
content: counter(order, decimal-leading-zero);
}
This Pen doesn't use any external CSS resources.
This Pen doesn't use any external JavaScript resources.