Git Product home page Git Product logo

Comments (11)

Crisfole avatar Crisfole commented on June 2, 2024 2

For projects using npm and its ilk you can add instructions for using @fontsource really easily.

  1. npm install @fontsource/open-sans
  2. In classless.css Change @import url('https://fonts.googleapis.com/css?family=Open+Sans:300,400'); to @import '@fontsource/open-sans';

That's it. This is also almost the complete instructions for selecting a different font...

from classlesscss.

basteyy avatar basteyy commented on June 2, 2024 2

We can add different ways how to import the fonts. So let's remove the import, modify the fonts to 'Open Sans', open-sans, 'helvetica neue', helvetica, arial and add the description to the documentation.

from classlesscss.

emareg avatar emareg commented on June 2, 2024 2

Sounds good 👍 I will add instructions for all proposed ideas.

from classlesscss.

emareg avatar emareg commented on June 2, 2024

Thanks for pointing this out. I will look into this when I find the time. I guess self-hosting Open Sans would be an option. How would you make this configurable?

from classlesscss.

jamietanna avatar jamietanna commented on June 2, 2024

I wonder if we'd be able to use a data- attribute and a CSS variable?

from classlesscss.

emareg avatar emareg commented on June 2, 2024

I do not use npm but sure, we can add instructions on how you can self-host the font with npm.
However, I would rather not add any npm dependencies. Any other suggestions? Are there CDNs for fonts that are GDPR compliant? Classless could also use a different font.

from classlesscss.

jamietanna avatar jamietanna commented on June 2, 2024

We may be able to use unpkg i.e. unpkg

from classlesscss.

emareg avatar emareg commented on June 2, 2024

Looks promising! They also have an open issue regarding GDPR compliance, but so far there is no statement.
Are there any indications that unpkg does not process IP addresses?

from classlesscss.

Crisfole avatar Crisfole commented on June 2, 2024

@emareg I was mostly suggesting adding instructions because a huge number of people are using NPM.

from classlesscss.

basteyy avatar basteyy commented on June 2, 2024

I suggest removing the import from classless and add a description to use Google Web fonts, NPM or whatever. Open Sans is nowadays often already on the systems. So perhaps there is no need at all to load it. On that way, it's up to the user to decide.

from classlesscss.

HelloLudger avatar HelloLudger commented on June 2, 2024

I can recommend the following project for hosting google fonts on your own server:
https://google-webfonts-helper.herokuapp.com/fonts

Comes with a step-by-step explanation.

from classlesscss.

Related Issues (17)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.