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!
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.
documentation on the Tailwind CSS website. caution. space-{n} was temporary removed in v4. You can now use gap-* utilities to add space between elements. We will re-add it once React Native adds support for display: 'block'.
Responsive. To control the space between elements at a specific breakpoint, add a {screen}: prefix to any existing space utility. For example, adding the class md:space-x-8 to an element would apply the space-x-8 utility at medium screen sizes and above. <div class="flex space-x-2 md:space-x-8 "> <div>1</div> <div>2</div> <div>3</div> </div>
19 lut 2024 · In Tailwind CSS, space-x and space-y classes are used to add spacing between child elements along the horizontal (x-axis) and vertical (y-axis) directions, respectively. These classes are beneficial in flex container scenarios for managing the spacing between flex items.