Example 3: Understanding Responsive Prefixes & The "Gotcha"

Resize your browser window. Breakpoints: 'sm' (640px), 'md' (768px), 'lg' (1024px).
Gotcha: Responsive prefixes (like `sm:`, `md:`) apply to that screen size *and larger*, unless overridden by another prefix for a larger screen.

Illustrating "And Larger" Behavior

Gotcha Demonstration: Specific Visibility Ranges

The following examples show how to control visibility for more specific ranges, addressing the "and larger" gotcha.

Gotcha Item 2: `block md:hidden`

I am visible by default ('xs') and on 'sm' screens. I become hidden from 'md' (768px) screens and LARGER.

(Interpreting gotcha: "Show *only* on small screens" = visible below `md`, hidden from `md` upwards.)

Key Takeaway: To make an element visible or hidden for a specific range (e.g., *only* on medium screens), you often need two responsive utility classes: one to activate it at the start of the range (e.g., `md:block`) and another to deactivate it at the end of the range (e.g., `lg:hidden`).