Two declarations of what? As weedpacket said ID's need to be unique within the document.
I know this, and it's not a problem. I had to use multiple IDs in my example. There are two stylesheet declarations for one ID, that is what I was referring too.
Generally speaking if its not, the first one will be effected only.
This may be true about finding elements in the DOM, but you should be allowed to set up more than one style for a uniquely named element. The render should take into account CLASSNAME even if and ID is also specifiedl.
What I'm trying to say is:
If you see ID1 and it also has a classname of other-classname-1 then show yellow
If you see ID1 and it also has a classname of other-classname-2 then show it gray
There will be only one ID1 element, the stylesheet should know that there are two different way I might ask to show it.
ul li#ID1.other-classname-1 { yellow }
ul li#ID1.other-classname-2 { gray }
<ul><li ID="ID1" CLASSNAME="other-classname-2">I should be gray but im not</li></ul>
The solution I had to use, which is perfectly fine, was to throw in a fake tag used only for the styling. But this wasn't what I wanted to do nor should be forced to do. Notice the space as was mentioned before.
What I'm saying here is:
If you see ID1 and it's child has a classname of other-classname-1 then show yellow
If you see ID1 and it's child has a classname of other-classname-2 then show it gray
ul li#ID1 .other-classname-1 { yellow }
ul li#ID1 .other-classname-2 { gray }
<ul><li ID="ID1"><span CLASSNAME="other-classname-2">I am gray yay</span></li></ul>