// grab a DOM element
const buttonEl = document.querySelector("button");
// we can retrieve all computed styles with `computedStyleMap`
const allComputedStyles = buttonEl.computedStyleMap();
// entries returns an iterable of the items
const iterableStyles = allComputedStyles.entries();
// returns a two item array with align-content as the first item and CSSStyleValue as the second
console.log(iterableStyles.next().value);StylePropertyMapReadOnly: entries() method / notebook
StylePropertyMapReadOnly: entries() method
Runnable notebook: every JavaScript, HTML and CSS example on this page executes in a sandboxed local frame. Nothing leaves the browser.