npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2024 – Pkg Stats / Ryan Hefner

@getbase/typography-helpers

v4.1.0

Published

Base Typography Helpers

Downloads

10

Readme

Base Typography Helpers

Base Typography Helpers is designed in a way where you can add it on top of the Base CSS framework or to your own custom project.

Travis Build Status David Dependencies Status


Table of contents


Overview

Base Typography Helpers contains styles for adjusting font weights, text transformations and aligning copy for all breakpoints.


Installation

If you have an existing project and would like to include the Base typography helpers module, run the following command:

npm install --save @getbase/typography-helpers

Once you have the typography helpers module installed, you can include it in your CSS/LESS/SCSS file with one of the following ways:

CSS Import:

@import url("https://unpkg.com/@getbase/typography-helpers/index.css");

SCSS Import:

/* Import Base Typography Helpers */
@import "@getbase/typography-helpers/scss/index";
/* Your Other Styles */
@import "main"

LESS Import:

/* Import Base Typography Helpers */
@import "@getbase/typography-helpers/less/index";
/* Your Other Styles */
@import "main"

Documentation

Base Typography Helpers includes styles for font weights (.font-100 - .font-900), text transformations (.uppercase, .lowercase, capitalize) and aligning copy for all breakpoints (.text-right, .text-right-m, etc)

Helpers (Applies to SCSS/LESS)

| Helper Class | Purpose | Example | Outcome | | ------------ | ------- | ------- | ------- | | .font-100 | Apply a font weight of 100 | <h2 class="font-100">Heading</h2> | Applies a font weight of 100 to a h2 element | | .font-200 | Apply a font weight of 200 | <h2 class="font-200">Heading</h2> | Applies a font weight of 200 to a h2 element | | .font-300 | Apply a font weight of 300 | <h2 class="font-300">Heading</h2> | Applies a font weight of 300 to a h2 element | | .font-400 | Apply a font weight of 400 | <h2 class="font-400">Heading</h2> | Applies a font weight of 400 to a h2 element | | .font-500 | Apply a font weight of 500 | <h2 class="font-500">Heading</h2> | Applies a font weight of 500 to a h2 element | | .font-600 | Apply a font weight of 600 | <h2 class="font-600">Heading</h2> | Applies a font weight of 600 to a h2 element | | .font-700 | Apply a font weight of 700 | <h2 class="font-700">Heading</h2> | Applies a font weight of 700 to a h2 element | | .font-800 | Apply a font weight of 800 | <h2 class="font-800">Heading</h2> | Applies a font weight of 800 to a h2 element | | .font-900 | Apply a font weight of 900 | <h2 class="font-900">Heading</h2> | Applies a font weight of 900 to a h2 element | | .no-select | Disables selection | <body class="no-select">...</body> | Disabled user from selecting text on a web page | | .uppercase | Apply a text transformation of uppercase | <h3 class="uppercase">Heading</h3> | Applies a text transformation of uppercase to a h3 element | | .lowercase | Apply a text transformation of lowercase | <h3 class="lowercase">Heading</h3> | Applies a text transformation of lowercase to a h3 element | | .capitalize | Apply a text transformation of capitalize | <h3 class="capitalize">Heading</h3> | Applies a text transformation of capitalize to a h3 element | | .text-left | Apply a text alignment of left | <div class="text-left">This text will be aligned to the left</div> | Applies text alignment of left to a div element | | .text-right | Apply a text alignment of right | <div class="text-right">This text will be aligned to the right</div> | Applies text alignment of right to a div element | | .text-center | Apply a text alignment of center | <div class="text-center">This text alignment will be centered</div> | Applies text alignment of center to a div element | | .text-left-m | Apply a text alignment of left for medium devices and above | <div class="text-left-m">This text will be aligned to the left for medium devices and above</div> | Applies text alignment of left to a div element for medium devices and above | | .text-right-m | Apply a text alignment of right for medium devices and above | <div class="text-right-m">This text will be aligned to the right for medium devices and above</div> | Applies text alignment of right to a div element for medium devices and above | | .text-center-m | Apply a text alignment of center for medium devices and above | <div class="text-center-m">This text alignment will be centered for medium devices and above</div> | Applies text alignment of center to a div element for medium devices and above | | .text-left-l | Apply a text alignment of left for large devices and above | <div class="text-left-l">This text will be aligned to the left for large devices and above</div> | Applies text alignment of left to a div element for large devices and above | | .text-right-l | Apply a text alignment of right for large devices and above | <div class="text-right-l">This text will be aligned to the right for large devices and above</div> | Applies text alignment of right to a div element for large devices and above | | .text-center-l | Apply a text alignment of center for large devices and above | <div class="text-center-l">This text alignment will be centered for large devices and above</div> | Applies text alignment of center to a div element for large devices and above | | .text-left-xl | Apply a text alignment of left for extra large devices and above | <div class="text-left-xl">This text will be aligned to the left for extra large devices and above</div> | Applies text alignment of left to a div element for extra large devices and above | | .text-right-xl | Apply a text alignment of right for extra large devices and above | <div class="text-right-xl">This text will be aligned to the right for extra large devices and above</div> | Applies text alignment of right to a div element for extra large devices and above | | .text-center-xl | Apply a text alignment of center for extra large devices and above | <div class="text-center-xl">This text alignment will be centered for extra large devices and above</div> | Applies text alignment of center to a div element for extra large devices and above |


Demo

View page example with the typography helpers stylesheet applied.


Support

  • IE10+ and all other modern browsers.
  • Please specify browsers you need to support in package.json according to browserslist docs.

Authors

Matthew Hartman


License

Code released under the MIT Open Source license.