show all css properties

lists all css properties supported by browser

by Richard Hunter

HTML

<ul id="foo"></ul>

CSS

ul {
  counter-reset: bar;
  list-style: none;
}
li {

}
ul li:before {
  content: counter(bar)". ";
  counter-increment: bar;
  
}
.selected {
  background: yellow;
  }
}

JavaScript

function attachItem(el, text) {
	const item = document.createElement('li');
  item.textContent = text;
	el.appendChild(item);
  
  item.addEventListener('click', () => {
    item.classList.toggle('selected');
  });
}

Object.keys(document.body.style).forEach(attachItem.bind(null, foo))