# polymer-font-awesome

> FontAwesome Wrapper to be used in Polymer components.

Latest version **1.0.0** (published 2017-08-02) · (OFL-1.1 AND MIT) license · 0 weekly downloads

> **Deprecated.** This package is deprecated.

## Install

```sh
npm install polymer-font-awesome
pnpm add polymer-font-awesome
yarn add polymer-font-awesome
bun add polymer-font-awesome
```

## Health

**Score 10/100 (F)** — status: deprecated.

Negative: deprecated.

## Facts

| | |
|---|---|
| Version | 1.0.0 |
| Published | 2017-08-02 |
| First published | 2017-08-02 |
| Weekly downloads | 0 |
| License | (OFL-1.1 AND MIT) |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 1 |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 0 |
| Author | Sören Oldag |
| Maintainers | soldag |

## Links

- npm: https://www.npmjs.com/package/polymer-font-awesome
- Repository: https://github.com/soldag/polymer-font-awesome
- Homepage: https://github.com/soldag/polymer-font-awesome#readme
- Issues: https://github.com/soldag/polymer-font-awesome/issues
- npm.io page: https://npm.io/package/polymer-font-awesome

## Dependencies (1)

- [font-awesome](https://npm.io/package/font-awesome.md) ^4.7.0

## Recent versions

- 1.0.0 (latest) — 2017-08-02

## README

# polymer-font-awesome
Loading fonts inside the dom-module of a web component is not supported. However, the FontAwesome CSS needs to be loaded inside the dom-module so that the styles are applied within the shadow DOM of the component.
Therefore, the font needs to be loaded explicitly outside of the context of the dom-module.

This projects splits the FontAwesome stylesheet and embeds the CSS rules inside a custom style/style module, so they can easily be included in Polymer web components.

## Usage
The project consists of two files:
* `font-face.html`: Polymer custom style, which loads the actual fonts.
* `font-awesome.html`: Polymer style module, which contains the FontAwesome CSS rules.

Both files must be loaded inside your component outside the `dom-module` definition:
```html
<link rel="import" href="node_modules/polymer-font-awesome/dist/font-face.html">
<link rel="import" href="node_modules/polymer-font-awesome/dist/font-awesome.html">

<dom-module id="...">
...
</dom-module>
```
Additionally, the style module needs to be included in the template of your component as described in the [Polymer docs](https://www.polymer-project.org/2.0/docs/devguide/style-shadow-dom#style-modules):
```html
<style type="text/css" include="font-awesome"></style>
```

## Packaging
When using [polymer-build](https://github.com/Polymer/polymer-build) to build your component, you must add the fonts as extra dependencies in `polymer.json`:
```json
{
  "extraDependencies": [
      "node_modules/polymer-font-awesome/dist/fonts/*"
  ]
}
```

## License
- The Font Awesome font is licensed under the SIL OFL 1.1:
  - http://scripts.sil.org/OFL
- Font Awesome CSS, LESS, and Sass files are licensed under the MIT License:
  - https://opensource.org/licenses/mit-license.html

---
_Source: https://npm.io/package/polymer-font-awesome · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
