<html>
<head>
<link href="m.css" rel="stylesheet" type="text/css"></link>
</head>
<body>
<div title="a" class="bc">
1. This matches ([title="a"].bc).
<i> 2. This matches (.bc i).</i>
<i class="bc"> 3. This matches ([title="a"] .bc).</i>
</div>
<div> <p class="s1">
4. This should not match (div * .s1).
<b class="s1"> 5. This matches (div * .s1).</b> </p></div>
<div> <p class="s2">
6. This matches (div p.s2).
</p></div>
</body>
</html>
In the first div, open-on resolves both 'bc' to ([title="a"] .bc), that is incorrect. It does not see the difference between ([title="a"] .bc) and ([title="a"].bc). But these two rules are quite different, first defines class 'bc' for a node that has an ancestor with title="a", while the second defines class 'bc' for a node with title="a".
In the second div, open-on resolves both cases of 's1' to (div * .s1); but only the last case is correct.
In css rules, white spaces always separate parent node restrictions from child node restrictions.
css:
.bb { background-color: red; } [title="a"].bc { background-color: aqua; } [title="a"] .bc { background-color: green; } .bc i { background-color: blue; } div * .s1 { background-color: yellow; } div p.s2 { background-color: brown; }<html> <head> <link href="m.css" rel="stylesheet" type="text/css"></link> </head> <body> <div title="a" class="bc"> 1. This matches ([title="a"].bc). <i> 2. This matches (.bc i).</i> <i class="bc"> 3. This matches ([title="a"] .bc).</i> </div> <div> <p class="s1"> 4. This should not match (div * .s1). <b class="s1"> 5. This matches (div * .s1).</b> </p></div> <div> <p class="s2"> 6. This matches (div p.s2). </p></div> </body> </html>In the first div, open-on resolves both 'bc' to ([title="a"] .bc), that is incorrect. It does not see the difference between ([title="a"] .bc) and ([title="a"].bc). But these two rules are quite different, first defines class 'bc' for a node that has an ancestor with title="a", while the second defines class 'bc' for a node with title="a".
In the second div, open-on resolves both cases of 's1' to (div * .s1); but only the last case is correct.
In css rules, white spaces always separate parent node restrictions from child node restrictions.