Hi! If you see an error or something is missing (like :focus-within for few years :P) please let me know ❤️
Element -- selects all h2 elements on the page
h2 {| function testCSSVariables() { | |
| var color = 'rgb(255, 198, 0)'; | |
| var el = document.createElement('span'); | |
| el.style.setProperty('--color', color); | |
| el.style.setProperty('background', 'var(--color)'); | |
| document.body.appendChild(el); | |
| var styles = getComputedStyle(el); | |
| var doesSupport = styles.backgroundColor === color; |
| /* bling.js */ | |
| window.$ = document.querySelector.bind(document); | |
| window.$$ = document.querySelectorAll.bind(document); | |
| Node.prototype.on = window.on = function(name, fn) { this.addEventListener(name, fn); }; | |
| NodeList.prototype.__proto__ = Array.prototype; | |
| NodeList.prototype.on = function(name, fn) { this.forEach((elem) => elem.on(name, fn)); }; |