E
E
Evgeny Petrov2018-03-02 10:03:19
css
Evgeny Petrov, 2018-03-02 10:03:19

How to change the style of placeholder for a specific class?

There are two forms on the site: registration, authorization.
Registration is done in dark shades, authorization in light.
On the registration fields, the placeholder should be light, and on the authorization dark.
How can such a thing be implemented?

Answer the question

In order to leave comments, you need to log in

1 answer(s)
D
David Halkin, 2018-03-02
@borgore

input{
    &:-ms-input-placeholder {
        color:#fff;
    }
    &::-moz-placeholder {
        color:#fff;
    }
    &::-webkit-input-placeholder {
       color:#fff;
    }
    &.dark{
    	&:-ms-input-placeholder {
          color:#000;
      }
      &::-moz-placeholder {
          color:#000;
      }
      &::-webkit-input-placeholder {
         color:#000;
      }
    }
}

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question