Opened 13 years ago
Closed 12 years ago
#6059 closed defect (invalid)
dojox.fx.addClass will not override classes set in an object's ID style
Reported by: | guest | Owned by: | dante |
---|---|---|---|
Priority: | high | Milestone: | future |
Component: | Dojox | Version: | 1.1b1 |
Keywords: | Cc: | ||
Blocked By: | Blocking: |
Description (last modified by )
for instance with this:
#piggie {
position: relative; border: 1px solid black; left: 50px; width: 200px;
} .tst {
height: 200px; background: #fff;
} .testTargetClass {
width: 400px; height: 400px; background: #ff0000;
}
calling
dojox.fx.addClass({ node: 'piggie', cssClass: 'testTargetClass' }).play();
affects ONLY the height. Moving the initial width declaration to the .tst class block causes it to affect both.
if this is as intended, could we get an override argument?
Attachments (1)
Change History (6)
comment:1 Changed 13 years ago by
Milestone: | → 1.1 |
---|---|
Owner: | changed from anonymous to Bryan Forbes |
comment:2 Changed 13 years ago by
Milestone: | 1.1 → 1.2 |
---|
comment:3 Changed 13 years ago by
Component: | General → Dojox |
---|---|
Description: | modified (diff) |
Owner: | changed from Bryan Forbes to dante |
comment:4 Changed 13 years ago by
Milestone: | 1.2 → future |
---|
Changed 12 years ago by
test case showing ids to be more specific, and workaround
comment:5 Changed 12 years ago by
Resolution: | → invalid |
---|---|
Status: | new → closed |
If we had a 'cantfix' message, I would use that. The !important allows the rules to be applied to the ID's, but id selectors are more specific. the #id.class combination rules also work. CSS quirk, and this is a case we can't work around methinks (not without removing the id but that sounds really bad).
what does adding !important to the .testTargetClass rule do? It seems to me this is the natural behavior of CSS, as id's are more specific than class names (iirc)