I
I
Igor Kaspersky2015-04-06 09:27:13
htaccess
Igor Kaspersky, 2015-04-06 09:27:13

Why does the ::-webkit-input-placeholder selector start with two colons?

::-webkit-input-placeholder { color:#f00; font-family: Georgia;}
::-moz-placeholder { color:#f00; font-family: Georgia;}
:-ms-input-placeholder { color:#f00; font-family: Georgia;}
:-moz-placeholder { color:#f00; font-family: Georgia;}
If one ":" is removed, it doesn't work. Why are they responsible?

Answer the question

In order to leave comments, you need to log in

1 answer(s)
E
Evgeny Petrov, 2015-04-06
@HHabar

Single and double colons - this is understandable, pseudo -classes and pseudo- elements (and more tyts ). As for the implementation of placeholder
by vendors , this is not an easy topic ... The evolution, most likely, was like this - from a pseudo-class to a pseudo-element (this can be seen on the example of Mozilla ). I think one of the reasons is that :placeholder-shown was introduced in CSS3 .

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question