- From: Daniel Glazman <daniel.glazman@disruptive-innovations.com>
- Date: Wed, 15 Jul 2015 21:01:46 +0200
- To: www-style@w3.org
On 15/07/2015 20:47, Tab Atkins Jr. wrote:
> (But seriously, what are people misinterpreting this as? Do they think
> :first-child shouldn't match an element without a parent? Switching
> away from the "parent/child" language was *explicitly* meant to avoid
> that sort of misinterpretation!)
Have you tried the following:
<html>
<head>
<style>
html { color: red }
html:first-child{ color:green }
</style>
</head>
<body>
<p>foo</p>
</body>
</html>
The paragraph is red in Firefox and Chrome. :first-child does NOT match
the root element because it has no parent...
</Daniel>
Received on Wednesday, 15 July 2015 19:02:10 UTC