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

PostCSS Plugin Integration #133

Open
4 tasks
ayuhito opened this issue Jan 20, 2021 · 1 comment
Open
4 tasks

PostCSS Plugin Integration #133

ayuhito opened this issue Jan 20, 2021 · 1 comment
Labels
contributors welcome! Open to outside contributors enhancement New feature or request not stale

Comments

@ayuhito
Copy link
Member

ayuhito commented Jan 20, 2021

Inspired and derived from Font Magician, I feel that it would be great for us to have our own flavour that directly supports Fontsource self-hosted fonts. The intent is to provide an alternative installation method for those who do not use a bundler like Webpack or compiler like Sass (Tailwind users especially).

This is a continuation of #121, but I decided to make this issue to focus on PostCSS specifically whilst leaving the original issue open-ended to other base solutions.

Checklist:

  • Create a new /plugins directory for maintaining the integration (room for other separate packages could be included such as react-preload Preload Fonts #83)
  • Develop plugin to emulate full functionality of other installation methods
  • Add options to customize values e.g. font-display, customFontFilePaths
  • Publish under @fontsource/plugin-postcss

Anyone is welcome to provide input or take on this if they are interested. It personally will take me a while to catch up on this aspect of Fontsource since I'm a little busy currently but also other things need a bit more attention within the repo imo.

@TigersWay
Copy link

Please forgive me to add a little bit of salt to that issue....

But, while a potential "postcss-fontsource" plugin is something I could dream about (I am a user of libraries like Tailwind, windcss and others), I believe there is already something quicker that could be done: old postcss plugins like, mostly postcss-url, or the very old postcss-copy, postcss-assets, etc could help a lot.

I merged a very old PR (postcss/postcss-url#146) of that postcss-url (postcss/postcss-url#175) and with my little skills I can say it's working pretty good / did what I was looking for!

If anyone was skilled enough (sorry I'm not) to maintain or rewrite one of these plugins, it could really help. I would of course offer my help to define and test it!!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
contributors welcome! Open to outside contributors enhancement New feature or request not stale
Projects
None yet
Development

No branches or pull requests

2 participants