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

@ravorona/utils-scss

v3.0.0

Published

SCSS utility library to set up stylesheets for new projects following industry best practices.

Readme

SCSS Utils

A design system utility library to set up SCSS stylesheets for new projects following industry best practices.

Features

  • Token-driven design with SCSS variables for colors, spacing, typography, and breakpoints
  • CSS custom properties layer for runtime theming and overrides
  • Light/dark mode support via prefers-color-scheme with smooth transitions
  • Modular layered architecture (tokens → css-vars → themes → base → components → utilities)
  • Mobile-first responsive design with custom media queries (xs, sm, md, lg, xl, hi)
  • SCSS utility functions: rem(), spacer(), str-replace(), strip-units()
  • SCSS mixins: container, grid, font-face, typography
  • PostCSS integration: custom media queries, autoprefixer, inline SVG support
  • CSS normalize/reset layer
  • Respects prefers-reduced-motion for accessibility

Quick Start

From your project directory:

# Install scss stylesheets
npx @ravorona/utils-scss

# Install scss stylesheets in a custom directory
npx @ravorona/utils-scss --destination myFolder

# Overwrite an existing destination folder (destructive)
npx @ravorona/utils-scss --destination myFolder --force

# Skip copying postcss.config.mjs
npx @ravorona/utils-scss --no-postcss

Architecture

This library follows a layered design system architecture:

base/                → Base HTML element styles (document, typography, media)
components/          → UI component styles (optional)
  ├── guide/         → Layout guide / debug overlay component
  └── media/         → Media component styles
config/              → PostCSS custom media queries
css-vars/            → CSS custom properties (colors, typography, spacing, grid)
fonts/               → Font face declarations
reset/               → CSS normalize/reset
themes/              → Theme switching logic (light/dark mode support)
tokens/              → Design tokens (colors, spacing, typography, breakpoints, semantic colors)
utilities/           → Helper classes and mixins (optional)
  ├── functions/     → SCSS functions (rem, spacer, str-replace, strip-units)
  └── mixins/        → SCSS mixins (container, font-face, grid, typography)
vendors/             → Third-party styles (optional)

Requirements

Required

  • Sass - SCSS compilation support

Optional (for PostCSS features)

If you want to use PostCSS preprocessor features (custom media queries, SVG inlining, etc.), install these dependencies:

A postcss.config.mjs file is copied into your project automatically unless --no-postcss is passed.

Project Structure

Config Layer

Defines PostCSS @custom-media queries consumed by the rest of the system:

  • --xs / --sm / --md / --lg / --xl / --hi - Min-width breakpoints
  • --landscape / --portrait - Orientation queries
  • --scheme-light / --scheme-dark - Color scheme queries
  • --motion-safe / --motion-reduce - Motion preference queries
  • --hover / --no-hover - Pointer hover capability queries

Design Tokens

Raw design values as SCSS variables, organized by type:

  • _colors.scss - Gray color palette ($gray-50$gray-900)
  • _semantic-colors.scss - Reserved for semantic color mappings (light/dark theme tokens)
  • _typography.scss - Font weights ($font-weight-thin$font-weight-black) and base font size ($font-size: 16)
  • _spacing.scss - 8px-based spacing scale ($spacing-base, $spacing map: 0–128px)
  • _breakpoints.scss - Breakpoint values ($breakpoints map: xs 360px … hi 1440px)

CSS Variables Layer

Transforms design tokens into runtime-configurable CSS custom properties:

  • _colors.scss - --color-gray-50--color-gray-900
  • _global.scss - --line-height
  • _typography.scss - --font-family-sans-serif, --font-family-serif, --font-size-default, --font-weight-*
  • _spacing.scss - --spacing-0--spacing-16
  • _grid.scss - --grid-max, --grid-gap, --grid-size (responsive, updates at --md, --lg, --xl)

Themes Layer

  • _color-schemes.scss - Sets color-scheme: light dark on :root; provides .theme-light and .theme-dark utility classes

Base Layer

Opinionated defaults for HTML elements:

  • _document.scss - HTML and body defaults
  • _typography.scss - Heading and text element styles
  • _media.scss - Image, SVG, and video defaults

Best Practices

  1. Use semantic colors - Prefer --color-background over raw color values
  2. Leverage the spacing scale - Use --spacing-1 (8px), --spacing-2 (16px), etc. for consistent spacing
  3. Respect user preferences - The system respects prefers-color-scheme and prefers-reduced-motion
  4. Mobile-first - Use min-width breakpoints via @media (--xs), @media (--sm), @media (--md), etc.
  5. Provide fallbacks - Always include fallback values: var(--color-background, #f9fafb)

License

MIT © яαvoroηα