Skip to content

Latest commit

 

History

History
58 lines (52 loc) · 1.44 KB

zebra-stripes.md

File metadata and controls

58 lines (52 loc) · 1.44 KB

Zebra-striped effect

?> Background::point_right: linear-gradient

<script v-pre type="text/x-template" id="zebra-stripes"> <style> main { width: 100%; } pre { width: 100%; display: inline-flex; background: #f8f8f8; background-image: linear-gradient(rgba(18,18,18,.05) 50%, transparent 0); background-size: auto 48px; background-origin: content-box; font: 14px/24px Consolas, Monaco, monospace; } main pre > code { display: inline-block; padding: 0; color: #34495e; background-color: transparent; font: inherit; } </style>
      
        const pull = (arr, ...args) => {
          let argState = Array.isArray(args[0]) ? args[0] : args;
          let pulled = arr.filter((v, i) => !argState.includes(v));
          arr.length = 0;
          pulled.forEach(v => arr.push(v));
        };
        let myArray = ['a', 'b', 'c', 'a', 'b', 'c'];
        pull(myArray, 'a', 'c');
        console.log(myArray);
      
    
<script> </script> </script>

Browser Support

<iframe width="100%" height="436px" frameborder="0" src="https://caniuse.bitsofco.de/embed/index.html?feat=css-gradients&periods=future_1,current,past_1,past_2,past_3&accessible-colours=false"> </iframe>