0
0
Tailwindmarkup~5 mins

Arbitrary properties for unsupported CSS in Tailwind - Cheat Sheet & Quick Revision

Choose your learning style9 modes available
Recall & Review
beginner
What are arbitrary properties in Tailwind CSS?
Arbitrary properties let you write any CSS style directly inside Tailwind classes using square brackets, even if Tailwind doesn't support that style by default.
Click to reveal answer
beginner
How do you write an arbitrary property for backdrop-filter: blur(5px); in Tailwind?
Use <code>[backdrop-filter:blur(5px)]</code> as a class to apply <code>backdrop-filter: blur(5px);</code>.
Click to reveal answer
intermediate
Why use arbitrary properties instead of custom CSS files?
They keep all styles in one place, make quick changes easy, and keep your code consistent with Tailwind's utility-first approach.
Click to reveal answer
intermediate
What syntax must you use to include spaces or special characters inside arbitrary properties in Tailwind?
You put the entire CSS value inside square brackets, and if it has spaces or special characters, you keep them as is, for example: bg-[url('image.png')].
Click to reveal answer
intermediate
Can you use arbitrary properties with responsive prefixes in Tailwind?
Yes! For example, md:[--my-var:10px] applies the custom property only on medium screens and up.
Click to reveal answer
How do you write an arbitrary CSS property for border-radius: 12px; in Tailwind?
Abr-[12px]
Bborder-radius-[12px]
Crounded-[12px]
Dradius-[12px]
Which of these is a valid arbitrary property class in Tailwind?
Atext-[color=blue]
Btext-[color:blue]
Ctext-[blue]
Dtext-[color blue]
Can you use arbitrary properties for CSS variables in Tailwind?
AYes, for example <code>[--my-var:10px]</code>.
BNo, Tailwind does not support CSS variables.
COnly with plugins.
DOnly in custom CSS files.
What happens if you write an invalid arbitrary property in Tailwind?
ATailwind ignores it and no style is applied.
BIt breaks the whole CSS build.
CIt applies a default style.
DIt throws a browser error.
How do you apply an arbitrary property only on large screens in Tailwind?
Aproperty:lg-[value]
B[lg:property:value]
Cproperty:[lg:value]
Dlg:[property:value]
Explain how arbitrary properties work in Tailwind CSS and why they are useful.
Think about how you can add CSS that Tailwind doesn't have built-in.
You got /3 concepts.
    Describe how to write an arbitrary property with spaces or special characters in Tailwind CSS.
    Remember the syntax uses brackets to hold the entire CSS value.
    You got /3 concepts.