Skip to content

intob/scss-google-fonts

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

27 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

scss-google-fonts Build Status

Include google fonts in your projects

Forked from https://github.com/LasseHaslev/sass-google-fonts

Updated deps & added display=swap parameter (see https://developers.google.com/fonts/docs/getting_started#use_font-display)

Install

npm install sass-google-fonts

Usage

First you need to import the project.

// Import the project
@import "node_modules/sass-google-fonts/src/GoogleFonts.scss";

Import your Google font to your project by entering the font name of the font.

// Include a google font
@include google-font( 'Tintos' );

html, body {
    font-family: 'Tintos';
}

You can also specify the weight and language you want to include as follows.

// If you want to specify sizes of the font
@include google-font( 'Tintos', '400,400i,700' );

// Include languages of fonts
@include google-font( 'Tintos', '400,400i,700', 'greek,latin-ext,vietnamese' );

Development

# Install dependencies
npm install

# Run tests one time
npm run test

# Run test driven development
npm run tdd

If you add or change functionality, remember to add tests in test/.

Publish to npm

Make sure all tests are successful before publishing to NPM

# Set the version
npm version {type} # major/minor/patch

# Publish to npm
npm publish

# Publish to github
git push && git push --tags

About

Include google fonts in sass

Resources

Stars

Watchers

Forks

Packages

No packages published

Languages

  • JavaScript 62.4%
  • SCSS 37.6%