Style Filtering is a useful technique for filtering or bypassing styles from other components are used inside the container component. As a result, we can effortlessly mix and match or isolate styles between components.
This component filter out (revert) <button>
style
import { Adapter } from '@devcapsule/adapter';
class FilterButton extends Adapter {
// Use ES2022 static block syntax
static { this.css = `
& button { all: revert }
& button:hover { all: revert };
`};
}
FilterButton.define('el-filter-button');
<button>Button</button> <a href="#">Link</a>
<el-filter-button>
This component filter out (revert) `<button>` style
<div class="width-100">
<button>Button</button>
<a href="#">Link</a>
</div>
</el-filter-button>