Fixed diamond rotation
All checks were successful
Deploy Blog to Folder / deploy (push) Successful in 4s
All checks were successful
Deploy Blog to Folder / deploy (push) Successful in 4s
This commit is contained in:
@ -62,10 +62,27 @@
|
||||
|
||||
/* Shape classes */
|
||||
.diamond {
|
||||
width: calc(100% / sqrt(2)); /* ≈ 100% / √2 (100% because square width = 1, which translates to 100%) */
|
||||
width: 100%;
|
||||
aspect-ratio: 1 / 1;
|
||||
transform: rotate(45deg);
|
||||
margin: auto;
|
||||
animation: spin-in 1s forwards;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
position: relative;
|
||||
}
|
||||
|
||||
.diamond::after {
|
||||
content: "";
|
||||
position: absolute;
|
||||
width: calc(100% / sqrt(2)); /* Shrink so rotated square fits inside wrapper */
|
||||
aspect-ratio: 1 / 1;
|
||||
background: var(--fill-color);
|
||||
transform: rotate(45deg);
|
||||
}
|
||||
|
||||
.circle {
|
||||
border-radius: 75%;
|
||||
}
|
||||
|
||||
main > * {
|
||||
|
||||
Reference in New Issue
Block a user