npm

deviantart-typecrop

1.0.8 • Public • Published

DeviantArt-Typecrop

DeviantArt Branded Typography with SVG Replacement

Demo

npm-CDN 1.0.7

UNPKG 1.0.7

When the style guide was developed, as a CSS designer, it was painful to manually crop the letters of the alphabet. This process was done by our design team over repeatedly. This is a tool I used at DeviantArt to automate that process. It crops out the first and last letters of a headline and replaces them with the stylized SVG letter.

This also loads the entire "Calibre-Bold" font-family via @font-face. So the end result of this script is 520kb :(. If the font-face is already being used globally, (like anywhere on deviantart.com's properties, then the script can around 16kb. But there's no plans to do that.

Usage

With NPM

npm install deviantart-typecrop

Then in some .js file

import typecrop from 'deviantart-typecrop'

/* Use a CSS selector to apply the stylized crop */
typecrop(".some-class")

With Script Tag

<script src='https://unpkg.com/deviantart-typecrop@1.0.7/index.js'></script>

Then in a <script/> tag or .js file

/* With script tag, module gets exported as an object on the Window */
const typeCrop = typecrop.default

typeCrop(".some-class")

CSS

Apply your own styles

.some-class {
	color: #05CC47;
}

Versions

Current Tags

VersionDownloads (Last 7 Days)Tag
1.0.81latest

Version History

VersionDownloads (Last 7 Days)Published
1.0.81
1.0.77
1.0.60
1.0.50
1.0.40
1.0.30
1.0.20
1.0.11
1.0.00

Package Sidebar

Install

npm i deviantart-typecrop

Weekly Downloads

9

Version

1.0.8

License

ISC

Unpacked Size

1.05 MB

Total Files

9

Last publish

Collaborators

  • bullzito