Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

What is the default color and font for input placeholders

Does anyone know what is the default color and font and size for placeholders for inputs and textareas?

<input type="text" name="input" placeholder="Select data" class="form-control"/>

enter image description here

like image 873
kevin_b Avatar asked Jan 27 '17 17:01

kevin_b


1 Answers

Depending on your application / need, you could use a color picker tool, or you could use your Browser's developer console, to be sure. But...

The default input placeholder color varies by browser.

In your screenshot, it's #8e8e8e

Some examples by browser:
In Chrome (Mac) it's #a9a9a9
in Firefox (Mac) it's #777777

Bootstrap 3 does define a "default" placeholder color, which you can see by inspecting the CSS a variety of ways - below is from the CSS directly (For Bootstrap v3.3.7):

.form-control::-moz-placeholder{
    color:#999;
    opacity:1
}

.form-control:-ms-input-placeholder{
    color:#999
}

.form-control::-webkit-input-placeholder{
    color:#999
}

So - Bootstrap 3 defines the default placeholder color as #999. (For reference, Bootstrap 4 defines the default placeholder color as #636c72).

like image 52
random_user_name Avatar answered Oct 05 '22 03:10

random_user_name