My IDE inspects my CSS files, and complains if I put a font-family
rule which does not have a generic fallback. In general, I have to agree with my IDE, and I will happily add the font callback.
Example:
.selector {
font-family: Arial; /* IDE complains. */
font-family: Arial, sans-serif; /* IDE is happy. */
}
However, sometime the font-family is an icon font (I think fontawesome is one of those), and a fallback does not really make sense. Or does it?
.my-icon {
font-family: 'my-icon-font'; /* IDE complains. */
font-family: 'my-icon-font', serif; /* IDE is happy, but it does not make sense. */
}
Question
Could there be any sensible fallback that would make sense to append to a font-family rule with an icon font?
Additional motivation
In my case, it is mainly my IDE that is nudging me to add a generic font callback. As a last resort I could disable, suppress or ignore this inspection.
However, in other teams there might be strict rules about code conventions, perhaps even a mechanism that blocks commits if they do not comply.
Or what if I am the author of a code inspection tool, or in the process of defining the coding conventions to be used in a project? Then I definitely want to know what would be the "correct" or smartest way to do this :)
<b>
and<i>
and a whole bunch of other things that the w3c recommended or removed from the standard etc, only to make a 180 on all of them with HTML5 because in the end the web itself had final word. – Hyp