Reputation: 175
In chrome the color is showing, but in IE, FF how do I use this property
CSS
#Grid td.note div.has-note i {
-webkit-text-fill-color: #b4efa8;
}
Upvotes: 3
Views: 10464
Reputation: 66
It can be used to work with cursor color. See the snippet...
textarea { display: block; width:100%; height: 5em; } /* Unimportant */
#t1 { color: #ff0000; }
#t2 { color: #ff0000; -webkit-text-fill-color: #0000ff; }
<textarea id="t1">I'm all RED ! Both text and cursor.</textarea>
<textarea id="t2">My cursor is RED because of "color:", but my font face is BLUE because of "-webkit-text-fill-color:". I work only in Opera, Chrome, and should start working in new Firefox (v.48) by next month :) ...</textarea>
For example w3schools.com use this in their on-line example editor to make highlighting of the code possible. Since text in can't be formatted, they made it transparent using "-webkit-text-fill-color" but kept the cursor, then they clone the code into underlying div and color it.
Upvotes: 1
Reputation: 36642
AFAIK text-fill-color
is a non-standard, webkit only property . There is no equivalent in other browsers (maybe somebody can correct me?).
But, as this property simply overrules the standard color property, you can just add the standard color
property as a fallback...
#Grid td.note div.has-note i {
color: red; /* all browsers */
-webkit-text-fill-color: #b4efa8; /* webkit browsers only */
}
div {
color: red; /* all browsers */
-webkit-text-fill-color: blue; /* webkit browsers only */
}
<div>
What colour am I?
</div>
Upvotes: 2
Reputation: 903
Use this CSS
Only webkit browsers have text-fill-color
property othes have only color
property
#Grid td.note div.has-note i {
-webkit-text-fill-color: #b4efa8;
color: #b4fa8;
}
Upvotes: 1
Reputation: 41
In Firefox and IE you do not have text-fill-color
property.Use Color instead of text-fill-color.
Upvotes: 3