Last modified: 2012-09-27 01:11:02 UTC

Wikimedia Bugzilla is closed!

Wikimedia migrated from Bugzilla to Phabricator. Bug reports are handled in Wikimedia Phabricator.
This static website is read-only and for historical purposes. It is not possible to log in and except for displaying bug reports and their history, links might be broken. See T27279, the corresponding Phabricator task for complete and up-to-date bug report information.
Bug 25279 - -webkit-input-placeholder css throws error in Firefox
-webkit-input-placeholder css throws error in Firefox
Status: RESOLVED WORKSFORME
Product: MediaWiki
Classification: Unclassified
Interface (Other open bugs)
unspecified
All All
: Normal minor (vote)
: ---
Assigned To: Adam Miller
: upstream
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2010-09-23 23:20 UTC by Ryan Kaldari
Modified: 2012-09-27 01:11 UTC (History)
5 users (show)

See Also:
Web browser: ---
Mobile Platform: ---
Assignee Huggle Beta Tester: ---


Attachments

Description Ryan Kaldari 2010-09-23 23:20:34 UTC
Reported by Barkingfish:

Some version of Firefox is throwing the following error when using Vector:

Error: Unknown pseudo-class or pseudo-element '-webkit-input-placeholder'.  Ruleset ignored due to bad selector.

Source File: http://bits.wikimedia.org/skins-1.5/vector/main-ltr.css?283t
Line: 368

Selector from that line: "input::-webkit-input-placeholder"
Comment 1 Bawolff (Brian Wolff) 2010-09-24 18:06:50 UTC
Do we care about css warnings? The browsers ignore invalid css in a very well defined way afaik, so I don't really see the issue as long as we don't assume all browsers will support the rule with the webkit propriety selector.
Comment 2 Platonides 2010-09-24 18:08:22 UTC
It's not a problem.
Comment 3 Derk-Jan Hartman 2010-09-24 20:41:24 UTC
isn't it just the double : that it is tripping over ? 

div#simpleSearch input::-webkit-input-placeholder {
Comment 4 Platonides 2010-09-24 22:15:20 UTC
Assigning to Adam, since he was r69482 committer.
Comment 5 Bawolff (Brian Wolff) 2010-09-24 23:26:11 UTC
(In reply to comment #3)
> isn't it just the double : that it is tripping over ? 
> 
> div#simpleSearch input::-webkit-input-placeholder {

Double :: is correct in this case I'm pretty sure. I believe double colon is for pseudo-elements (ex ::first-child), where single colon is for pseudo-selectors (ex :hover). (or maybe i have that reversed). Firefox will report a warning for any css it doesn't recognize. Most commonly you see IE hacks showing up there for things like zoom: 1.


As a side note, doesn't browser specific css go in its own file usually (IEfixes.css, etc).
Comment 6 Ryan Kaldari 2010-09-25 00:07:35 UTC
You can hide webkit-only CSS from other browsers using:

@media screen and (-webkit-min-device-pixel-ratio:0) {
/* Safari 3.0 and Chrome rules here */
}

or, as suggested above, put it in a separate css file.
Comment 7 Derk-Jan Hartman 2010-10-18 09:39:34 UTC
"The double colon replaced the single-colon selectors for pseudo-elements in CSS3 to make an explicit distinction between pseudo-classes and pseudo-elements. For backward compatibility, the single-colon syntax is acceptable for pre-CSS3 selectors. So, :after is a pseudo-class and ::after is a pseudo-element."
http://www.evotech.net/blog/2007/05/after-v-after-what-is-double-colon-notation/

It seems this is recognized by Firefox just fine.

The problem is the vendor specific notation of the pseudo element. I think that Firefox does not yet understand this concept.

http://www.w3.org/TR/2004/CR-CSS21-20040225/syndata.html
The CSS 2.1 spec says that "Keywords and property names, beginning with '-' or '_' are reserved for vendor-specific extensions." The problem is probably wether or not this was ever intended to also extend towards vendor specific pseudo elements. The later remark "Only properties, values, units, pseudo-classes, pseudo-elements, and at-rules may start with a hyphen (-); other identifiers (e.g. element names, classes, or IDs) may not." seems to indicate that such is at least allowed.

Thus this is a bug in Firefox, which should generate a warning here, not an error. And as a matter of fact in Firefox/3.6.10 it actually is a warning.

I see no reason to fix this, vendor specific css (as opposed to vendor-specific hacks) is just fine with me personally. If we have crashing browsers because of this, then we might have to reconsider, but I vote WONTFIX.
Comment 8 Bawolff (Brian Wolff) 2010-10-18 11:25:27 UTC
>Thus this is a bug in Firefox, which should generate a warning here, not an
>error. And as a matter of fact in Firefox/3.6.10 it actually is a warning.

As far as I am aware, all css errors on firefox are considered 'warnings'.

>I see no reason to fix this, vendor specific css (as opposed to vendor-specific
>hacks) is just fine with me personally. If we have crashing browsers because of
>this, then we might have to reconsider, but I vote WONTFIX.

+1
Comment 9 Derk-Jan Hartman 2010-10-18 11:28:06 UTC
(In reply to comment #8)
> >Thus this is a bug in Firefox, which should generate a warning here, not an
> >error. And as a matter of fact in Firefox/3.6.10 it actually is a warning.
> 
> As far as I am aware, all css errors on firefox are considered 'warnings'.

Apparently not in the original report: "Error: Unknown pseudo-class or pseudo-element "
Comment 10 Derk-Jan Hartman 2010-10-30 13:51:03 UTC
Closing as current versions of Firefox report this as a Warning.

Note You need to log in before you can comment on or make changes to this bug.


Navigation
Links