Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

report(font-size): linkify selectors in devtools #6436

Closed
connorjclark opened this issue Oct 31, 2018 · 3 comments · Fixed by #9354
Closed

report(font-size): linkify selectors in devtools #6436

connorjclark opened this issue Oct 31, 2018 · 3 comments · Fixed by #9354

Comments

@connorjclark
Copy link
Collaborator

connorjclark commented Oct 31, 2018

Set lh-node attribute for each node shown in the font-size report. See a11y.

@connorjclark
Copy link
Collaborator Author

This actually isn't useful :)

@connorjclark
Copy link
Collaborator Author

connorjclark commented Jun 29, 2019

This actually isn't useful :)

That's because I wasn't attempting to link to the range specific to the CSS rule we are highlighting. That would be very useful!

The CSSStyle.range property has startLine/startColumn relative to the start of the stylesheet (0 for network stylesheets, but relative to <style> location for inline).

For inline styles, @paulirish and I just confirmed that we can use LH.Crdp.CSS.CSSStyleSheetHeader.{startLine,startColumn} to link to the sources panel for the HTML at the position where the style rule begins. Usually that'd show you some ugly looking code until you hit Prettify. But luckily there's some movement towards shipping the experimental DT feature "always prettify".

So the idea would be to create something similar to lh-node, but have it contain the URL / line / col (UILocation) to open in the sources panel. lh-ui-location? Then, linkify it in the Audits panel.

@connorjclark connorjclark reopened this Jun 29, 2019
@connorjclark connorjclark changed the title report(font-size): link selectors to DevTools element report(font-size): linkify selectors in devtools Jun 29, 2019
@connorjclark
Copy link
Collaborator Author

although, the location of a style element in the HTML will very likely change across every page load, so we'll see a lot of the same issues from node revealing (#2289)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants