Bug 119000 - Incorrect inheritance using [attribute=value] selector.
Summary: Incorrect inheritance using [attribute=value] selector.
Status: RESOLVED DUPLICATE of bug 139283
Alias: None
Product: WebKit
Classification: Unclassified
Component: CSS (show other bugs)
Version: 528+ (Nightly build)
Hardware: Mac Unspecified
: P4 Major
Assignee: Nobody
URL:
Keywords: InRadar
Depends on:
Blocks:
 
Reported: 2013-07-22 22:08 PDT by Michael
Modified: 2015-02-01 18:03 PST (History)
5 users (show)

See Also:


Attachments
Summary of bug including test HTML/CSS and result images. (95.97 KB, text/html)
2013-07-22 22:08 PDT, Michael
no flags Details

Note You need to log in before you can comment on or make changes to this bug.
Description Michael 2013-07-22 22:08:31 PDT
Created attachment 207303 [details]
Summary of bug including test HTML/CSS and result images.

Using [attribute=value] CSS selectors to customize specific elements which are referenced using custom attribute names (i.e. type=) results in inconsistent behavior for styling. 

I have attached example code as well as expected results for each example.

The bug does not seem to appear in version of 6.0.5 of Safari shipped with Mac OS X 10.8.3.
It does appear in the nightly build of WebKit r153022 (538+).

These are the only two platforms I have tested the bug on.
Comment 1 Deirdre Saoirse Moen 2013-08-05 21:22:51 PDT
<rdar://problem/14643850
Comment 2 Deirdre Saoirse Moen 2013-08-05 21:30:16 PDT
Sigh. <rdar://problem/14643850>
Comment 3 lakshmikanth k m 2013-10-06 23:23:51 PDT
is TYPE attribute supported in webkit code, because the attribute selectors are completely supported in webkit and since type is not the attribute of div tag it is not supported.
Comment 4 Michael 2013-10-07 03:54:53 PDT
The type= attribute is only an example and no it is not part of the standard div. I have several websites and WebKit based applications on Mac OS that rely on the behavior described of using custom named attributes for identifying specific segments of the content as opposed to using id= values or other such methods. The behavior described in the bug only started happening recently which means earlier versions of WebKit supported the behavior fine. While not impossible to rewrite my own code to work around it, considering it works fine for all other popular web browsers, I figured it should be a known bug.
Comment 5 Chris J. Shull 2014-02-06 17:59:04 PST
Hey Michael, as a workaround you may want to look into using data-* attributes. For example, using 'data-type' instead of 'type'. (This is the html5 way of doing custom attributes.)

When I switched to 'data-type' in the attached tests the problem no longer manifested.
Comment 6 Benjamin Poulain 2015-02-01 18:03:11 PST
Looks like this style sharing bug: https://bugs.webkit.org/show_bug.cgi?id=139283

Note that those names are reserved, you really shouldn't use that with HTML.

*** This bug has been marked as a duplicate of bug 139283 ***