Skip to content

Instantly share code, notes, and snippets.

What would you like to do?
Get and mark elements on a page regarding their color or any other style.
// Paste that in your Browser console
let allBodyElements = document.querySelectorAll('body *'),
thePropertyName = 'color',
theExpectedValue = 'rgb(0, 82, 204)';
let style = window.getComputedStyle(el);
if ( style.getPropertyValue(thePropertyName) == theExpectedValue ) {
console.log(el); = '0 0 0 2px red';
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.