Storybook-tailwind. How should I add tailwind to storybook

Storybook recommends using the @storybook/addon-postcss for customizing the postCSS config from now on (instead of relying on customizing the postcss-loader): Add the postCSS addon to your installation npm i -D @storybook/addon-postcss # or yarn add -D @storybook/addon-postcss Create the postcss.config.js in the project root // postcss.config.js module.exports = { plugins: { tailwindcss: {}, autoprefixer: {}, … Read more

Tailwindcss: fixed/sticky footer on the bottom

<div class=”flex flex-col h-screen justify-between”> <header class=”h-10 bg-red-500″>Header</header> <main class=”mb-auto h-10 bg-green-500″>Content</main> <footer class=”h-10 bg-blue-500″>Footer</footer> </div> Class justify-between is not required, but I would leave him (for other case). So, play with h-screen and mb-auto classes. And you get this UI:

How to use calc() in tailwind CSS?

If you are using v2.x, add mode: ‘jit’ to your tailwind.config.js (no mode: ‘jit’ needed in tailwind v3) module.exports = { mode: ‘jit’, …. }; And use like this: (Without space!) class=”w-[calc(100%+2rem)]” It will produce: .w-\[calc\(100\%\+2rem\)\] { width: calc(100% + 2rem); } We can use the theme variables as well: h-[calc(100%-theme(space.24))] Tailwind v3 update Now … Read more

techhipbettruvabetnorabahisbahis forumuedueduedusedueduedusedusedusedusedus