JSFiddle - React, Tailwind, and code Playground

by cchana

HTML

<div class="curled-corners">
	<h1>Section title</h1>
	<p>This is my content that needs to have curled corners. Well, kind of. Shadows give the appearance of more depth than there really is ;)</p>
</div>
<div class="curled-corners">
	<h1>Section title</h1>
	<p>This is my content that needs to have curled corners. Well, kind of. Shadows give the appearance of more depth than there really is ;)</p>
</div>
<p>And here is some additional content outside of the boxes above!</p>

SCSS

$bg = #F50;

body {
	background-color: $bg;	
}
h1 {
	border-bottom: 1px solid black;
	margin: 0 0 20px;
	padding: 0 0 5px;
}
.curled-corners {
	background-color: #FFF;
	border-radius: 10px;
	margin: 10px 10px 30px;
	padding: 10px;
	position: relative;
	width: 300px;
}

.curled-corners:before {

background: linear-gradient(to bottom, $bg 50%,#000 100%); /* W3C, IE10+, FF16+, Chrome26+, Opera12+, Safari7+ */

	box-shadow: inset 0 0 20px 15px $bg;
	content: '';
	display: block;
	height: calc(100% + 40px);
	left: -10px;
	position: absolute;
	top: -10px;
	width: calc(100% + 20px);
	z-index: -1;
}

.curled-corners:after {
	background-color: $bg;
	border-radius: 100%;
	bottom: -65px;
	box-shadow: 0 0 20px 20px $bg;
	content: '';
	display: block;
	height: 60px;
	left: -10px;
	position: absolute;
	width: calc(100% + 60px);
	z-index: -1;
}

p {
	margin: 0;
	padding: 0;
}