3 ms·
Would love to see inline examples of the output, or a bookmarklet that gives you the generated output of e.g. an element you choose on an arbitrary site. Also,
by vitovito 15y ago
Would love to see inline examples of the output, or a bookmarklet that gives you the generated output of e.g. an element you choose on an arbitrary site.
Also, you don't need to copy every child element's style. You only need to copy the styles that are different from the parent element and/or different from your current stylesheet.
For each element, I believe you can create an empty one in the place you'll be putting the final output to see what its computed styles are, and then use that to compare to the one you're reading from.
- nathancahill 15y agoYou're right, I wouldn't need to copy styles that are the same as the elements parent. It adds an extra check though.. I'm trying to reduce the amount of things the lowest level handler has to do. Another check would expand the overhead exponentially.