Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

Intent to unship: -moz-placeholder pseudo-element and pseudo-class

82 views
Skip to first unread message

Ku(顧思捷)CJ

unread,
May 23, 2017, 10:13:41 PM5/23/17
to dev-pl...@lists.mozilla.org
I intend to remove "-moz-placeholder" pseudo-element and pseudo-class in
bug 1300896.

We already supported canonical version of them:
1. "::placeholder" in bug 1069012, FF 51.
2. ":placeholder-shown" in bug 1069015, FF 51.

To support these mozilla-specific aliases introduces special-case handling
in both stylo and gecko, which bring in unnecessary complexity.

Gijs Kruitbosch

unread,
May 24, 2017, 6:22:28 AM5/24/17
to Ku(顧思捷)CJ
On 24/05/2017 03:13, Ku(顧思捷)CJ wrote:
> I intend to remove "-moz-placeholder" pseudo-element and pseudo-class in
> bug 1300896.

Which will ship in which release? 55 or 56? Esp. asking given the
upcoming feature freeze for 55.

~ Gijs

Mike Taylor

unread,
May 24, 2017, 1:07:04 PM5/24/17
to Ku(顧思捷)CJ, dev-pl...@lists.mozilla.org
Hi CJ,

On 5/23/17 10:13 PM, Ku(顧思捷)CJ wrote:
> I intend to remove "-moz-placeholder" pseudo-element and pseudo-class in
> bug 1300896.
>
> We already supported canonical version of them:
> 1. "::placeholder" in bug 1069012, FF 51.
> 2. ":placeholder-shown" in bug 1069015, FF 51.
>
> To support these mozilla-specific aliases introduces special-case handling
> in both stylo and gecko, which bring in unnecessary complexity.

It's pretty easy to find code on GitHub where only moz/webkit/ms
prefixes are used[1]. How complex is the special-case handling, beyond a
simple prefixed <-> unprefixed alias?

[1]
<https://github.com/tochman/website/blob/520b212a96d221d035c9bf3efa9b5b766b035e43/app/assets/stylesheets/theme.css#L136-L141>


--
Mike Taylor
Web Compat, Mozilla

Boris Zbarsky

unread,
May 24, 2017, 1:50:31 PM5/24/17
to
On 5/24/17 1:06 PM, Mike Taylor wrote:
> [1]
> <https://github.com/tochman/website/blob/520b212a96d221d035c9bf3efa9b5b766b035e43/app/assets/stylesheets/theme.css#L136-L141>

Sadly, that code is already buggy in Firefox: it uses
":moz-placeholder", which doesn't parse. The thing that parses is
":-moz-placeholder".

-Boris

Mike Taylor

unread,
May 24, 2017, 4:10:21 PM5/24/17
to Boris Zbarsky, dev-pl...@lists.mozilla.org
Yeah, good point Boris -- I overlooked that.

But it's not hard to find more results on GitHub that aren't parse
errors:
<https://github.com/search?l=CSS&p=13&q=moz+placeholder&type=Code&utf8=%E2%9C%93>


For example,
https://github.com/yields/rework-pseudos/blob/c4d2a48fe82a3a387f2f78744b25e765acbd06f3/test/fixtures/pseudos.out.css#L38-L60

Looking at some of these results, it makes me wonder if adding a webkit
prefix alias would improve things more than removing a moz prefix.

Ku(顧思捷)CJ

unread,
May 25, 2017, 5:48:25 AM5/25/17
to Mike Taylor, Boris Zbarsky, dev-pl...@lists.mozilla.org
ok, I see your point. I also saw some usage of moz-placeholder in add-on
repository as well, and Boris pointed out it might too early to remove it,
so I should pending this task.

Mike, do we get any complaint about not supporting webkit placeholder
alias?

On Thu, May 25, 2017 at 4:10 AM, Mike Taylor <mi...@mozilla.com> wrote:

> On 5/24/17 1:50 PM, Boris Zbarsky wrote:
> Yeah, good point Boris -- I overlooked that.
>
> But it's not hard to find more results on GitHub that aren't parse
> errors:
> <https://github.com/search?l=CSS&p=13&q=moz+placeholder&
> type=Code&utf8=%E2%9C%93>
>
>
> For example,
> https://github.com/yields/rework-pseudos/blob/
> c4d2a48fe82a3a387f2f78744b25e765acbd06f3/test/fixtures/
> pseudos.out.css#L38-L60
>
> Looking at some of these results, it makes me wonder if adding a webkit
> prefix alias would improve things more than removing a moz prefix.
>
> --
> Mike Taylor
> Web Compat, Mozilla
> _______________________________________________
> dev-platform mailing list
> dev-pl...@lists.mozilla.org
> https://lists.mozilla.org/listinfo/dev-platform
>

Mike Taylor

unread,
May 25, 2017, 3:58:07 PM5/25/17
to Ku(顧思捷)CJ, dev-pl...@lists.mozilla.org
On 5/25/17 5:48 AM, Ku(顧思捷)CJ wrote:
> Mike, do we get any complaint about not supporting webkit placeholder
> alias?

Nah, not that I'm aware of. I was just looking through GitHub search
results and finding some stuff that only includes webkit-input-placeholder:

<https://github.com/Noah-Zhang/react-native-wechat/blob/434956d9c49e205198a906bf94d7d506555a1c89/Server/public/stylesheets/style.css>

Pretty much everywhere else that has a -moz-placeholder includes a
-webkit-input-placeholder (or unprefixed, or both). But I'm guessing
add-on code would be the exception.
0 new messages