Last active
March 5, 2021 09:08
-
-
Save captainbrosset/9642768d3a23c3c21c490cefc1f3db41 to your computer and use it in GitHub Desktop.
Code snippets for the "How we built the DevTools Tooltips" article
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
// The ID of the area we're highlighting | |
"elements-panel": { | |
// Some information for the displayed content | |
"tooltip": { | |
"title": "...", | |
"description": "...", | |
}, | |
// The list of DOM elements to wrap | |
"selectors": [ | |
{ | |
// Each element comes with a CSS selector so we can | |
// find it in the document. | |
"selector": '[aria-label="Elements"]', | |
// And optionally an offset to avoid gaps between elements. | |
"offsets": [{direction: Direction.Bottom, size: 2}] | |
}, | |
{ | |
"selector": '#elements-content' | |
}, | |
{ | |
"selector": '#elements-crumbs' | |
}, | |
], | |
}, | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment