title: How do I get the perceived styling of a text node?
body: <p><a href="https://developer.mozilla.org/en-US/docs/Web/API/Window/getComputedStyle" rel="noreferrer">window.getComputedStyle()</a> method accepts only element nodes. <strong>Is there any way to reliably get the style that determines the visual representation of a text node?</strong></p>
  
  <p>I realize that nodes can't have <code>style</code> attributes, but they certainly are styled, since they inherit the parent element's styles. Is there, perhaps, a way to <strong>get all computed styles from the parent element that are relevant to the text node's visual representation?</strong></p>
  
  <hr>
  
  <p>Note that wrapping the node in a <code>span</code> is out of the question: this would affect CSS rules such as <code>span:nth-child</code> or <code>span + span</code>, etc.</p>