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

RESOLVED INVALID

Status

()

Core
CSS Parsing and Computation
RESOLVED INVALID
10 years ago
5 years ago

People

(Reporter: Nickolay_Ponomarev, Unassigned)

Tracking

(Depends on: 1 bug)

Trunk
Points:
---

Firefox Tracking Flags

(Not tracked)

Details

(Reporter)

Description

10 years ago
+++ 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
Last Resolved: 5 years ago
Flags: needinfo?(bzbarsky)
Resolution: --- → INVALID
You need to log in before you can comment on or make changes to this bug.