JSFiddle - React, Tailwind, and code Playground
by John Grivas
HTML
<label for="pretty">Label text</label>
CSS
label {
position: relative;
display: inline-block;
padding: 0 2px;
margin: 2px;
}
label:before {
content:"";
position: absolute;
top: 0;
left: 0;
z-index: -1;
width: 100%;
height: 100%;
background: white;
}
label:after {
content:"";
position: absolute;
top: -2px;
bottom: -2px;
left: -2px;
right: -2px;
z-index: -2;
background: #1e5799;
/* Old browsers */
background: -moz-linear-gradient(top, #1e5799 13%, #efe22f 79%);
/* FF3.6+ */
background: -webkit-gradient(linear, left top, left bottom, color-stop(13%, #1e5799), color-stop(79%, #efe22f));
/* Chrome,Safari4+ */
background: -webkit-linear-gradient(top, #1e5799 13%, #efe22f 79%);
/* Chrome10+,Safari5.1+ */
background: -o-linear-gradient(top, #1e5799 13%, #efe22f 79%);
/* Opera 11.10+ */
background: -ms-linear-gradient(top, #1e5799 13%, #efe22f 79%);
/* IE10+ */
background: linear-gradient(to bottom, #1e5799 13%, #efe22f 79%);
/* W3C */
filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#1e5799', endColorstr='#efe22f', GradientType=0);
/* IE6-9 */
}