fix: display 'New' when DTL btn has alternatives

close #104
This commit is contained in:
Timothée Goguely 2025-01-27 11:07:35 +01:00
parent b725146861
commit f4a5e53140
2 changed files with 29 additions and 3 deletions

View file

@ -37,19 +37,44 @@
left: .5rem;
top: .5rem;
}
#dtl-btn[data-grade]::after {
#dtl-btn[data-grade]::after,
#dtl-btn .new {
position: absolute;
right: .25rem;
top: .25rem;
width: 2rem;
height: 2rem;
user-select: none;
border-radius: var(--rounded-sm);
}
#dtl-btn[data-new][data-grade]::after {
display: none;
}
#dtl-btn .new {
color: var(--color-white);
background: var(--color-primary-50);
font-weight: 700;
font-size: var(--text-xs);
padding: .5rem 0;
z-index: 10;
}
#dtl-btn .new::after {
content: "";
width: .5rem;
height: .5rem;
border: 2px solid var(--color-black);
border-radius: 50%;
background: var(--color-primary);
display: block;
position: absolute;
top: -.333rem;
right: -.333rem;
}
/* Grades */
[data-grade]::after {
content: attr(data-grade);
color: transparent;
user-select: none;
border-radius: var(--rounded-sm);
background-repeat: no-repeat;
background-position: center;