Last modified: 2014-02-06 17:59:59 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 T62716, the corresponding Phabricator task for complete and up-to-date bug report information.
Bug 60716 - [Regression] Placeholder for search input is black instead of gray (again)
[Regression] Placeholder for search input is black instead of gray (again)
Status: RESOLVED FIXED
Product: MediaWiki
Classification: Unclassified
Interface (Other open bugs)
1.23.0
All All
: Unprioritized normal (vote)
: 1.23.0 release
Assigned To: Bartosz Dziewoński
: code-update-regression
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2014-02-01 10:41 UTC by Michael M.
Modified: 2014-02-06 17:59 UTC (History)
3 users (show)

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


Attachments

Description Michael M. 2014-02-01 10:41:30 UTC
Since https://git.wikimedia.org/commitdiff/mediawiki%2Fcore.git/132ed8f5e013f19f67b34edbf58c31bb3f959bbe, the CSS file contains the code:

  div#simpleSearch input:-ms-input-placeholder,
  div#simpleSearch input:-moz-placeholder,
  div#simpleSearch input::-webkit-input-placeholder {
    color: #999;
  }

This is wrong, you must use three separate rules, even if they all specify the same "color: #999;", as a browser should ignore a rule completely when it contains an unknown selector. I.e. the file search.less should write

&:-ms-input-placeholder {
color: #999;
}
&:-moz-placeholder {
color: #999;
}
&::-webkit-input-placeholder {
color: #999;
}

(and perhaps a comment to explain why three different rules for the same style are necessary, as this isn't obvious).
Comment 1 Bartosz Dziewoński 2014-02-01 12:12:53 UTC
Ehhh… sorry. On it.
Comment 2 Gerrit Notification Bot 2014-02-01 12:20:18 UTC
Change 110683 had a related patch set uploaded by Bartosz Dziewoński:
vector: Split placeholder rules in search.less (again)

https://gerrit.wikimedia.org/r/110683
Comment 3 Bartosz Dziewoński 2014-02-01 12:20:29 UTC
I actually don't see how this would ever cause the text to be black – the default placeholder color is a grey too (just a slightly different one) and I couldn't reproduce black color on any browser.
Comment 4 Gerrit Notification Bot 2014-02-01 18:50:36 UTC
Change 110683 merged by jenkins-bot:
vector: Split placeholder rules in search.less (again)

https://gerrit.wikimedia.org/r/110683
Comment 5 Jon 2014-02-01 19:25:09 UTC
It feels like there should be a better way to do this and avoid vendor prefixes... we should at least consider killing the moz and WebKit ones.

Which browser were you seeing this issue on?
Comment 6 Michael M. 2014-02-04 08:20:59 UTC
(In reply to comment #5)
> Which browser were you seeing this issue on?

I'm still forced to use FF10, but I can reproduce with IE10 also. The behavior probably depends on whether the placeholder is implemented as pseudo-element (Webkit, Firefox 19+) or as pseudo-class, which means that the style on the input itself can override the style of the placeholder. IMHO it's save to kill the &::-webkit-input-placeholder rule, but not the others.
Comment 7 Jon 2014-02-05 19:56:46 UTC
Ergg.. legacy browsers. I should have known. We should definitely consider moving around these or at the very least document these parameters.
Comment 8 Michael M. 2014-02-06 09:15:33 UTC
(In reply to comment #7)
> Ergg.. legacy browsers. I should have known. We should definitely consider
> moving around these or at the very least document these parameters.

Well, according to http://netrenderer.de/index.php this also happens in IE11, so it's not only legacy browsers.
Comment 9 Jon 2014-02-06 16:03:50 UTC
I guess IE figured that placeholder text should be the same colour as the input. Both Firefox and Chrome seem to have Gray as the default which to me makes more sense. I wrote a commit to add comments so it's clear to developers why they exist.
Comment 10 Jon 2014-02-06 17:59:59 UTC
For reference those comments are added in: https://gerrit.wikimedia.org/r/#/c/111516/

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


Navigation
Links