History | Log In     View a printable version of the current page.  
Issue Details (XML | Word | Printable)

Key: IDEADEV-11982
Type: New Feature New Feature
Status: Open Open
Priority: Normal Normal
Assignee: Alexey Pegov
Reporter: Marcus Brito
Votes: 0
Watchers: 0
Operations

If you were logged in you would be able to see more operations.
IDEA: Development

Consider CSS selectors used if they show up in string literals

Created: 22 Dec 05 19:51   Updated: 17 Nov 06 18:34
Component/s: CSS Editing
Fix Version/s: None

Original Estimate: Unknown Remaining Estimate: Unknown Time Spent: Unknown
File Attachments: None
Image Attachments:

1. idea-dynamic-selector.png
(4 kb)

2. idea-unused-selector.png
(7 kb)

Build: 4,081
Severity: Medium


 Description  « Hide
Check out the first attached screenshot (idea-unused-selector.png). IDEA marks the selector .config-item-shortcode-selecionado as unused, which is almost correct – this selector is never directly referenced in CSS or HTML code, but is dynamically added or removed using javascript, as show in idea-dynamic-selector.png.

While I can't expect IDEA to figure out which javascript functions actually manipulate CSS selectors, I would be quite happy if it considering a selector used if it shows up in any string literal. This sounds like a good compromise to me.



 All   Comments   Work Log   Change History      Sort Order:
Maxim Mossienko - 22 Dec 05 23:55
This will go away when js index will pickup attribute values project wide, stay tuned!

Marcus Brito - 22 Dec 05 23:59
You mean that I'll be able to type something like:
Element.addClassName(something, "|");

and press CTRL+SPACE at the |, and IDEA will offer some available CSS selectors (among other things, I imagine)? Woohoo, this one would be nice!


Maxim Mossienko - 23 Dec 05 00:09
Or html ids in js:getElementById("|") or in css: h1#|