Ā
š Hey there Docebo Community, and happy Friday!
Ā
Check out this awesome post on Medium:
Ā
šĀ Fantastic CSS border animation
Ā
This post popped up in my inbox today and I found it extremely interesting. Iām not quite savvy enough with CSS to understand everything this article covers in detail, but we have some experts in this community (Iām looking at you
Ā
Hereās a snippet I found to be really cool:
Ā
Border length changes
Ā

Ā
div {
position: relative;
border: 1px solid #03A9F3;
&::before,
&::after {
content: "";
position: absolute;
width: 20px;
height: 20px;
}
&::before {
top: -5px;
left: -5px;
border-top: 1px solid var(--borderColor);
border-left: 1px solid var(--borderColor);
}
&::after {
right: -5px;
bottom: -5px;
border-bottom: 1px solid var(--borderColor);
border-right: 1px solid var(--borderColor);
}
&:hover::before,
&:hover::after {
width: calc(100% + 9px);
height: calc(100% + 9px);
}
}Ā
You can check out some of the original authorās other templates here on CodePen.

