#tinyCSStip One thing that has always annoyed me about `:empty` is that it doesn't work for elements that have text content, but no element children.

`:has()` fixes this problem.

`:not(:has(*))` selects elements that don't have element children, even if they have text content.

#CSS #code #coding #frontend #webDev #webDevelopment

Reply to this note

Please Login to reply.

Discussion

No replies yet.