Working demo of CssChain

git GitHub | test coverage | Working with slots | PokéAPI Explorer | light DOM templates & slots

In order to use SccChain within web component, declare the $ method in class:

  $( ...arr ){ return $( this.shadowRoot ).$(...arr); } 

Then this.$(css) is available for accessing the DOM like in sample.

Demo of css-chain use in web component


    <script type="module" src="css-chain-element.js"></script>

    <css-chain> 🍦 </css-chain>
    <css-chain> 🌼 </css-chain>
🍦 🌼

css-chain element sources