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

unify-css

v1.0.0

Published

CSS 初始化样式表 — 保留有用默认样式,修复浏览器不一致性,使各浏览器表现更接近。基于 Eric Meyer's reset.css 改进,适配现代 HTML5 元素

Readme

CSS 初始化样式表

保留有用默认样式,修复浏览器不一致性,使各浏览器表现更接近。

基于 Eric Meyer's reset.css 改进,适配现代 HTML5 元素。 提供 css/sass/less 三种格式,兼容 PostCSS、webpack、Vite 等主流工具链。

安装

# npm
npm install unify-css

# yarn
yarn add unify-css

# pnpm
pnpm add unify-css

使用方式

HTML

<link rel="stylesheet" href="/path/to/unify-css/reset.css" />

CSS

@import '/path/to/unify-css/reset.css';

PostCSS and postcss-import

@import 'unify-css';

Webpack and css-loader

import 'unify-css';

Sass

@import '/path/to/unify-css/sass/reset';

Less

@import '/path/to/unify-css/less/reset';

浏览器对 font: inherit; 的支持

| 浏览器 | 对 font: inherit; 的支持 | | ---------- | -------------------------- | | IE6 / IE7 | ❌ 不支持或部分支持 | | IE8 | ⚠️ 支持有限 | | 现代浏览器 | ✅ 完全支持 |

reset.css 解读

.el {
	margin: 0;
	padding: 0;
	border: 0; /* 为什么不使用 border: none; 因为在重置 table 边框时,可能仍显示边框⚠️ */
	font: inherit; /* 统一继承所有字体属性 */
	vertical-align: baseline;
}
/* 补充:表单元素特殊处理 */
button, input, select, textarea {
  background: transparent;   /* 移除非必要背景 */
  outline: none;             /* 移除默认轮廓,后续用 focus 自定义 */
  box-sizing: border-box;    /* 推荐加上,确保盒模型一致 */
}

与 reset-css 的差别

在原版 Eric Meyer's reset.css 基础上做了以下调整:

  • 移除 HTML5 已弃用的元素:appletacronymcenterbigstrikett
  • 新增 HTML5 语义元素支持:maindatalistcolgroupmapmeteroptgroupselectbuttoninputtextareaprogress
  • 新增 表单元素特殊处理:重置 backgroundoutline,统一 box-sizing

参考