csstools/sanitize.css

A best-practices CSS foundation

View on GitHub ↗Jump to charts ↓

Summary Information

Updated 35 minutes ago
Added to GitGenius on September 12th, 2026
Created on November 6th, 2012
Open Issues & Pull Requests: 22 (+0)
GitHub issues: Enabled
Number of forks: 299
Total Stargazers: 5,307 (+0)
Total Subscribers: 136 (+0)

Repository Insights (GitGenius)

Median issue/PR response: 869.0 days
Mean response time: 869.0 days
90th percentile: 869.0 days
Tracked items: 1

Most active contributors

Sign in to see contributor activity.

Charts & Analytics

Fetching additional details & charts...

Issue Activity (beta)

Open issues: 7
New in 7 days: 0
Closed in 7 days: 0
Avg open age: 735 days
Stale 30+ days: 7
Stale 90+ days: 7

Recent activity

Opened in 7 days: 0
Closed in 7 days: 0
Comments in 7 days: 0
Events in 7 days: 0

Top labels

No label distribution available yet.

Most active issues this week

No issue events were indexed in the last 7 days.

Detailed Description

sanitize.css is a CSS library that provides consistent, cross-browser default styling of HTML elements alongside useful defaults.

The tool solves the problem of inconsistent browser rendering and missing sensible defaults for HTML elements. It normalizes styles across browsers while also applying opinionated improvements that align with common developer expectations rather than strict CSS specifications. The library wraps all styles in zero-specificity selectors using :where(), which means the rules can be easily overridden without requiring high specificity in your own stylesheets. sanitize.css is developed in parallel with normalize.css, ensuring every normalization is included while clearly marking which rules are normalizations versus opinions.

Developers should choose sanitize.css over normalize.css if they prefer opinionated defaults that go beyond specification compliance—such as border-box sizing, comfortable line heights, and sensible cursor behavior. The tool suits projects where you want a foundation that handles common styling concerns out of the box rather than starting from a minimal baseline. The project provides modular stylesheets for specific concerns: a forms stylesheet for normalizing form controls, a typography stylesheet using system interface fonts, an assets stylesheet for document measure, a reduce-motion stylesheet for accessibility, and separate stylesheets for system-ui and ui-monospace font support. Unlike reset.css, which removes all styling, sanitize.css maintains browser normalizations while adding developer-friendly defaults.

The project maintains active synchronization with normalize.css to ensure normalizations stay current. Development includes detailed inline documentation explaining what each rule does and why. The tool supports a wide range of browsers including recent versions of Chrome, Edge, Firefox, Safari, and Opera, as well as Internet Explorer 9 and later.