79799011

Date: 2025-10-24 17:08:37
Score: 0.5
Natty:
Report link

Similar to using :empty you can also check if the element has no children. It comes in handy if the element has extra whitespace, but no content which causes :empty evaluate as false:

.container:not(:has(.grid-element--3 > *)) {
  margin-top: -20px;
}
Reasons:
  • Low length (0.5):
  • Has code block (-0.5):
  • Low reputation (0.5):
Posted by: Gabrien