Bug 12998 - dt:target + dd selector fails
Summary: dt:target + dd selector fails
Alias: None
Product: WebKit
Classification: Unclassified
Component: CSS (show other bugs)
Version: 523.x (Safari 3)
Hardware: PC All
: P2 Normal
Assignee: Nobody
Keywords: HasReduction
Depends on:
Blocks: 12520
  Show dependency treegraph
Reported: 2007-03-07 01:34 PST by Greg Harewood
Modified: 2008-03-20 11:12 PDT (History)
3 users (show)

See Also:

demo html for the bug (4.52 KB, application/octet-stream)
2008-02-11 05:40 PST, Greg Harewood
no flags Details
simple test case based on above demo (762 bytes, text/html)
2008-02-11 06:41 PST, Robert Blaut
no flags Details

Note You need to log in before you can comment on or make changes to this bug.
Description Greg Harewood 2007-03-07 01:34:23 PST
The dt:target selector on the page works correctly as tabs are selected, but the dt:target + dd selector fails to update dynamically, requring the page to be reloaded to see the data associated with the dt tab title.

This works fine in Firefox.
Comment 1 brian.suda 2007-12-26 06:01:24 PST
this is actually an issue with any element and the :target selector. I was testing with h1:target+* to apply a style to any element that is after an h1 that was targeted.

I am running Safari 3.0.4 on 10.5 and it is still an issue.
Comment 2 Robert Blaut 2008-02-10 03:14:07 PST
After checking your page I cannot confirm this bug.

Could you provide minimal test case exposing the issue -> http://webkit.org/quality/reduction.html
Comment 3 Greg Harewood 2008-02-11 05:40:43 PST
Created attachment 19064 [details]
demo html for the bug

Okay - I reported this a long time ago, so of course I went live with the page using different code.  Sorry about that.  Please find example code attached.

The concept is a tab set created purely in CSS from a Descriptive List.  Tab choices are made to stick by making them named anchors - targets.  This also makes them bookmarkable.

FF2 and FF3 render perfectly.
IE7 and Safari have problems with the "dt:target + dd" selector.
Safari alone has problems with the "dt:hover + dd" selector.

The critical sections of the stylesheet is...

dt:target + dd {
        visibility: visible !important;
        z-index: 100;

...which fails completely.
Comment 4 Robert Blaut 2008-02-11 05:53:58 PST
Thank you for update on this bug. I can confirm this bug. 

I found another even simpler test case showing the problem in Webkit: http://www.thinkvitamin.com/downloads/css3/fadeExample.html
Comment 5 Robert Blaut 2008-02-11 05:56:30 PST
Updated URL to the site with problem.
Comment 6 Robert Blaut 2008-02-11 06:41:34 PST
Created attachment 19065 [details]
simple test case based on above demo
Comment 7 Robert Blaut 2008-02-11 06:44:39 PST
There is something wrong with this example: http://www.thinkvitamin.com/downloads/css3/fadeExample.html 

It works strange in every browser I tested: Firefox, Opera and Safari. I removed the URL. The test I attached clearly shows the problem.
Comment 8 Robert Blaut 2008-02-11 11:45:09 PST
Similar bug 9279
Comment 9 Dave Hyatt 2008-03-20 11:12:24 PDT