Tweak the hexagon component to use the SVG background image

This commit is contained in:
Oliver Akins 2022-07-19 22:54:13 -06:00
parent 6f7477eecf
commit 378e4315ba
No known key found for this signature in database
GPG key ID: 3C2014AF9457AF99

View file

@ -4,35 +4,14 @@
<style lang="scss">
.hexagon {
position: relative;
width: 100px;
height: 57.74px;
background-color: #000000;
margin: 28.87px 0;
height: 100%;
width: 100%;
background-image: url(/assets/hexagon.svg);
background-repeat: no-repeat;
background-position: center;
display: flex;
justify-content: center;
align-items: center;
}
.hexagon:before,
.hexagon:after {
content: "";
position: absolute;
width: 0;
border-left: 50px solid transparent;
border-right: 50px solid transparent;
}
.hexagon:before {
bottom: 100%;
border-bottom: 28.87px solid #000000;
}
.hexagon:after {
top: 100%;
width: 0;
border-top: 28.87px solid #000000;
z-index: -1;
color: white;
}
</style>