microsoft / vscode-edge-devtools

A VSCode extension that allows you to use browser devtools from within the editor. The devtools will connect to an instance of Microsoft Edge giving you the ability to alter CSS styling, perform diagnostics, and debugging. Get it now at http://aka.ms/devtools-for-code
https://docs.microsoft.com/microsoft-edge/visual-studio-code/microsoft-edge-devtools-extension
MIT License
756 stars 259 forks source link

Missing 'viewport' problem was not shown near <meta> element #1003

Open ngaitonde opened 2 years ago

ngaitonde commented 2 years ago

Is your feature request related to a problem? Please describe.

My html page had a <meta> element in <head>, but the problem for a missing 'viewport' wasn't shown inline. Instead, it was shown at the root <!DOCTYPE> element.

Describe the solution you'd like:

I'd like to see problem next to the <meta> element, similar to the '<html> element must have a lang attribute...' problem. See both attached images to compare the difference.

Describe alternatives you've considered:

Additional context:

WHIssue2 WHIssue1

codepo8 commented 2 years ago

Wouldn't the element make more sense? Meta needs to be a child of that one.

antross commented 2 years ago

Yeah, I think pointing this at the <head> element (if present) would make more sense, the <html> element otherwise, and finally falling back to the start of the document if no <head> / <html> element is present.