Adds the only-child pseudo-class variant to Tailwindcss
npm install tailwindcss-only-child
// tailwind.config.js
module.exports = {
variants: {
height: ['responsive', 'only'],
},
plugins: [
require('tailwindcss-only-child'),
],
};
<div>
<div class="only:h-full">
Take the full height when it is the only child
</div>
</div>
Maxim Vanhove Web developer at Starring Jane