DEV Community

Discussion on: Which CSS concepts do you find confusing?

Collapse
 
bernardbaker profile image
Bernard Baker

~ confused me. As a selector it selects elements preceded by another. E.g. select all the p tags div ~ p.

<div>
  <p>Foo</p>
  <p>Bar</p>
</div>
Collapse
 
scrabill profile image
Shannon Crabill

Yup, the ~ is one I have to Google how to use too. Selectors are powerful, but not always intuitive.

Collapse
 
bernardbaker profile image
Bernard Baker

Wouldn't it be great if it allowed regular expressions.

Collapse
 
meg_gutshall profile image
Meg Gutshall
Collapse
 
bernardbaker profile image
Bernard Baker

That's handy.