JSFiddle - React, Tailwind, and code Playground
by Federico Tibaldo
HTML
<link rel="stylesheet" href="https://unpkg.com/tailwindcss@0.4.1/dist/tailwind.min.css">
<div class="font-sans leading-tight my-8 flex items-center justify-center antialiased">
<div>
<button class="current px-4 py-2 text-lg text-white font-bold rounded mr-2">
Current Behaviour
</button>
<button class="desired px-4 py-2 text-lg text-white font-bold rounded">
Desired Behaviour
</button>
</div>
</div>
<div class="font-sans leading-tight my-8 flex items-center justify-center antialiased">
<div>
<input type="text" placeholder="Current Behaviour" class="current px-4 py-2 text-lg text-white font-bold rounded mr-2"/>
<input type="text" placeholder="Desired Behaviour" class="desired px-4 py-2 text-lg text-white font-bold rounded"/>
</div>
</div>
CSS
/************ COMMONS ************/
body {
background-color: #34495e;
color: white;
}
.desired, .current {
background-color: #7886d7;
border: 2px solid transparent;
}
/************ DESIRED ************/
/*** BUTTON ***/
button.desired:focus {
border: 2px solid white;
}
button.desired:hover {
background-color: #8cb2e3;
}
button.desired:active {
background-color: #6263cc;
}
/*** INPUT ***/
input.desired:focus {
background-color: #6263cc;
}
input.desired:hover {
background-color: #8cb2e3;
}
input.desired:active {
border: 2px solid white;
}
/************ CURRENT ************/
/*** BUTTON ***/
button.current:hover {
background-color: #8cb2e3;
}
button.current:active {
background-color: #6263cc;
}
button.current:focus {
border: 2px solid white;
}
/*** INPUT ***/
input.current:hover {
background-color: #8cb2e3;
}
input.current:active {
border: 2px solid white;
}
input.current:focus {
background-color: #6263cc;
}