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

scssfold

v0.2.0

Published

A utility based scaffolding library written in SCSS

Downloads

2

Readme

Scssfold

npm node downloads contributors install-size PR's welcome

What is Scssfold?

This repository is a work in progress

Scssfold is a small utility-first CSS framework. Its purpose is to deliver reusable media-width aware utility classes, which speeds up the scaffolding process when developing user interfaces.

Requirements

  • NPM
  • Ability to compile SCSS

Due to the nature of how this framework works, it will increase the size of your final build dramatically. To circumvent this caveat, it is recommended that you purge any unused classes using purgecss.

Installation

Install the package

Start by installing the package using either NPM or Yarn as specified below.

$ yarn add scssfold
$ npm install scssfold --save

Include the package

Include the package by importing it in either a JavaScript or SCSS file. We recommend that you import the package in an SCSS file, since that enables you to customize the framework to your needs.

Basic (all modules)

Importing the base module will give you all the modules specified in the Modules section:

@import '~scssfold';

Select modules

In case you wish to import only a select number of the modules specified in the Modules section, you can target them directly as specified below.

@import '~scssfold/src/modules/spacing/margins';
@import '~scssfold/src/modules/spacing/paddings';

Responsiveness

All classes listed in the Modules section below can be prefixed with breakpoints, making them active only once the width of the browser matches the given breakpoint.

If for example, we wanted to use the flex class, but we'd only want it to be applied on screens that are equal to or greater than the md breakpoint, we can use it as such:

Take for example the below HTML. We apply the flex class, determining that the items should flex on the horizontal axis:

<div class="flex">
  <p>Item 1</p>
  <p>Item 2</p>
  <p>Item 3</p>
</div>

But what if we wanted the display: flex styling only to apply to screens that are equal to or greater than the md breakpoint? We could write it as such:

<div class="md:flex">
  <p>Item 1</p>
  <p>Item 2</p>
  <p>Item 3</p>
</div>

This applies to all classes delivered by Scssfold. Very convenient and yes - heavily inspired by Tailwind CSS.

Modules

Flex

Layout

Position

Reset

Spacing

Visibility

Borders

Why Scssfold?

I initially wrote this framework for myself, but chose to make it public for others to use. I've always been a fan of the BEM methodology. However, over the years, it became more and more clear to me that BEM is not an all-or-nothing approach. Sticking to the BEM methodology strictly resulted in a lot of repetitive CSS, which had both performance and development drawbacks. This framework aims to solve the issue of writing the rough layout of an application; spacings, columns, containers etc. - responsively.

I still use BEM for component styling but try to make components as context-unaware as possible, meaning they have no impact on the layout outside of the component. This makes them more reusable and contributes to a cleaner and more maintainable codebase.