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

spysass

v0.13.0

Published

SASS from Bitmill

Downloads

2

Readme

SpySASS

SASS from The Code Bureau

Usage

Either install with npm or bower, or clone the repo. Then simply add the sass directory from the repo to the includePath option in sass.

To start using it, you always need to import _spysass.scss file first. This file only contains functions to load modules.

Example:

@import "spysass";

@import "variables";
@import "variables-spysass";

@import "components/reset";
@import "components/base";
@import "mixins/text";
@import "themes/spytext/niknus";

Vendor Prefixes

SpySASS has no CSS3 mixins, instead it is recommended to use Autoprefixer (or similar) to handle all vendor prefixes.

Functional Programming

SpySASS tries to apply "functional programming" paradigms. This mainly means all mixins and functions avoid changing state and mutating data, but also avoids using $variables from an external scope.

The only functions allowed to deviate from this paradigm are em() and rem() (from units) which uses the $base-font-size as $base-value if it is not provided.

Mixins

Flex-Grid

Sample: http://codepen.io/lohfu/pen/reEeJa

Modules (CAUTION: The Modules Are Being Deprecated)

SpySASS is built around modules and module files. As such, ALL SCSS files (except _spysass.scss) in SpySASS are module files. A module file is simply a file structured a specific way, containing two special SpySASS functions (load-module() & register-module()) and a certain type of entity. Entities should NOT be mixed, only one type of entity per module file.

The load-module($module-name, $module-type) function takes two parameters, the module name and the module type. The function will check if the module has already been loaded. If the module has not been loaded, the function returns true and all code in the module file is executed, at the end of which the register-module() function is called. If the module has already been loaded, load-module() returns false and nothing is done.

There are currently 4 types of module files:

  1. Functions
  2. Mixins
  3. Components
  4. Themes

Module Definition

@if load-module('text', 'mixins') {
	// All imorts
	@import "functions/one";
	@import "mixins/one";

	// All module code

	$tmp: register-module();
}

print-modules()

If you want to print all loaded modules, simply add the following to the end of your main SCSS file:

@warn modules()

Module Types

Functions

Functions should in general not use variables defined outside of its scope.

Function module files do not generate any code.

Mixins

Mixins should in general not use variables defined outside of its scope.

Mixin module files do not generate any code unless one of its mixins are called.

Components

Components generate CSS, but do not register any new functions or mixins.

Themes

Themes are essentially packages of components. Themes should be complete CSS for a site or type of HTML (eg. forms).