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

butterknife.tj

v1.9.0

Published

butterknife is a SCSS and HTML boilerplate containing a set of functions and mixins essential to my front-end development workflow. For the moment, it uses the sass-planifolia library as a sole dependency.

Downloads

4

Readme

Butterknife

Butterknife is a SCSS and HTML boilerplate containing a set of functions and mixins essential to my front-end development workflow. For the moment, it uses the sass-planifolia library as a sole dependency.

Have any suggestions or feedback? Reach out!

Installation

npm install butterknife.tj or if you're old-school download and import butterknife.tj ✌️

Responsive Mixin

| Name | Description | |---|---| | responsive() | Allows for inline responsive styling of a single CSS property. Accepts a property parameter, a base value and a list of key-value pairs consisting of a breakpoint and a value to be assigned to the property at said breakpoint. If the base value as well as the list values are numerical and pixel-based, they will be interpolated and change fluidly between each breakpoint.|

Example

@include responsive(font-size, 12px, $md: 16px, $lg: 18px);

// compiles to
font-size: 12px;

@media screen and (min-width: 320px) {
    font-size: calc(0.8928571429vw + 9.1428571429px); 
    }
@media screen and (min-width: 768px) {
    font-size: calc(0.8928571429vw + 9.1428571429px); 
    }
@media screen and (min-width: 992px) {
    font-size: 18px;
    }

Layout Mixins

| Name | Description | |---|---| | container() | Accepts a mode parameter and returns either a fluid 100% or stepped fixed-width container. | | column() | Accepts a key-value-list of breakpoints and width values. Unitless width values are automatically converted to percentages, facilitating grid based widths. | | row() | Creates a new row within a parent column for further nesting |

Example

@include container(fixed);
@include column(2/3);
@include row();

/* container */
width: 100%;
margin-right: auto;
margin-left: auto;
display: flex;
overflow-x: hidden;

@media screen and (min-width: 768px) {
    width: 720px; 
    }
@media screen and (min-width: 992px) {
    width: 960px; 
    }
@media screen and (min-width: 1200px) {
    width: 1140px; 
    }
	
/* column */
width: 66.6666666667%;
padding-right: 1rem;
padding-left: 1rem;

/* row */
width: calc(100% + 2rem);
display: -webkit-box;
display: flex;
flex-flow: row wrap; 

Selector Mixins

| Name | Description | |---|---| | nth() | Targets the n-th element of a specific type. Accepts a number parameter. | | first() | Targets the first element of a specific type. | | last() | Targets the last element of a specific type. | | empty() | Targets an element of a specific type not containing any child elements. | | count() | Targets elements of a specific type based on their number within a shared parent element. Accepts a number parameter. | | range() | Targets a range of elements of a specific type. Accepts two number parameters for lower and upper range limit. |

Functions

| Name | Description | Example | |---|---|---| | ease() | Returns a cubic-bezier curve function for use with CSS transitions and animations. Accepts a direction and function parameter, the latter being optional and defaulting to a value of linear. | ease(in-out, quintic); | | color() | Returns a color value from a key-value map. Accepts a color name. | color(blue); | | pos() | Converts a color to CIELAB color space and optimizes it for positive (i.e. dark on light) applications. Accepts a color name and an optional lightness parameter between 0 and 1. The value of the lightness parameter defaults to 0.4. | pos(blue, 0.4); | | neg() | Functionally identical to the pos() function but optimized for negative (i.e. light on dark) applications. The value of the lightness parameter defaults to 0.6. | neg(blue, 0.8); | | tint() | Lightens a color by mixing it with white. Accepts a color name and an optional lightness parameter between 0 and 1. The value of the lightness parameter defaults to 0.5. | tint(blue, 0.5); | | shade() | Darkens a color by mixing it with black. Accepts a color name and an optional lightness parameter between 0 and 1. The value of the lightness parameter defaults to 0.5. | shade(blue, 0.5); |

Authors

License

This project is licensed under the MIT License.