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

@flickerbox/fabric

v22.11.2

Published

An unopinionated framework that works within your existing workflow to cut down on repetitive tasks.

Downloads

484

Readme

Fabric is your friend

Fabric is a lightweight SCSS framework that you can use for just about any design related need. It artfully handles the boring plumbing of most common design tasks freeing you to focus on value added design.

While Fabric plays nicely with just about any build, and supports friendly aliasing in webpack if you're using the NPM module, you could also just add the files to your project for selective use.

Intro

Fabric makes extensive use of variables, placeholders, mixins, and functions. This makes it easy to extend and augment just the pieces you need to customize while allowing you to defer to Fabric for repetative, shared, or otherwise unchanged styles selectively without writing large blocks of repetative code to override default/base styles.

Example

A nice example of this structure in action is header styling. In the base typography file (fabric/sass/base/_typography.scss) we target both the element h1 and the class selector .h1 to apply our styles. We use these selectors to extend the %h1 placeholder located in our base placeholders (fabric/sass/base-placeholders/_h1.scss).

In the base placeholder we extend the %Heading placeholder and include our font mixin. This font mixin serves as a type of wrapper which in trun utilizes a number of other mixins. For the sake of example we'll just look at one, but they are all similar in structure.

The font-size mixin utilized in font allows you to reference a single size, or a group of font sizes (via a map) with responsive sizing included by default from the responsive-property mixin. In the font variables file (fabric/sass/variables/_font.scss) you'll see the $font-size map that contains the defined font sizes. By default these are single values, however, in your own variables file you can override this with your own values and change the sizes to a map.

Single Value (Default)

$font-size: (
	...
	'h1':   48px
)                                                             !default;

This sets a font-size for all h1 elements and .h1 classes to 48px.

Map of Values (Responsive)

$font-size: (
	...
	'h1': ('x-large': 42px, 'large': 38px, 'medium': 32px, 'x-small': 32px)
)

This sets variable font sizes across the defined breakpoints (see: ./sass/variables/_breakpoints.scss) for responsive font display.

These mixins provide a convenient means to apply multiple styles to a given class with ease, however, they are also mix and match. Using the font mixin will allow you to apply; size, weight, spacing, and height, but you can also use the constituent mixins directly for custom styling.

.unique-header-variation {
	@include font(h2);
	@include font-weight(h3);
}

This makes it easy to style multiple elements in combination for further custom styling while keeping everything consistent.

Documentation

Browse our SassDoc documentation here to learn more about Fabric.

Author

Fabric is a work of our contributors and is generously sponsored by Flickerbox.

Contributing

We welcome feedback and pull requests! See our contributing guide for details.