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 🙏

© 2025 – Pkg Stats / Ryan Hefner

wusd-scss

v2.0.1

Published

scss tools

Readme

Usage

Install:

npm install wusd-scss -S

Once the package is installed, you can import the library using @import / @use

@use 'wusd-scss' as ws;

If your project build by webpack, you can add the following configuration:

module.exports = {
  module: {
    rules: [
      {
        test: /\.s[ac]ss$/i,
        use: [
          "style-loader",
          "css-loader",
          {
            loader: "sass-loader",
            options: {
              additionalData: "@use 'wusd-scss' as ws;\r\n",
            },
          },
        ],
      },
    ],
  },
}

or vite config:

// vite.config.js
export default defineConfig({
  css: {
    preprocessorOptions: {
      scss: {
        quietDeps: true,
        additionalData: "@use 'wusd-scss' as ws;\r\n"
      }
    }
  },
})

Modify Default Configuration

You can use @forward to change config

// resetWusdScss.wcss:
@forward 'wusd-scss' with (
  // all base color, 
  $colors_map: (
    primary: (
      base: #6634E2,
    ),
    success: (
      base: #28C76F,
    ),
    warning: (
      base: #ff9c0e,
    ),
    danger: (
      base: #e82205,
    ),
    info: (
      base: #909399,
    ),
  ),
  $btn_options: (
    // btn radius
    radius: 6px,
    // btn box inline or block
    inline: true,
    // btn padding
    padding: 0.5em 1.2em,
    press: (
      // mask element at press. ::after or ::before
      el: after,
      color: #fff,
      opacity: 0.3,
    ),
  ),
  $card_options: (
    // card radius
    radius: 12px,
    // card padding
    padding: 10px,
    // card background color
    bgc: #fff,
    // card shadow
    shadow: 1px 1px 5px 5px #f1f1f1,
  ),
  $cell_options: (
    label_width: 80px,
    // gap between label & value box
    gap: 10px,
    // border bottom
    border: 1px solid #f1f1f1,
  ),
  $form_item_options: (
    label_width: 80px,
    align: left,
    border: 1px solid #fefefe,
  )
);
// vite.config.ts
export default defineConfig({
  css: {
    preprocessorOptions: {
      scss: {
        // Close Warning
        quietDeps: true,
        additionalData: "@use 'resetWusdScss.scss' as ws;\r\n"
      }
    }
  },
})

Then you can use light or dark primary color 1 to 9:

body {
  color: $color_primary;
  color: $color_primary_light_1;
  color: $color_primary_dark_1;
}

Close Warning

Deprecation Warning [mixed-decls]: Sass's behavior for declarations that appear after nested rules will be changing to match the behavior specified by CSS in an upcoming version. To keep the existing behavior, move the declaration above the nested rule. To opt into the new behavior, wrap the declaration in `& {}`.
// vite.config.ts
export default defineConfig({
  css: {
    preprocessorOptions: {
      scss: {
        // close warning
        quietDeps: true,
      }
    }
  },
})

Colors

| name | color | | ------- | ------- | | primary | | | success | | | warning | | | danger | | | info | |

Mixins

btn

div {
  @include ws.btn((
    type: primary,
    radius: 5px,
    plain: true,
    inline: true,
    padding: 10px,
  ));
}

card

div {
  @include ws.card((
    radius: 12px,
    padding: 10px,
    bgc: #fff,
    shadow: 1px 1px 5px 5px #fefefe,
  ));
}

cell

div {
  @include ws.cell((
    label_width: 80px,
    gap: 10px,
    border: 1px solid #fefefe,
  ));
}

clearfix

div {
  @include ws.clearfix();
}

flex

div {
  @include ws.flex((
    // values:  left(start)、center、right(end) 、between、around、evenly 
    x: left,
    // values:  top(start)、center、bottom(end)
    y: top,
    // values: x、y
    dir: x,
    inline: false,
    wrap: false,
    gap: 0,
  ));
}
div {
  @include ws.flex_self((
    grow: 0,
    shrink: 0,
    basis: auto,
  ))
}

cut_txt

cut text overflow to ...

div {
  @include ws.cut_txt(1);
}

form_item

div {
  @include ws.form_item((
    label_width: 80px,
    align: left,
    border: 1px solid #fefefe,
  ));
}

safe_area

div {
  @include ws.safe_area_top();
  @include ws.safe_area_bottom();
}

scrollbar

div {
  @include ws.scrollbar((hide: true));
}

un_select

make word unselect

div {
  @include ws.un_select();
}