That surprised me, but sure enough this shows you're right:
<div style="color: black">a <div style="color: red">b <div style="color: green" />c </div>d </div>e
produces black a, red b, green c, red d, black e