Answer the question
In order to leave comments, you need to log in
-webkit-text-fill-color, what is this miracle?
Hello, why is this happening? There is a block with a property color: red;
, and it seemed like a simple property that works everywhere, and what could go wrong here? But, not everything is so simple. In the safari browser, on the iPhone, it refused to work. The color is inherited from the parent element. The rest of the properties worked with a bang, and only the color did not want to change. I didn't know what to do anymore. But rustling with Google, I still found the property -webkit-text-fill-color
, and oh Gods, it worked.
So from the question, what is it? How to protect yourself from this? Everywhere to prescribe it next to color
it is already some kind of wildness. At the moment, in the properties I have registered this:
* {
-webkit-text-fill-color: currentcolor;
}
<div class="content">
<div class="text">
<span class="colorred">текст</span>
</div>
</div>
.content {
color: #303030;
}
.text {
color: inherit;
}
.colorred {
color: red;
}
style="color: red;"
n't even help.
Answer the question
In order to leave comments, you need to log in
Check your CSS.
There have never been such problems with the simplest color property in Safari (and not only). So look for the problem in CSS. Something overrides the properties you need.
Screenshot of the output of your sample code in iOS Safari. Naturally - everything is in order:
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question