<!doctype html>

<style>
    .readonly { background-color: #ccf; }
    .readwrite { background-color: #fcc; }
</style>

<div class="readonly">Read-only</div>
<div class="readonly">Read-only <span class="readonly">Read-only</span></div>
<div class="readonly">Read-only <span class="readwrite">Read-write</span></div>
<div class="readwrite">Read-write <span>Read-write</span></div>
<div class="readwrite">Read-write <span class="readonly">Read-only</span></div>
<div class="readwrite">Read-write <span class="readonly">Read-only <span>Read-only</span</span></div>

<div <span class="readonly">Read-only <span class="readwrite">Read-write</span></div>
<div <span class="readonly">Read-only <span class="readwrite">Read-write <span>Read-write</span></span></div>
<div class="readwrite">Read-write <span class="readonly">Read-only <span>Read-only</span></span></div>
