class="-mt-4" on an element?-mt-4 in Tailwind CSS?The -mt-4 class applies a negative top margin of 1rem (4 in Tailwind scale equals 1rem). This pulls the element upwards, overlapping the element above it.
-ml-1 applies a negative left margin of 0.25rem, but since 0.5rem is needed, -ml-2 is correct. Tailwind's scale 2 equals 0.5rem, so -ml-2 is the right choice.
-mx-6 to a block element inside a container with padding?-mx-6 to a block element inside it. What is the visual effect?-mx-6 applies negative left and right margins of 1.5rem each (6 in Tailwind scale equals 1.5rem). This pulls the element outside the container's padding, making it visually stretch to the container edges or beyond.
When elements overlap visually due to negative margins, keyboard users might find the focus order confusing because the tab order follows the DOM, not visual position. This can make navigation harder.
class="-m-4" in Tailwind CSS?class="-m-4". What happens?-m-4 is a valid Tailwind class that applies negative margin of 1rem on all sides. Tailwind supports this shorthand for negative margins.