pankajpatel / fontgen-loader

Forked from https://github.com/DragonsInn/fontgen-loader
5 stars 1 forks source link

Fixed baseSelector usage and documentation #4

Closed IlyaSemenov closed 7 years ago

IlyaSemenov commented 7 years ago

Unfortunately in #3 I didn't pay much attention to the deprecation of baseClass in favour of baseSelector in webfonts-generator and almost blindly replaced its usages (and even missed one of them). As the result, the following invalid CSS was generated:

icon {
        line-height: 1;
}

icon:before {
        font-family: Octicons-json !important;
        font-style: normal;
        font-weight: normal !important;
        vertical-align: top;
}

.octicon-json-alert:before {
        content: "\f101";
}

This PR fixes the problem, updates tests and documentation. It also adds backward compatibility with old configs that still use baseClass.

pankajpatel commented 7 years ago

@IlyaSemenov did you make it backwards compatible?

IlyaSemenov commented 7 years ago

Yes, it is backwards compatible. You can pass baseClass as earlier in the same format. The upstream will print a warning, but it will work fine.

pankajpatel commented 7 years ago

yes, I also checked it.

Thanks for the merge request. 👍