
Security News
npm ‘is’ Package Hijacked in Expanding Supply Chain Attack
The ongoing npm phishing campaign escalates as attackers hijack the popular 'is' package, embedding malware in multiple versions.
modern-normalize
Advanced tools
The modern-normalize npm package is a modern CSS reset that helps to make built-in browser styling consistent across different browsers. It is a modern alternative to the traditional normalize.css, providing a more up-to-date approach to CSS normalization.
CSS Reset
This feature allows you to import the modern-normalize CSS reset into your project, ensuring that your styles are consistent across different browsers.
/* Import modern-normalize in your CSS file */
@import 'modern-normalize';
Consistent Box Sizing
This feature ensures that the box-sizing property is set to border-box for all elements, making it easier to manage layouts and avoid unexpected behavior.
/* Example of consistent box sizing */
* {
box-sizing: border-box;
}
Improved Typography
This feature sets a consistent line-height and font-family for the body element, improving the readability and appearance of text across different browsers.
/* Example of improved typography */
body {
line-height: 1.5;
font-family: system-ui, sans-serif;
}
normalize.css is a popular CSS reset library that makes built-in browser styling consistent across different browsers. It is the predecessor to modern-normalize and provides a more traditional approach to CSS normalization.
reset-css is another CSS reset library that provides a minimalistic approach to resetting default browser styles. It is less comprehensive than modern-normalize but can be useful for projects that require a simpler reset.
sanitize.css is a CSS library that provides both a reset and a set of base styles for consistent and clean default styling across browsers. It offers more features than modern-normalize, including additional base styles for common HTML elements.
normalize.css
box-sizing: border-box
If you have questions about the source, check out the original source and this for details.
The goal of this project is to make itself obsolete.
npm install modern-normalize
@import 'node_modules/modern-normalize/modern-normalize.css';
or
<link rel="stylesheet" href="node_modules/modern-normalize/modern-normalize.css">
There's absolutely no reason to have separate ports for these. They are just CSS supersets and can import CSS directly.
FAQs
Normalize browsers' default style
The npm package modern-normalize receives a total of 253,418 weekly downloads. As such, modern-normalize popularity was classified as popular.
We found that modern-normalize demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
The ongoing npm phishing campaign escalates as attackers hijack the popular 'is' package, embedding malware in multiple versions.
Security News
A critical flaw in the popular npm form-data package could allow HTTP parameter pollution, affecting millions of projects until patched versions are adopted.
Security News
Bun 1.2.19 introduces isolated installs for smoother monorepo workflows, along with performance boosts, new tooling, and key compatibility fixes.