Searching for the ~ character isn’t easy. I was looking over some CSS and found this
.check:checked ~ .content {
}
What does it mean?
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
The
~selector is in fact the subsequent-sibling combinator (previously called general sibling combinator until 2017):Consider the following example:
.a ~ .bmatches the 4th and 5th list item because they:.belements.a.ain HTML source order.Likewise,
.check:checked ~ .contentmatches all.contentelements that are siblings of.check:checkedand appear after it.