Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Safari CSS Font Color issue

Tags:

I'm having a problem with my font color in safari browser on mac book, iphone and ipad. The disable element turn into gray and I want it to retain its original color black. The result in firefox and chrome are okay.

This is my css code:

input[disabled], textarea[disabled], select[disabled='disabled']{     color: #000000 !important; } 

I also tried using color name but he result is the same.

Thanks for your help!

like image 574
kwan_ah Avatar asked Jan 28 '14 08:01

kwan_ah


People also ask

Why is my safari showing up with white letters a black background?

For instance, if you're using Dark Mode, Reader View will display a black background with white text. Once you've made changes to Safari's Reader View according to your liking, your preferences will be saved and every time you enter Reader View from a webpage, your preferred font style and background will be used.

How do I change the font color in CSS?

Simply add the appropriate CSS selector and define the color property with the value you want. For example, say you want to change the color of all paragraphs on your site to navy. Then you'd add p {color: #000080; } to the head section of your HTML file.

What is the CSS code for text color?

Text-color property is used to set the color of the text. Text-color can be set by using the name “red”, hex value “#ff0000” or by its RGB value“rgb(255, 0, 0).


1 Answers

This is the only solution I found that works on FF, Chrome, Safari and Safari Mobile. Cheers!

input[disabled], textarea[disabled], select[disabled='disabled']{    -webkit-text-fill-color: rgba(0, 0, 0, 1);     -webkit-opacity: 1;     color: rgba(0, 0, 0, 1);     background: white; } 
like image 159
kwan_ah Avatar answered Oct 16 '22 07:10

kwan_ah