Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

https://github.com/cityssm/fa-glow

The missing option to outline layered icons when using Font Awesome SVG+JS
https://github.com/cityssm/fa-glow

css font-awesome font-awesome-5 svg

Last synced: about 1 month ago
JSON representation

The missing option to outline layered icons when using Font Awesome SVG+JS

Awesome Lists containing this project

README

        

# fa-glow

[![npm (scoped)](https://img.shields.io/npm/v/@cityssm/fa-glow)](https://www.npmjs.com/package/@cityssm/fa-glow)
[![Codacy grade](https://img.shields.io/codacy/grade/57fa7ebdbec4464192459e94cea7dd07)](https://app.codacy.com/gh/cityssm/fa-glow/dashboard?branch=main)

The missing option to outline layered icons when using
[Font Awesome](https://fontawesome.com/) SVG+JS.

![fa-glow sample](sample.png)

## Usage

This small CSS file works with the SVG+JS version of Font Awesome,
and was tested with version 5. It may work with version 6, though has not been tested.

```html




```

## Options

Attributes are added to the icon elements.

`data-fa-glow`

- Adds an outline to the icon using the default width (8).

`data-fa-glow="5"`

- Adds an outline to the icon with 10 times the width set.
- Whole numbers between 1 and 10 are accepted.

`style="--fa-glow-color:red"`

- Sets the color of the outline.
- When unset, the default color (white) will be used.

## Need `fa-glow` with the CSS version of Font Awesome?

[fa5-power-transforms-css](https://github.com/cityssm/fa5-power-transforms-css)
offers a lot of Font Awesome's Power Transform functionality,
including limited support for the `data-fa-glow` attribute.