DOM Inspector/Firebug overlay thoughts
I'm thinking of adding items to DOM Inspector's left side context menu (and hopefully the equivalent in Firebug) that would automatically provide selectors for the selected node. I need to know what you guys think about a few things:
1. What selectors should be provided? Definitely id, class, and element. Really specific attribute selectors (table[width="300"][cellpadding="2"])? Really specific positional selectors (html > body > div > table > tr > td:first-child + td)? Something else?
2. What should be done when a selector is picked?
a) Open the Stylish Add Style dialog with
If so, should -moz-doc rules be included? If so, which type? If there's already an Add Style dialog open, should it be added to that?
b) Just copy the selector to the clipboard
I'm leaning toward b because it'd be hard to guess what the user intends to do with the selector. And if it works well enough, this could be added to DOMI/Firebug itself.
1. What selectors should be provided? Definitely id, class, and element. Really specific attribute selectors (table[width="300"][cellpadding="2"])? Really specific positional selectors (html > body > div > table > tr > td:first-child + td)? Something else?
2. What should be done when a selector is picked?
a) Open the Stylish Add Style dialog with
(selector) {
}
If so, should -moz-doc rules be included? If so, which type? If there's already an Add Style dialog open, should it be added to that?
b) Just copy the selector to the clipboard
I'm leaning toward b because it'd be hard to guess what the user intends to do with the selector. And if it works well enough, this could be added to DOMI/Firebug itself.
Comments
i would also go with #2b. usually, there are multiple items on a page needing 'work' and the ideal way would be to select, add to Style, preview, select, add to Style etc. so the DOMi part would fill in an open Style editor. but i realize this kind of interprocess stuff is harder..
you guys should see if there isn't a way to leverage code.
I'm just listening to what DOMI says. Maybe what DOMI says should change.