Add Fadable component
This commit is contained in:
23
styles/components/fadeable.css
Normal file
23
styles/components/fadeable.css
Normal file
@@ -0,0 +1,23 @@
|
||||
.fadable {
|
||||
position: relative;
|
||||
|
||||
&::after {
|
||||
transition: opacity 0.2s cubic-bezier(0.54, 0, 0.28, 1);
|
||||
content: '';
|
||||
display: block;
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
position: absolute;
|
||||
left: 0;
|
||||
top: 0;
|
||||
opacity: 0;
|
||||
background: var(--color-gray-dark);
|
||||
pointer-events: none;
|
||||
}
|
||||
|
||||
&.is-faded {
|
||||
&::after {
|
||||
opacity: 1;
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user