Top Related Projects
A modern alternative to CSS resets
A best-practices CSS foundation
🐒 Normalize browsers' default style
A drop-in collection of CSS styles to make simple websites just a little nicer
:cherry_blossom: a minimal css framework/theme.
CSS framework for dummies, without a single CSS class: nicely renders properly formatted HTML5 pages
Quick Overview
Minireset.css is a tiny modern CSS reset that covers the basics. It provides a minimal set of CSS rules to reset default browser styles, ensuring a consistent starting point for web projects. The library aims to be lightweight and unopinionated, allowing developers to build upon it easily.
Pros
- Extremely lightweight (only about 0.5KB gzipped)
- Modern approach, focusing on essential resets
- Easy to integrate and customize
- Maintained and updated regularly
Cons
- May not cover all edge cases or specific browser quirks
- Minimal styling, requiring additional CSS for most projects
- Might conflict with other CSS frameworks if not carefully integrated
- Limited browser support for older versions (IE11 and below)
Code Examples
- Resetting box-sizing for all elements:
html {
box-sizing: border-box;
}
*, *::before, *::after {
box-sizing: inherit;
}
- Removing default margins and paddings:
body,
h1,
h2,
h3,
h4,
h5,
h6,
p,
ol,
ul {
margin: 0;
padding: 0;
}
- Normalizing form elements:
input,
button,
textarea,
select {
font: inherit;
}
Getting Started
To use minireset.css in your project, follow these steps:
-
Install via npm:
npm install minireset.css
-
Import in your main CSS file:
@import 'minireset.css';
Or include in your HTML:
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/minireset.css@0.0.7/minireset.min.css">
-
Start building your styles on top of the reset!
Competitor Comparisons
A modern alternative to CSS resets
Pros of normalize.css
- More comprehensive browser consistency, addressing a wider range of default styles
- Preserves useful browser defaults rather than eliminating them entirely
- Extensively documented, explaining the reasoning behind each normalization
Cons of normalize.css
- Larger file size, potentially impacting page load times
- May require additional resets or overrides for specific project needs
- More complex, which can make customization more challenging
Code Comparison
normalize.css:
html {
line-height: 1.15;
-webkit-text-size-adjust: 100%;
}
body {
margin: 0;
}
minireset.css:
html,
body,
p,
ol,
ul,
li {
margin: 0;
padding: 0;
}
normalize.css focuses on normalizing specific elements and properties across browsers, while minireset.css takes a more aggressive approach by resetting margins, paddings, and other properties to zero for many elements.
normalize.css aims to maintain useful defaults and correct inconsistencies, whereas minireset.css provides a clean slate for developers to build upon. The choice between the two depends on project requirements, desired level of control, and preference for preserving or resetting browser defaults.
A best-practices CSS foundation
Pros of sanitize.css
- More comprehensive normalization, addressing a wider range of browser inconsistencies
- Includes modern CSS features and normalizations for newer HTML5 elements
- Actively maintained with regular updates and improvements
Cons of sanitize.css
- Larger file size, which may impact page load times slightly
- More opinionated styling choices, which might require additional overrides
- Steeper learning curve due to its more extensive feature set
Code Comparison
sanitize.css:
*, ::before, ::after {
box-sizing: border-box;
}
html {
cursor: default;
line-height: 1.5;
-moz-tab-size: 4;
tab-size: 4;
-webkit-tap-highlight-color: transparent;
}
minireset.css:
html,
body,
p,
ol,
ul,
li,
dl,
dt,
dd,
blockquote,
figure,
fieldset,
legend,
textarea,
pre,
iframe,
hr,
h1,
h2,
h3,
h4,
h5,
h6 {
margin: 0;
padding: 0;
}
The code comparison shows that sanitize.css focuses on setting default styles and addressing specific browser inconsistencies, while minireset.css takes a more aggressive approach by removing margins and paddings from a wide range of elements.
🐒 Normalize browsers' default style
Pros of modern-normalize
- More comprehensive browser compatibility, including newer browsers and mobile
- Preserves useful default styles while normalizing inconsistencies
- Actively maintained with regular updates
Cons of modern-normalize
- Slightly larger file size due to more comprehensive coverage
- May require additional customization for specific project needs
- Less opinionated approach, which might not suit all developers
Code Comparison
modern-normalize:
html {
line-height: 1.15;
-webkit-text-size-adjust: 100%;
}
body {
margin: 0;
}
minireset.css:
html,
body,
p,
ol,
ul,
li {
margin: 0;
padding: 0;
}
modern-normalize focuses on normalizing browser inconsistencies while preserving useful defaults, whereas minireset.css takes a more aggressive approach by resetting many elements to a blank slate.
modern-normalize is better suited for projects requiring broader browser support and a less opinionated starting point. It's ideal for developers who want to build upon existing browser defaults while ensuring consistency across different environments.
minireset.css is more appropriate for projects where developers prefer a minimal starting point and want to define their own styles from scratch. It's lighter and more straightforward but may require more initial styling work.
The choice between the two depends on the project's specific requirements, target browsers, and the developer's preferred approach to CSS normalization and resetting.
A drop-in collection of CSS styles to make simple websites just a little nicer
Pros of Water.css
- Provides a complete set of styles for common HTML elements, creating a cohesive design
- Offers dark mode support out of the box
- Includes responsive design features for better mobile compatibility
Cons of Water.css
- Larger file size due to more comprehensive styling
- Less customizable, as it applies opinionated styles to many elements
- May require overriding styles for specific design needs
Code Comparison
Minireset.css:
html,
body,
p,
ol,
ul,
li,
dl,
dt,
dd,
blockquote,
figure,
fieldset,
legend,
textarea,
pre,
iframe,
hr,
h1,
h2,
h3,
h4,
h5,
h6 {
margin: 0;
padding: 0;
}
Water.css:
body {
font-family: system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Roboto', 'Oxygen', 'Ubuntu', 'Cantarell', 'Fira Sans', 'Droid Sans', 'Helvetica Neue', sans-serif;
line-height: 1.4;
max-width: 800px;
margin: 20px auto;
padding: 0 10px;
color: #363636;
background: #ffffff;
text-rendering: optimizeLegibility;
}
Minireset.css focuses on resetting default styles, while Water.css provides a complete styling solution with opinionated defaults. Minireset.css offers more flexibility for custom designs, while Water.css provides a quick way to create a visually appealing website with minimal effort.
:cherry_blossom: a minimal css framework/theme.
Pros of Sakura
- Provides a complete classless CSS framework for quick, elegant styling
- Offers a more opinionated design with pre-styled elements
- Includes responsive design and dark mode support out of the box
Cons of Sakura
- Larger file size due to more comprehensive styling
- Less flexibility for custom designs without overriding styles
- May require additional effort to integrate with existing projects
Code Comparison
Sakura:
body {
font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, "Noto Sans", sans-serif;
line-height: 1.8;
max-width: 38em;
margin: auto;
color: #4a4a4a;
background-color: #f9f9f9;
padding: 13px;
}
minireset.css:
html,
body,
p,
ol,
ul,
li,
dl,
dt,
dd,
blockquote,
figure,
fieldset,
legend,
textarea,
pre,
iframe,
hr,
h1,
h2,
h3,
h4,
h5,
h6 {
margin: 0;
padding: 0;
}
Sakura provides a more complete styling solution with specific font choices and layout settings, while minireset.css focuses on resetting default browser styles for a clean slate.
CSS framework for dummies, without a single CSS class: nicely renders properly formatted HTML5 pages
Pros of Tacit
- Provides a complete CSS framework with pre-styled elements
- Offers a more opinionated design, suitable for quick prototyping
- Includes responsive design features out of the box
Cons of Tacit
- Larger file size due to more comprehensive styling
- Less flexibility for custom designs without overriding styles
- May require more effort to integrate with existing projects
Code Comparison
Tacit (sample):
body {
font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
line-height: 1.6;
color: #566b78;
}
Minireset.css (sample):
html,
body,
p,
ol,
ul,
li {
margin: 0;
padding: 0;
}
Tacit provides more opinionated styling, while Minireset.css focuses on resetting default browser styles. Tacit's approach results in a larger codebase but offers a more complete out-of-the-box solution. Minireset.css provides a minimal reset, allowing for more flexibility in custom designs but requiring additional styling for a complete look.
Convert designs to code with AI
Introducing Visual Copilot: A new AI model to turn Figma designs to high quality code using your components.
Try Visual CopilotREADME
minireset.css
A tiny modern CSS reset that covers the basics:
- resets the font sizes: so that using semantic markup doesn't affect the styling
- resets the block margins: so that the spacing is only applied when you need it
- resets tables: so that tabular data only takes the space it needs
- preserves the inline paddings: so that buttons and inputs keep their default layout
- sets the border-box box sizing: so that borders and paddings don't affect the set dimensions
- sets responsive media elements: so that images and embeds scale with the browser width
Download/Install
npm install minireset.css
Or clone the repo.
Options
It will be available in your modules directory in /node_modules/minireset.css/
:
minireset.css
: CSS rulesminireset.min.css
: minified CSS rules (recommended for production sites)minireet.sass
: CSS rules written in SASS (recommended for SCSS/SASS projects)minireset.css.lit.js
: CSS rules exported as aCSSResult
object for LitElement projects (recommended for Web Component projects based on LitElement)
CDN
GitHub CDN for minireset.min.css
Copyright and license
Code copyright 2019 Jeremy Thomas. Code released under the MIT license.
Top Related Projects
A modern alternative to CSS resets
A best-practices CSS foundation
🐒 Normalize browsers' default style
A drop-in collection of CSS styles to make simple websites just a little nicer
:cherry_blossom: a minimal css framework/theme.
CSS framework for dummies, without a single CSS class: nicely renders properly formatted HTML5 pages
Convert designs to code with AI
Introducing Visual Copilot: A new AI model to turn Figma designs to high quality code using your components.
Try Visual Copilot