Bootstrap: Firefox placeholder opacity bug

Created on 16 Apr 2013  路  4Comments  路  Source: twbs/bootstrap

The color is ok, but on Firefox they change the opacity of the field too, so on the placeholder pseudoclass should be added "opacity: 1;".

You can see the bug on http://twitter.github.io/bootstrap/base-css.html#forms

Most helpful comment

Its a default browser behavior Firefox change their opacity to placeholder texts if you need the placeholder color be exactly the same in all browser you should use "opacity:1" just a example for someone that across with the same problem:

input:-moz-placeholder { /* Firefox 18- */
   color: red;  
   opacity: 1;
}

input::-moz-placeholder {  /* Firefox 19+ */
   color: red;
   opacity: 1;
} 

All 4 comments

I see no opacity change on forms in the latest Firefox.

I dont know how you didnt saw, but there is two prints one with placeholder the other one with text, its a firefox only issue, on Windows and Mac.

placeholder-problem

placeholder-problem-2

As you can see the color is different because opacity change.

Mentioned to you on Twitter, but it's not an opacity change. That's intentional styling on the text color for different pseudo states.

Its a default browser behavior Firefox change their opacity to placeholder texts if you need the placeholder color be exactly the same in all browser you should use "opacity:1" just a example for someone that across with the same problem:

input:-moz-placeholder { /* Firefox 18- */
   color: red;  
   opacity: 1;
}

input::-moz-placeholder {  /* Firefox 19+ */
   color: red;
   opacity: 1;
} 
Was this page helpful?
0 / 5 - 0 ratings

Related issues

iklementiev picture iklementiev  路  3Comments

devfrey picture devfrey  路  3Comments

matsava picture matsava  路  3Comments

athimannil picture athimannil  路  3Comments

devdelimited picture devdelimited  路  3Comments