scroll-margin-top with a value of 2rem using arbitrary properties?Tailwind allows arbitrary CSS properties by wrapping the full property and value inside square brackets, like [property:value]. So [scroll-margin-top:2rem] is correct.
Options A, C, and D are not valid Tailwind arbitrary property syntax.
[scroll-padding-top:4rem] have when the user scrolls to an anchor link inside the page?<nav class="fixed top-0 w-full bg-white shadow"> <a href="#section1" class="block p-4">Section 1</a> </nav> <main class="pt-16 [scroll-padding-top:4rem]"> <section id="section1" class="h-screen bg-gray-100">Content</section> </main>
The scroll-padding-top property sets the offset from the top of the viewport when scrolling to an anchor. Here, [scroll-padding-top:4rem] ensures the section is visible below the fixed nav bar.
Option A ignores the offset, C changes padding inside the section (not scroll behavior), and D is incorrect.
backdrop-filter: blur(5px) only when the element is hovered?The correct syntax is to prefix the arbitrary property with the pseudo-class, like hover:[property:value]. So hover:[backdrop-filter:blur(5px)] applies the blur only on hover.
Other options misuse the brackets or pseudo-class placement.
[scroll-margin-top:3rem] in Tailwind, which accessibility best practice should you keep in mind?Using scroll offsets can cause focused elements to be hidden behind fixed headers, confusing keyboard users. So ensure offsets keep focused elements visible.
Options A, B, and C are incorrect or harmful for accessibility.
[text-shadow:2px_2px_4px_rgba(0,0,0,0.5)] in Tailwind CSS?Arbitrary properties let you use any CSS property directly in your class names, so you don't have to add new utilities in Tailwind config or write separate CSS files.
Options B, C, and D describe unrelated or incorrect benefits.