包含所有谷歌字体网址的文件 [英] File containg all google font URLs
问题描述
我正在构建一套应用谷歌字体的工具 - superfly- css-utilities-fonts 。
我想包含所有的Google字体网址,以便可以像这样构建实用程序类:
@import url('https://fonts.googleapis.com/css?family=Open+Sans');
@import url('https://fonts.googleapis.com/css?family=Montserrat');
@import url('https://fonts.googleapis.com/css?family=Roboto');
@import url('https://fonts.googleapis.com/css?family=Lato');
/ **所有字体回退到相同的变量 - FIX ** /
@each $字体在Open + Sans,蒙特塞拉特,Roboto,Lato {
.u-font - $(font){
font-family:$(font)!important;
$ b任何人都知道如果一个文件包含所有的 @import
所有谷歌字体的语句?这样我可以只导入该文件。如果在每个循环中可以使用的所有字体名称都有逗号分隔的列表,那就太棒了。
这项工作正在进入麻省理工学院许可的实用程序库。
解决方案我为您创建了一个存储库。有一个css文件,其中包含所有独立字体文件的导入列表。
https://github.com/praisedpk/Import-All-Google-Fonts
I'm building a set of utilities for applying google fonts - superfly-css-utilities-fonts.
I would like to include all the Google font urls such that the utility classes can be built like this:
@import url('https://fonts.googleapis.com/css?family=Open+Sans');
@import url('https://fonts.googleapis.com/css?family=Montserrat');
@import url('https://fonts.googleapis.com/css?family=Roboto');
@import url('https://fonts.googleapis.com/css?family=Lato');
/** All fonts fallback to the same variable - FIX **/
@each $font in Open+Sans, Montserrat, Roboto, Lato {
.u-font-$(font) {
font-family: $(font) !important;
}
}
Anyone know if theres a file containing all the @import
statements for all the google fonts? That way I could just import that file. If there existed a comma separated list of all the font names that could be used in the each loop that would be awesome.
This work is going into an MIT licensed utility library.
解决方案 I have created a repository for you. There is a css file that contains a list of imports for all separate font files.
https://github.com/praisedpk/Import-All-Google-Fonts
这篇关于包含所有谷歌字体网址的文件的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!