Search results
If your elements are in reverse order (using say flex-row-reverse or flex-col-reverse), use the space-x-reverse or space-y-reverse utilities to ensure the space is added to the correct side of each element.
18 lut 2021 · When using spacing utilities inside reversed flex containers, you can use the space-{x/y}-reverse utility: https://tailwindcss.com/docs/space#reversing-children-order.
Tailwind CSS class .space-x-reverse / .space-y-reverse with source code and live preview. You can copy our examples and paste them into your project!
Spacing scale. If you’d like to customize your values for space between, padding, margin, width, and height all at once, use the theme.spacing section of your tailwind.config.js file. // tailwind.config.js module.exports = { theme: { spacing: { + sm: '8px', + md: '16px', + lg: '24px', + xl: '48px', } } }
23 lip 2021 · If your elements are in reverse order (using say flex-row-reverse or flex-col-reverse), use the space-x-reverse or space-y-reverse utilities to ensure the space is added to the correct side of each element. So just add the class space-x-reverse in your code like this: Demo <div class="flex flex-row-reverse items-center space-x-4 space-x-reverse">
5 lut 2023 · That's why there is the space-x-reverse class for reversed horizontal layout or space-y-reverse for reversed vertical layouts, see the documentation. Alternatively for flex layouts, you may wish to consider using gap .
Tailwind CSS class .space-y-reverse with source code and live preview. You can copy our examples and paste them into your project!