<html>
<head>
<base href="https://bugs.webkit.org/" />
</head>
<body>
<p>
<div>
<b><a class="bz_bug_link
bz_status_NEW "
title="NEW - Web Inspector: In the styles sidebar, Option-clicking on --css-variable should jump to its definition"
href="https://bugs.webkit.org/show_bug.cgi?id=154082#c2">Comment # 2</a>
on <a class="bz_bug_link
bz_status_NEW "
title="NEW - Web Inspector: In the styles sidebar, Option-clicking on --css-variable should jump to its definition"
href="https://bugs.webkit.org/show_bug.cgi?id=154082">bug 154082</a>
from <span class="vcard"><a class="email" href="mailto:dcrousso+webkit@gmail.com" title="Devin Rousso <dcrousso+webkit@gmail.com>"> <span class="fn">Devin Rousso</span></a>
</span></b>
<pre>Created <span class=""><a href="attachment.cgi?id=271274&action=diff" name="attach_271274" title="[WIP] Patch">attachment 271274</a> <a href="attachment.cgi?id=271274&action=edit" title="[WIP] Patch">[details]</a></span>
[WIP] Patch
So I was playing around with this for a bit, and I ran into something of a roadblock. It looks like CSSStyleDeclarations are only created for each instance of DOMNodeStyles, which means that CSS variables declared on a different tag won't have a style associated with them until the node is selected on which they are applied (look at UserInterface/Views/Variables.css for an example). I only spent a little time on this, so I may be missing an extremely obvious case for how to work around this, but what I have written so far works if the node which matches the rule containing the CSS variable is selected (thus creating the DOMNodeStyles) before trying to Option-click a CSS variable. If anyone else wants to take over, feel free as I am not sure how much time I have in the next few weeks (horray midterms >.> )</pre>
</div>
</p>
<hr>
<span>You are receiving this mail because:</span>
<ul>
<li>You are the assignee for the bug.</li>
</ul>
</body>
</html>