Nesting CSS in iOS less than iOS 17 is a little bit buggy

Most CSS nesting works, but some does not.

I've just been debugging two very tricky issues in iOS 16. Basically, nesting in iOS =< 17 is a little bit patchy. Lots of it works, such as

.thing {
  background: red;
  &:hover {
    background: green;
  }
}

But nesting elements does not, such as

.thing {
  background: red;
  svg path {
    fill: green;
  }
}

Caveat emptor!

Filed Under:

  1. CSS