@evilcss/std
Version:
Awesome CSS design system and UI widgets
35 lines (34 loc) • 824 B
CSS
.std-button-halo {
position: relative;
z-index: 0;
}
.std-button-halo::after {
content: '';
position: absolute;
top: 0;
left: 0;
right: 0;
bottom: 0;
display: block;
width: 100%;
height: 100%;
border-radius: var(--button-radius, var(--std-radius1));
z-index: -1;
background: var(--button-accent, var(--std-color-primary-accent));
opacity: 0;
transform: scale(0);
transition: all var(--button-duration, var(--std-duration3));
}
.std-button-halo:focus::after,
.std-button-halo:hover::after {
transform: scale(1);
}
.std-button-halo:hover::after {
opacity: var(--halo-opacity--hover, .1);
}
.std-button-halo:focus::after {
opacity: var(--halo-opacity--focus, .1);
}
.std-button-halo:active::after {
opacity: var(--halo-opacity--active, .2);
}