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

reset-zone

v3.2.1

Published

A modern CSS reset for modern web applications!

Readme

reset-zone

reset-zone is a lightweight CSS reset designed to provide a consistent starting point for web projects. This CSS reset resets browser styling and removes default margins, padding, and other styles, giving you full control over the appearance of your elements across all major browsers.

Table of Contents

Installation

You can easily add reset-zone to your project via npm or directly include it in your HTML.

via npm:

npm install reset-zone

Or using yarn:

yarn add reset-zone

Usage

After installation via NPM or Yarn, you can use reset-zone in multiple ways depending on your project setup. The package provides both SCSS source files and compiled CSS files.

Available Files

The package includes the following files:

  • SCSS Source: index.scss - Main entry point with mixins
  • Compiled CSS (Regular): dist/reset-zone.regular.css - Standard reset without CSS layers
  • Compiled CSS (Layer): dist/reset-zone.layer.css - Reset wrapped in a CSS layer
  • Minified versions: dist/reset-zone.regular.min.css and dist/reset-zone.layer.min.css

Using SCSS Source Files (Recommended)

If you're using SCSS/Sass in your project, import the package and use the provided mixins:

@use "reset-zone" as *;

// Option 1: Regular version (no CSS layers)
@include rz();

// Option 2: Layer version (wrapped in a CSS layer)
@include rz-layer();

// Option 3: Custom layer name
@include rz-layer("my-custom-layer");

Note: When using @use with NPM packages, most modern build tools (Vite, Webpack with sass-loader, etc.) will automatically resolve node_modules/reset-zone/index.scss.

SCSS Configuration for Different Build Tools

Vite (vite.config.js):

export default {
  css: {
    preprocessorOptions: {
      scss: {
        includePaths: ['node_modules']
      }
    }
  }
}

Webpack with sass-loader (webpack.config.js):

module.exports = {
  module: {
    rules: [
      {
        test: /\.scss$/,
        use: [
          'style-loader',
          'css-loader',
          {
            loader: 'sass-loader',
            options: {
              sassOptions: {
                includePaths: ['node_modules']
              }
            }
          }
        ]
      }
    ]
  }
}

**Next.js** - No additional configuration needed, just import in your global SCSS file.

**Sass CLI** - When using the Sass command-line compiler directly, you need to specify the load path:
```bash
# Watch mode
sass --load-path=node_modules ./src/styles.scss:dist/styles.css --watch

# Single compilation
sass --load-path=node_modules ./src/styles.scss:dist/styles.css

Or add it to your package.json scripts:

{
  "scripts": {
    "sass:watch": "sass --load-path=node_modules ./src/styles.scss:dist/styles.css --watch",
    "sass:build": "sass --load-path=node_modules ./src/styles.scss:dist/styles.css"
  }
}

Using Compiled CSS Files

If you prefer to use the compiled CSS files directly:

In JavaScript/TypeScript

// Regular version
import 'reset-zone/dist/reset-zone.regular.css';

// Or layer version
import 'reset-zone/dist/reset-zone.layer.css';

// Or minified versions for production
import 'reset-zone/dist/reset-zone.regular.min.css';

In HTML

<!-- Regular version -->
<link rel="stylesheet" href="node_modules/reset-zone/dist/reset-zone.regular.css">

<!-- Or layer version -->
<link rel="stylesheet" href="node_modules/reset-zone/dist/reset-zone.layer.css">

In CSS

/* Regular version */
@import 'reset-zone/dist/reset-zone.regular.css';

/* Or layer version */
@import 'reset-zone/dist/reset-zone.layer.css';

Understanding CSS Layers

The layer version wraps all reset styles in a CSS @layer, which provides better control over CSS cascade and specificity. This is particularly useful when you want to ensure your custom styles can easily override the reset.

Benefits of using the layer version:

  • Better cascade control - layer styles have lower priority than unlayered styles
  • Easier to override reset styles without increasing specificity
  • Modern approach to managing CSS architecture

Example with custom layer name:

@use "reset-zone" as *;

// Create a reset layer that can be overridden easily
@include rz-layer("base");

// Your custom styles (unlayered) will automatically have higher priority
body {
  margin: 1rem; // This will override the reset's margin: 0
}

For more information about CSS layers, see the MDN documentation.

Which Version Should I Use?

  • Use SCSS source if you're already using SCSS/Sass in your project (recommended for maximum flexibility)
  • Use compiled CSS if you're not using a CSS preprocessor or want to minimize build complexity
  • Use layer version if you want better cascade control and easier style overrides
  • Use regular version if you need broader browser support or don't need CSS layers
  • Use minified versions in production for smaller file sizes

Features

  • Removes Default Margins and Padding: Strips away all default browser styles, including margins and paddings, to create a level playing field.
  • Consistent Typography: Sets up base font styles, including font size and line height.
  • Improved Accessibility: Sets a clear focus outline and maintains usability for keyboard navigation.
  • Enhanced Layout Control: Reduces browser-specific quirks that interfere with layout styling, such as box-sizing.

Contributing

Contributions, issues, and feature requests are welcome! Please feel free to open an issue or submit a pull request in the GitHub repository or read the CONTRIBUTING.md

License

This project is licensed under the MIT License. See the LICENSE.md file for more details. So, enjoy a consistent and clean starting point with reset-zone!