JSFiddle - React, Tailwind, and code Playground

by crnacura

HTML

<a class="oe-caption oe-caption" href="http://cargocollective.com/jaimemartinez/Illustration" data-title="Smug Eagle" data-description="I watched the four riders raise their weapons into the air. Without warning, screaming their war cry. They led the attack, down to the battle they rode."><img src="http://tympanus.net/Tutorials/AttributeSelectorsImageCaptions/images/1.jpg" alt="Illustration of Smug Eagle"></a>

CSS

@import url(http://fonts.googleapis.com/css?family=Lato:300,400,700);
body {
	font-family: 'Lato', Calibri, Arial, sans-serif;
	color: #89867e;
	background: #f9f9f9;
}

*, *:after, *:before { -webkit-box-sizing: border-box; -moz-box-sizing: border-box; box-sizing: border-box; }

.oe-caption {
	display: inline-block;
	position: relative;
	margin: 10px;
}

.oe-caption img {
	display: block;
	max-width: 100%;
}

.oe-caption:before,
.oe-caption:after {
	position: absolute;
	left: 100%;
	width: 100%;
	margin: 0 0 0 10%;
	font-weight: 300;
	color: #89867e;
}

.oe-caption:before {
	content: attr(data-title);
	top: 0;
	height: 25%;
	padding: 5px 30px 15px 10px;
	font-size: 40px;
	border-bottom: 1px solid rgba(0,0,0,0.1);
}

.oe-caption:after {
	content: attr(data-description);
	top: 25%;
	padding: 20px 10px 0;
	font-size: 18px;
}