1.0.8 • Published 5 years ago
deviantart-typecrop v1.0.8
DeviantArt-Typecrop
DeviantArt Branded Typography with SVG Replacement
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;
}