JustalK/PORTFOLIO

View on GitHub
src/assets/less/text.less

Summary

Maintainability
Test Coverage
@import (reference) "libs/constants.less";
@import (reference) "libs/mixins.less";
 
.text {
position: relative;
display: block;
user-select: none;
opacity: 1;
-webkit-font-smoothing: antialiased;
-moz-osx-font-smoothing: grayscale;
.transition(all 0.75s cubic-bezier(0.8, 0, 0.25, 1));
 
&::before,
&::after {
content: ' ';
position: absolute;
right: 0;
top: 0;
height: 100%;
width: 0;
background: @background-text-animation;
.transition(all 0.5s cubic-bezier(0.8, 0, 0.25, 1) 1s);
}
 
&::after {
left: 0;
}
 
&.invisible {
opacity: 0;
 
&::before {
width: 100%;
}
}
 
&.unmounted::after {
.transition(all 0.5s cubic-bezier(0.8, 0, 0.25, 1));
 
width: 100%;
}
}