Closed Bug 477423 Opened 15 years ago Closed 11 years ago

CSS:Adjacent sibling selectors don't match into anonymous content (explicit ~ anonymous)

Categories

(Core :: CSS Parsing and Computation, defect)

defect
Not set
normal

Tracking

()

RESOLVED INVALID

People

(Reporter: asqueella, Unassigned)

References

(Depends on 1 open bug)

Details

+++ This bug was initially created as a clone of Bug #436170, since the original bug was morphed to be about the issue that adjacent selectors don't work with XBL nodes at all +++

User-Agent:       Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.9) Gecko/2008051206 Firefox/3.0
Build Identifier: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.9) Gecko/2008051206 Firefox/3.0

According to the Dom Inspector, the urlbar contains 3 elements: identity-box, a textbox-input-box and the urlbar-icons.  I decided to implement an Internet Explorer type coloring system using the userChrome.css file using the following rules:

#identity-box.verifiedDomain ~ * {
  background-color: #F5F6BE !important;
  color: #000000 !important;
}

#identity-box.verifiedIdentity ~ * {
  background-color: lightgreen !important;
  color: #000000 !important;
}


This resulted in the urlbar-icons element changing color, but not the textbox-input-box element.  The textbox-input-box element is added via XML binding.  So even though it is considered a sibling in the DOM, the CSS style is not applied.

Reproducible: Always

Steps to Reproduce:
Add the following to userChrome.css and restart Firefox.

#identity-box + hbox {
  background-color: #F5F6BE !important;
  color: #000000 !important;
}
Actual Results:  
urlbar-icons in urlbar turns yellow

Expected Results:  
textbox-input-box in urlbar should turn yellow
This seems invalid to me, since the nodes aren't actually siblings in the dom, right?
Selectors definitely apply to the tree of elements, not of CSS boxes. But I have no idea if XUL is special in that regard, or how the URL bar is implemented at all.

Should I close as invalid?
Flags: needinfo?(bzbarsky)
Yes.
Status: NEW → RESOLVED
Closed: 11 years ago
Flags: needinfo?(bzbarsky)
Resolution: --- → INVALID
You need to log in before you can comment on or make changes to this bug.