| <!doctype html> |
| <html> |
| <head> |
| <style> |
| /* Pack them to fit everything in 800*600 */ |
| div > * { |
| padding: 5px; |
| width: 100px; |
| float: left; |
| } |
| :matches([readonly] > *) { |
| background-color: red; |
| } |
| :matches([readonly=foobar] > *) { |
| background-color: blue; |
| } |
| </style> |
| </head> |
| <body> |
| <p>Verify style sharing does not ignore the "readonly" attribute.</p> |
| <div> |
| <div> |
| Padding |
| <span>No readonly<span> |
| <span>No readonly<span> |
| <span>No readonly<span> |
| Padding |
| </div> |
| <div readonly> |
| Padding |
| <span>Readonly defined<span> |
| <span>Readonly defined<span> |
| <span>Readonly defined<span> |
| Padding |
| </div> |
| <div readonly=""> |
| Padding |
| <span>Readonly defined empty<span> |
| <span>Readonly defined empty<span> |
| <span>Readonly defined empty<span> |
| Padding |
| </div> |
| <div readonly="foobar"> |
| Padding |
| <span>Readonly is foobar<span> |
| <span>Readonly is foobar<span> |
| <span>Readonly is foobar<span> |
| Padding |
| </div> |
| </div> |
| <div> |
| <span> |
| Padding |
| <span>No readonly<span> |
| <span>No readonly<span> |
| <span>No readonly<span> |
| Padding |
| </span> |
| <span readonly> |
| Padding |
| <span>Readonly defined<span> |
| <span>Readonly defined<span> |
| <span>Readonly defined<span> |
| Padding |
| </span> |
| <span readonly=""> |
| Padding |
| <span>Readonly defined empty<span> |
| <span>Readonly defined empty<span> |
| <span>Readonly defined empty<span> |
| Padding |
| </span> |
| <span readonly="foobar"> |
| Padding |
| <span>Readonly is foobar<span> |
| <span>Readonly is foobar<span> |
| <span>Readonly is foobar<span> |
| Padding |
| </span> |
| </div> |
| <div> |
| <input value="No readonly"> |
| <input readonly value="Readonly defined"> |
| <input readonly="" value="Readonly defined empty"> |
| <input readonly="foobar" value="Readonly is foobar"> |
| </div> |
| </body> |
| </html> |