@avalanche/utility-font-family
v4.0.0-alpha.8
Published
Font family utility classes
Downloads
16
Readme
@avalanche/utility-font-family
Font family utility classes.
- [Documentation](https://avalanche.oberlehner.net/documentation/#utility: font-family)
Install
npm install @avalanche/utility-font-family --save-dev
Basic usage
// Import the main file.
@import 'node_modules/@avalanche/utility-font-family/scss/index.scss';
Usage with node-sass-magic-importer
Using node-sass (or a plugin for Grunt, gulp or webpack which is using node-sass) in combination with the node-sass-magic-importer custom importer, can make importing CSS dependencies from node_modules
a much nicer experience.
// Import the main file.
@import '~@avalanche/utility-font-family';
// Import just the classes you need.
@import '{ .u-font-family-b } from ~@avalanche/utility-font-family';
// Not a fan of the "u-" prefix?
@import '{ .u-font-family-b as .font-family-b } from ~@avalanche/utility-font-family';
Demo
<p class="u-font-family-a">Font Family A</p>
<p class="u-font-family-b">Font Family B</p>
Mixins
@import 'node_modules/@avalanche/utility-font-family/scss/mixins';
// Usage.
.font-family-a {
@include u-font-family();
}
About
Author
Markus Oberlehner
Website: https://markus.oberlehner.net
Twitter: https://twitter.com/MaOberlehner
PayPal.me: https://paypal.me/maoberlehner
License
MIT