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 🙏

© 2026 – Pkg Stats / Ryan Hefner

@sil/themer

v0.6.3

Published

Sass Variable Theming

Readme

Themer

Themer can help you themifying your css.

Install

npm install @sil/themer

Usage

In your global CSS file.

@import "@sil/themer/app";

In a component file, this version does come with all the functions, but without any output.

@import "@sil/themer/use";

Customizing

In order to use custom settings, colors or anything. You have to create a themer.json file in the root of your project. The root file can/should contain these custom settings.

Example themer.json:

{
  "colors": {
    "background": "#ffffff",
    "foreground": "#111111",
    "primary": "#01eeff",
    "secondary": "#f7166c",
    "tertiary": "#6a2ef7"
  },
  "settings": {
    "prefix": "my-project",
  }
}

When the root file is created, you run ```npx @sil/themer initin your project. This will create atheme.scssfile in thesrc/style` folder.

:::warning This will override any existing file, if the folder doesn't exist, it will be created. If you want the file anywhere else, you will have to move the file manually. :::

:::info If you make changes to the themer.json, you will have to re-run the script. :::

When the theme.scss file is created, you have to add import it to your file'

@import "theme.scss";
@import "@sil/themer/app"; // or -> @import "sil/themer/use";

:::tip for components, create one file which includes the use and the theme at once. This file can be included again in all your components. :::

All settings have been split up into; settings, base, colors and typography.

Settings

| key | value | | --------------- | ---------------------- | | prefix | "" | | colorsModes | true | | colorsSteps | 10, 25, 50, 75, 90 | | colorsShades | true | | colorText | true | | breakpointNames | small, medium, large | | breakpointSizes | 0, 720, 1200 |

Base

| key | value | | ------------ | -------------------------------- | | borderRadius | 1em | | shadow | 0 3px 4px 0 rgba(0, 0, 0, 0.1) | | space | 1em | | transition | 0.3s ease-in-out |

Colors

| key | value | | ---------- | --------- | | background | #ffffff | | foreground | #111111 | | primary | #01eeff | | secondary | #f7166c | | tertiary | #6a2ef7 | | caution | #fed02f | | warning | #fd8324 | | error | #fc1b1c | | info | #7abffc | | success | #54d577 |

Base

| key | value | | ------------ | -------------------------------- | | borderRadius | 1em | | shadow | 0 3px 4px 0 rgba(0, 0, 0, 0.1) | | space | 1em | | transition | 0.3s ease-in-out |

Settings

By default all defined code will be outputed, but if you don't need the color shades, or automatic text colors. You can also disable this.

$theme-settings: (
  prefix: "my-project",
);

@import "@sil/themer/app";

Functions & Mixins

Variable

Variable is the main function of themer, variable will help you create the custom properties automatically based on the information given. It will determine if the value given has a default and automatically add these defaults.

tip: You can also just use v instead of variable

input

// $theme-settings: ( prefix: 'myProject' );

.example {
  background-color: v(backgroundColor, primary);
  color: v(Color, foreground);
  top: 0;
}

output

.example {
  background-color: var(
    --my-project-example-background-color,
    var(--my-project-primary, #ff9900)
  );
  color: var(--my-project-example-color, var(--my-project-foreground, #ffffff));
  top: 0;
}

Property

To make it even easier and faster, there is the property mixin. The property mixin will automatically determine which property will have custom property and create the custom properties based on it's parent class and the prefix determined in settings.

input

// $theme-settings: ( prefix: 'myProject' );

.example {
  @include property(
    (
      background-color: background,
      color: foreground,
      top: 0,
    )
  );
}

output

.example {
  background-color: var(
    --my-project-example-background-color,
    var(--my-project-background, #ffffff)
  );
  color: var(--my-project-example-color, var(--my-project-foreground, #ffffff));
  top: 0;
}

CustomProperties

The custom properties mixin creates a list of custom properties based on the settings provided. The CustomProperties is an internal mixin which is used in the app file to create all the defaults.

input

// $theme-settings: ( prefix: 'myProject' );

// Default theme base
$base: (
  borderRadius: 1em,
  shadow: 0 3px 4px 0 rgba(0, 0, 0, 0.1),
  space: 1em,
  transition: 0.3s ease-in-out,
);

:root {
  @include customProperties($base);
}

output

:root {
  --my-project-border-radius: 1em;
  --my-project-shadow: 0 3px 4px 0 rgba(0, 0, 0, 0.1);
  --my-project-space: 1em;
  --my-project-transition: 0.3s ease-in-out;
}

[gist=2d9aff65094156a9f52f67594e8000d0]