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

Key: IDEADEV-11966
Type: New Feature New Feature
Status: Resolved Resolved
Resolution: Fixed
Priority: Normal Normal
Assignee: Alexey Pegov
Reporter: Keith Lea
Votes: 2
Watchers: 2
Operations

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

Offer to create CSS class in "Extract embedded CSS" dialog

Created: 09 Sep 06 05:14   Updated: 08 Sep 08 18:17
Component/s: CSS Editing
Fix Version/s: Diana 8792

Original Estimate: Unknown Remaining Estimate: Unknown Time Spent: Unknown

Build: 5,622
Fixed in build: 8,784
Severity: Medium


 Description  « Hide
Currently the "extract embedded CSS" dialog lets me choose what selector to use based on which ones apply. It should also let me create a new CSS class. (Idea: just let me type the selector.)

 All   Comments   Work Log   Change History      Sort Order:
Stephen Friedrich - 01 Sep 08 17:05
Definitely.
Should work for id also. When the element already has an id "foo", then "#foo" should be in the list of suggested names in the dropdown.

Stephen Friedrich - 01 Sep 08 17:10
Oh, and if has no id, then entering "#foo" should automatically add id="foo" to the element, just like entering ".foo" should add class="foo".
It should also work for JSF component, for example the inlineStyle attribute of a Trinidad component (IDEA already treats the attribute contents as CSS anyway).

Alexey Pegov - 01 Sep 08 17:20
Stephen, it should already suggest an existing ID or CLASS if any in the recent Diana EAP build. Did it?

Stephen Friedrich - 01 Sep 08 23:51
Oh yeah, if I already have an id resp. a class then IDEA offers them.
However the typical scenario is that the tag has neither - after all if the original programmer (which could have been me in a hurry to meet a deadline) had taken care to add a style class, he would probably not have added inline styling.

Even if a style class is present, it might be a generic one, and I might want to add a second style class.

So please if I type an id selector like #foo, then add the id="foo" attribute and if I type a class selector like .foo, then add a style class.

Hm, the only open question is what to do if the tag already has id="foo", and I enter "#bar" when I try to extract the CSS.
Probably an inline error message in the dialog would be best.