v4/static/styles/role.css
2025-04-07 22:07:29 -07:00

94 lines
1.9 KiB
CSS

.role {
/* TODO: dont do this, don't remember why?? (^aki) */
display: inline-flex;
align-items: center;
border: 2px solid var(--role-color);
border-radius: 3px;
user-select: none;
padding: 0.369rem; /* this is silly number pls ignore :3 (^noe) */
gap: 0.269rem;
/* cursor: pointer; */
transition: all 0.35s ease-in-out;
input {
cursor: pointer;
appearance: none;
position: relative;
width: 1.216rem;
height: 1.216rem;
margin: 0;
padding: 0;
border: 2px solid var(--role-color);
transition: all 0.25s ease-in-out;
border-radius: 1.216rem;
&:hover {
background-color: var(--role-color);
&::before {
opacity: 1;
background-color: var(--contrast-color);
}
}
&::before {
transition: all 0.35s ease-in-out;
content: "";
mask-image: url(/static/images/check.svg);
mask-size: 1.216rem 1.216rem;
mask-position: center;
mask-border: 2px;
background-color: var(--role-color);
opacity: 0;
position: absolute;
top: 0;
bottom: 0;
left: -2px;
right: -2px;
width: 1.216rem;
}
}
label {
cursor: pointer;
font-weight: 600;
}
/* slightly more specific than the below rule */
&:has(input:disabled) {
cursor: not-allowed;
input {
cursor: not-allowed;
opacity: 1;
&::before {
background-color: var(--role-color);
mask-image: url(/static/images/x.svg);
opacity: 1;
}
&:hover {
background-color: initial !important;
}
}
label {
cursor: not-allowed;
}
}
&:has(input:checked) {
background-color: var(--role-color);
input {
border-color: var(--contrast-color);
opacity: 1;
&::before {
opacity: 1;
background-color: var(--contrast-color);
}
}
label {
color: var(--contrast-color);
}
}
}