Bug 391447 - Unqualified Custom Variants broken
Summary: Unqualified Custom Variants broken
Status: RESOLVED INVALID
Alias: None
Product: RAP
Classification: RT
Component: RWT (show other bugs)
Version: 1.5   Edit
Hardware: PC Mac OS X
: P3 normal (vote)
Target Milestone: ---   Edit
Assignee: Project Inbox CLA
QA Contact:
URL:
Whiteboard:
Keywords: needinfo
Depends on:
Blocks:
 
Reported: 2012-10-09 10:18 EDT by Holger Staudacher CLA
Modified: 2012-10-18 09:00 EDT (History)
1 user (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Holger Staudacher CLA 2012-10-09 10:18:50 EDT
Steps to reproduce:

- Create a UI with a Button and a label
- Add a theme contribution with this css
.special { color: red; border; 1px black dotted; }
- Add the .special variant to both label and button

The color will be applied to both widgets but the border only to the label.
Comment 1 Ivan Furnadjiev CLA 2012-10-09 10:31:24 EDT
I can't reproduce it with Controls Demo and "Variants" tab. The "special-red" variant changes the border of the push button without problem. Could you please take a look in the Controls Demo (Variants tab) or provide a snippet (CSS) to reproduce the issue?
Comment 2 Holger Staudacher CLA 2012-10-09 13:51:19 EDT
Ivan, the snippet is: .special { color: red; border; 1px black dotted; }

without any Widget Type infront of the dot
Comment 3 Ivan Furnadjiev CLA 2012-10-09 14:25:02 EDT
(In reply to comment #2)
> Ivan, the snippet is: .special { color: red; border; 1px black dotted; }
> 
> without any Widget Type infront of the dot

I think that this behavior is expected. In case of Button the selector .special is equals to Button.special. But in the default theme there is a definition with more detail spec which is Button[PUSH] that overrides the border value. In order to apply the .special variant on the push button you need Button[PUSH].special selector. For me this bug is invalid.
Comment 4 Ralf Sternberg CLA 2012-10-18 09:00:56 EDT
I agree that this behavior is expected, even though it can be confusing, but that's CSS, not RAP.
Ideas for improvement are welcome.