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

@nib-styles/v2-typography

v5.0.0

Published

nib styled typography

Downloads

6

Readme

@nib-styles/v2-typography

nib styled typography

Installation

npm install --save @nib-styles/v2-typography

Note: Requires Opens Sans and Roboto fonts from Google Fonts:

<link rel='stylesheet' href='//fonts.googleapis.com/css?family=Open+Sans:400,700|Roboto:300,700' />

Usage

Using mixins

@import "@nib-styles/v2-typography";

.product {

  &__title {
    @include title(2, $color: 'grey', $pad: true)
  }

  &__description {
    @include copy($color: 'grey', $pad: true)
  }

  &__link {
    @include link($color: 'green')
  }

}
<div class="product">
    <h2 class="product__title">Top</h2>
    <p class="product__description">
      The best hospital cover you can get.
      <a class="product__link">Join now!</a>
    </p>
</div>

Using compiled classes

@import "@nib-styles/v2-typography/compiled";
<div class="v2-article">
    <h2 class="v2-title v2-title--2 v2-title--color-doc">Top</h2>
    <p class="v2-copy">
      The best hospital cover you can get.
      <a class="v2-link v2-link--green">Join now!</a>
    </p>
</div>

Mixins

@include title($size, $color : null, $padding : false)
  • $size Required. An integer from 1-4.

  • $color Optional. May be grey, green or white. If no color is provided the title will inherit the color from its parent element.

  • $padding Optional. If true an amount of top and bottom margin is applied.

@include copy($size : null, $color : null, $padding : false)
  • $size Optional. May be small or large.

  • $color Optional. May be grey, green or white. If no color is provided the title will inherit the color from its parent element.

$padding Optional. If true an amount of top and bottom margin is applied.

@include link($color : null)
  • $color Optional. May be green, grey or white. If no color is provided the title will inherit the color from its parent element.

Functions

text-color-disabled($color)
  • $color Required. The normal text color.

Changelog

5.0.0

  • break: bump version of v2-icons

v4.3.0

  • fix: colour should default to currentColour when no color is specified

v4.2.0

  • add: a reusable function for generating the disabled text color

v4.0.2

  • fix: both color names and color name strings work for title(), copy() and link() mixins e.g. copy($color: green), copy($color: 'green')

v4.0.1

  • fix: bumped the package version to display the latest readme on npmjs.com

v4.0.0

  • break: copy() color defaults to inherit
  • break: title(), copy() and link() mixins error if they receive an invalid param
  • add: copy() size configurable via mixin
  • add: $font-copy and $font-title variables
  • fix/break: link()/.v2-link now has font specified so it doesn't have to be inside a v2-copy block
  • fix: title() padding should be dependent on the title size
  • fix: issues with mixins comparing strings and color names
  • fix: documentation

v2.3.0

  • Mixins!!

v2.2.0

  • Setting color: inherit on .v2-link by default