🚀 Big News: Socket Acquires Coana to Bring Reachability Analysis to Every Appsec Team.Learn more
Socket
DemoInstallSign in
Socket

entity-sass

Package Overview
Dependencies
Maintainers
1
Versions
1
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

entity-sass

A Sass function that will output properly encoded entities.

1.0.0
latest
npm
Version published
Weekly downloads
0
Maintainers
1
Weekly downloads
 
Created
Source

Entity

A (revamped) Sass function that will output properly encoded entities.

Why :thinking:

No clue. I came across https://dev.w3.org/html5/html-author/charref and thought it would be fun. I ran a Node script that output the file then wrote some tests.

Usage

The entity function accepts the actual character, the HTML name without the ampersand and semi-colon or the decimal number.

body {
  &:after {
    content: entity('€');
  }
}

or

body {
  &:after {
    content: entity('euro');
  }
}

will output

body:after {
  content: "\20AC";
}

Keywords

sass

FAQs

Package last updated on 06 May 2017

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts