Skip to content

[Feature Request] Bulletproof syntax #3

@Kristinita

Description

@Kristinita

(Если не возражаете, по-русски буду писать)

1. Summary

Хотелось бы «Пуленепробиваемый синтаксис» для @font-face. По всей видимости, это лучше в плане кроссбраузерности.

2. Expected behavior

Пример, как в моём css выглядят другие шрифты. Конвертирую через @font-face generator.

@font-face
{
    font-family: 'SashaWow';

    src: url('../../fonts/SashaWow/SashaWow.eot');
    src: url('../../fonts/SashaWow/SashaWow.eot?#iefix') format('embedded-opentype'),
    url('../../fonts/SashaWow/SashaWow.woff') format('woff'),
    url('../../fonts/SashaWow/SashaWow.ttf') format('truetype');
}

3. Actual behavior

Как выглядит css шрифта, который скачал с webfont.ru:

@font-face {
    font-family: 'AleksandraC';
    src: local('AleksandraCRegular'), url('../../fonts/AleksandraC/aleksandracregular.woff2') format('woff2'), url('../../fonts/AleksandraC/aleksandracregular.woff') format('woff'), url('../../fonts/AleksandraC/aleksandracregular.ttf') format('truetype');
    font-weight: 400;
    font-style: bold;
}

4. Steps to reproduce

Скачал пакет WebFont через Package Contol → загрузил и подключил шрифт AleksandraC → когда открыт css-файл с @font-face, csslint выдаёт ошибку в status bar:

@font-face declaration doesn't follow the fontspring bulletproof syntax. Use the bulletproof @font-face syntax to avoid 404's in old IE (http://www.fontspring.com/blog/the-new-bulletproof-font-face-syntax). (bulletproof-font-face)

5. Environment

Operating system and version:
Windows 10 Enterprise LTSB 64-bit EN
Sublime Text:
Build 3126
csslint
v1.0.4

Спасибо.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions