pixiebrix-extension icon indicating copy to clipboard operation
pixiebrix-extension copied to clipboard

Add brick to get computed style of element

Open twschiller opened this issue 3 years ago • 0 comments

Context:

  • As a user I need to determine if an element matches a certain style, but the CSS class is randomly generated (via CSS module)
  • Browsers have a method to get the style attributes of an element: https://developer.mozilla.org/en-US/docs/Web/API/Window/getComputedStyle

Implementation Sketch:

  • Add a Get Element Style brick
  • Brick should be root aware
  • Take an optional selector for an element

twschiller avatar May 03 '22 22:05 twschiller