Closed
Bug 294783
Opened 20 years ago
Closed 20 years ago
css combinator doesn't work with two fully specified dom paths.
Categories
(Core :: CSS Parsing and Computation, defect)
Tracking
()
RESOLVED
INVALID
People
(Reporter: janklopper, Assigned: dbaron)
Details
User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.7.8) Gecko/20050511 Firefox/1.0.4
Build Identifier: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.7.8) Gecko/20050511 Firefox/1.0.4
The css combinator + gives you the option to style an element if it is preceded
(in the same parent element) by an other defined element.
img + p{
font-weight:bold;
}
makes any text in paragraphs preceded by an img element bold.
This works.
If you however make a construction like this:
body header img + body header p{
font-weight:bold;
}
It stops working.
body header img + p{
font-weight:bold;
}
Works as excpected, and since the p and img should be in the same parent element
to make it work it is redundant to also supply the dom path for the p, but it
should still work right? (im working on smoe software who automaticall generates
these paths and css rules, and now its not working, while i think it should)
Reproducible: Always
Steps to Reproduce:
1.create above test files and see what does and doesn't happen
2.??
3.profit!!
Actual Results:
Styels did not get applied.
Expected Results:
selected the element, and applied the styles
Updated•20 years ago
|
Assignee: nobody → dbaron
Component: General → Style System (CSS)
Product: Firefox → Core
QA Contact: general → ian
Version: unspecified → 1.7 Branch
| Assignee | ||
Comment 1•20 years ago
|
||
CSS combinators (" ", >, +, ~) all have the same operator precedence. The
selector you wrote "body header img + body header p" would match an element such as:
<body>
<header>
<img />
<body>
<header>
<p>This one</p>
...
There's no body element that's a later sibling of an img element.Status: UNCONFIRMED → RESOLVED
Closed: 20 years ago
Resolution: --- → INVALID
You need to log in
before you can comment on or make changes to this bug.
Description
•