Comments (11)
For projects using npm and its ilk you can add instructions for using @fontsource really easily.
npm install @fontsource/open-sans
- 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.
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.
Sounds good 👍 I will add instructions for all proposed ideas.
from classlesscss.
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.
I wonder if we'd be able to use a data-
attribute and a CSS variable?
from classlesscss.
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.
We may be able to use unpkg i.e. unpkg
from classlesscss.
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.
@emareg I was mostly suggesting adding instructions because a huge number of people are using NPM.
from classlesscss.
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.
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)
- <aside> element overlaps navigation bar HOT 1
- Mobile navigation caret expansion doesn't rollup on second toggle HOT 3
- Add info icon modal HOT 2
- Can't make it working HOT 4
- media query too wide on iphone 12 mini HOT 2
- this is a beautiful beautiful beautiful classless framework! HOT 1
- Move Footer To The Bottom HOT 5
- Inline img tags within a p tag doesn't float to the right side HOT 1
- Here is example use in a CMS:
- Dark theme improvement
- how to make it wider? HOT 2
- Import Google Font in CSS file
- Make grid and cards classless HOT 2
- sans-serif HOT 1
- Make img tags scale without figure tag HOT 2
- Interested in classless tooltips? HOT 12
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from classlesscss.