dasrick / npm-font-open-sans

npm package of Open Sans (incl. CSS/LESS/SCSS)
Apache License 2.0
6 stars 4 forks source link

Import only normal fs #2

Open sentbyravens opened 7 years ago

sentbyravens commented 7 years ago

Hello! How can I import only normal font-style? (without italic) Thanks!

dasrick commented 7 years ago

@sentbyravens Currently not.

but a possible solution could be:

... split the main file that include all variants into tiny specialized versions (10 atomic and some combined versions).

To prevent breaking changes the main files (open-sans.css|less|scss) will not be changed.

In the end you have to include one of the new files ... for example:

@import '../../../node_modules/npm-font-open-sans/open-sans--roman';

possible versions:

... and i would split the properties form the original font name via double hyphen ...

So, in the end there would be a naming pattern like this:

open-sans--([roman|italic])-([300|400|600|700|800])

Let me know if this would be a helpful solution for you ...

sentbyravens commented 7 years ago

Webpack cannot resolve @import '~npm-font-open-sans/open-sans--roman'; What I did wrong?

dasrick commented 7 years ago

Sry for the late answer .. (i am in vacation 😃 ) ...

currently it is not part of the code ... I did only a suggestion. if it sounds good for you then i would do it as described ... so again, currently it is not part of the code ...

sentbyravens commented 7 years ago

Oh, really! :) But that's sound very nice if you can do it. Thank you

sentbyravens commented 7 years ago

When are you going to do this?