Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Disable web fonts #31

Closed
jgoodall opened this issue Apr 4, 2017 · 9 comments
Closed

Disable web fonts #31

jgoodall opened this issue Apr 4, 2017 · 9 comments

Comments

@jgoodall
Copy link

jgoodall commented Apr 4, 2017

Is there any way to turn off the web font import, below, in the css file, other than just removing it? We have customers that are in a closed environment.

@import url('https://fonts.googleapis.com/css?family=Lato:400,700,400italic,700italic&subset=latin');
@davewarfel
Copy link

If you are using Gulp to build your files, you can add the following line to your /src/site/globals/site.variables file, and that will completely remove the @import of the Lato Google Font.

@importGoogleFonts : false;

Reference: Semantic-Org/Semantic-UI#1305

@jgoodall
Copy link
Author

We dont use gulp, we install from npm and use webpack.

@davewarfel
Copy link

Sorry, but I don't use webpack so I'm not sure how you would accomplish the same thing with it. I just know that if that line is in your theme's (or custom site's) site.variables file, when you compile the Semantic UI /dist/ files, the @import is gone.

I wish I had a better answer for webpack, but I'm just not familiar with it.

@jgoodall
Copy link
Author

ok thanks.

@ifritmitsuma
Copy link

Actually, this project is semantic-ui-css, so it's not possible to use site.variables, right?
How would one possibly use this project offline, importing the font locally, without having to change the code directly after npm install?

@vphantom
Copy link

vphantom commented Aug 18, 2017

I'm toying with the idea of doing a grep -v 'font-family:' on each file I need, but short of that if one is satisfied with Lato, an option is to use PostCSS with the Assets plugin to force inlining the font into a CSS file you're building locally.

@arthurlacoste
Copy link

arthurlacoste commented Oct 31, 2017

I have made a fork for this issue : https://github.com/arthurlacoste/semantic-ui-offline

You can use this for the css with fonts includes :

npm i semantic-ui-offline

@brianespinosa
Copy link
Member

Thanks @arthurlacoste.

@lubber-de

This comment was marked as spam.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

7 participants