| <!DOCTYPE html> |
| <style> |
| #target1 { display: initial; color: green; background: initial; } |
| |
| #parent { color: green; } |
| #target2 { display: inherit; color: inherit; background: inherit; } |
| |
| #target3 { display: initial; color: green; background: initial; } |
| |
| #target4 { display: initial; color: initial; background: initial; } |
| |
| #target5 { display: initial; color: green; background: initial; } |
| |
| #target6 { display: initial; color: initial; background: initial; } |
| |
| #target7 { display: initial; direction: rtl; } |
| |
| #target8 { display: initial; direction: rtl; } |
| |
| #parent9 { color: green; } |
| #target9 { display: initial; color: inherit; } |
| </style> |
| <div id='target1'>green color, no background-color</div> |
| |
| <div id='parent'> |
| <div id='target2'>green color, no background-color</div> |
| </div> |
| |
| <div id='target3'>green color</div> |
| |
| <div id='target4'>not red color, no background-color</div> |
| |
| <div id='target5'>green color, no background-color</div> |
| |
| <div id='target6'>not red color</div> |
| |
| <div id='target7'>direction is rtl</div> |
| |
| <div id='target8'>direction is rtl</div> |
| |
| <div id='parent9'> |
| <div id='target9'>green color</div> |
| </div> |