Actual goal: Give tiles, some containing images, an engraved/embossed look using only CSS.
Question: I'm attempting to use four inset box-shadows with transparency on a tile to create an engraved look. Unfortunately, the four translucent shadows overlap each other at the corners of the tile, producing an undesired effect.
Is there a way to prevent the box-shadows from overlapping at the corners? Or are there any other viable ways to achieve a transparent engraved look on these tiles?
body {background-color: #1E1E1E;}
.engrave1 {
background-color: #222;
width: 150px; height: 150px;
box-shadow: 0px 5px 2px 0px RGBa(0,0,0,0.3) inset,
-5px 0px 2px 0px RGBa(100,100,100,0.3) inset,
0px -5px 2px 0px RGBa(140,140,140,0.3) inset,
5px 0px 2px 0px RGBa(90,90,90,0.3) inset;
}
.engrave2 {
background-color: #222;
width: 150px; height: 150px;
border-radius: 8px;
box-shadow: 0px 9px 2px 0px RGBa(0,0,0,0.3) inset,
-9px 0px 2px 0px RGBa(100,100,100,0.3) inset,
0px -9px 2px 0px RGBa(140,140,140,0.3) inset,
9px 0px 2px 0px RGBa(90,90,90,0.3) inset;
}
<body>
<div class="engrave1"></div>
<br/>
<div class="engrave2"></div>
</body>