I'm using PHPStorm 8.0.3 and in my CSS file I get warning for font-family
rule.
This inspection verifies that the CSS font-family property contains a generic font name as a fallback alternative.
I added the font as follows:
.my_text { font-family: 'DINPro-Medium'; } @font-face { font-family: 'DINPro-Medium'; src: url(font/DINPro-Medium.eot); src: url(font/DINPro-Medium.eot?#iefix) format('embedded-opentype'), url(font/DINPro-Medium.ttf) format('truetype'), url(font/DINPro-Medium.woff) format('woff'), url(font/DINPro-Medium.svg#DINPro-Medium) format('svg'); font-weight: normal; font-style: normal; }
I can not understand what the problem is.
The font-family property specifies a list of fonts, from highest priority to lowest. Font selection does not stop at the first font in the list that is on the user's system.
The font-family property specifies the font for an element. The font-family property can hold several font names as a "fallback" system. If the browser does not support the first font, it tries the next font.
The term modern can be used for a fixed-pitch generic font family name, which is used in OpenDocument format (ISO/IEC 26300:2006) and Rich Text Format. Examples of monospaced fonts include Courier, Lucida Console, Menlo, Monaco, Consolas, Inconsolata and Source Code Pro.
It is recommended to add generic font families as a fallback while using a custom font.
Eg. font-family: 'DINPro-Medium', serif;
If the browser fails to load files for your custom font, it will use generic serif
font.
Uncheck this checkbox which will disable the check:
Settings → Editor → Inspections → CSS → Probable bugs → Missing generic font name
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With