Use case: isolation of propagation of class modifiers in nested components of the same class
Proposal explained in the example below
<style>
.xtable .xtable-item .xtable-cell { /* rule-a */
font-size: 12px;
}
/* example of proposed pseudo class to break propagation
for css rule after we meet child element that match selector inside :break() */
.xtable.modifier:break(.xtable) .xtable-item .xtable-cell { /* rule-b */
border: 1px solid red;
}
</style>
<div class=”xtable modifier”>
<div class=”some-unnecessary-wrapper”>
<!--
use case is to add any amount of wrappers in-between
so we can't use child combinator (>) like .xtable.modifier > .xtable-item > .xtable-cell
-->
<div class=”xtable-item”>
<div class=”xtable-cell”><!-- applied rules: rule-a, rule-b -->
123
</div>
<div class=”xtable-cell”> <!-- applied rules: rule-a, rule-b -->
<div class=”xtable”> <!-- breaks propagation for rule-b -->
<div class=”xtable-item”>
<div class=”xtable-cell”> <!-- applied rules: rule-a -->
abc
</div>
</div>
</div>
</div>
<div class=”xtable-cell”> <!-- applied rules: rule-a, rule-b -->
<div class=”xtable modifier”> <!-- breaks propagation for rule-b;
rule-b starts applying again from here-->
<div class=”xtable-item”>
<div class=”xtable-cell”> <!-- applied rules: rule-a, rule-b -->
abc
</div>
</div>
</div>
</div>
</div>
</div>
</div>