webfont-montserrat

1.0.0 • Public • Published

WebFont: Montserrat

The webfont-montserrat package simplifies self-hosting the Montserrat Font for your web applications. This means you can use the font without relying on external services. It works with both vanilla CSS and popular frameworks like Tailwind CSS.

Getting Started

Install the package:

$ npm install -S webfont-montserrat

Import it into your main stylesheet:

@import url('/node_modules/webfont-montserrat/dist/index.css');

Register it in your application:

html {
  font-family: "Montserrat", sans-serif;
  font-size: 16px;
  font-weight: 400;
  font-style: normal;
  font-display: swap;
  ...
}

Alternatively, if you're using Tailwind CSS:

@tailwind base;
@tailwind components;
@tailwind utilities;

@layer base {
  html {
    font-family: "Montserrat", sans-serif;
    font-size: 16px;
    font-weight: 400;
    font-style: normal;
    font-display: swap;
    ...
  }
}

Built With

  • CSS

License

MIT


Acknowledgments


Deployment

  1. Install dependencies:
$ npm install
  1. Build the package:
$ npm start
  1. Publish to npm:
$ npm publish

Package Sidebar

Install

npm i webfont-montserrat

Weekly Downloads

6

Version

1.0.0

License

MIT

Unpacked Size

240 kB

Total Files

14

Last publish

Collaborators

  • jesusgraterol