HTML & CSS · Middle · Question 44 of 75

What are group and peer for in Tailwind?

Explanation

Put group on the parent and write group-hover:text-white on a descendant - the style applies when the parent is hovered. peer works for following siblings: <input class="peer"> + <p class="peer-invalid:visible">. Combining classes into one is @apply.

Further reading

Problem with a question

HTML & CSS · Middle · question 44

Test yourself

Take the HTML & CSS · Middle quiz: questions and options are shuffled, and you get a review of your mistakes at the end.

Take this quiz