🚀 Big News:Socket Has Acquired Secure Annex.Learn More →
Socket
Book a DemoSign in
Socket

@substrate-system/css-normalize

Package Overview
Dependencies
Maintainers
1
Versions
13
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@substrate-system/css-normalize

Normalize/reset CSS

latest
Source
npmnpm
Version
0.0.13
Version published
Weekly downloads
278
-34.28%
Maintainers
1
Weekly downloads
 
Created
Source

CSS normalize

semantic versioning Common Changelog install size dependencies license

Reset/normalize styles for a nice blank slate.

See joshcomeau.com/css/custom-css-reset

These days, browsers don't have massive discrepancies when it comes to layout or spacing. By and large, browsers implement the CSS specification faithfully, and things behave as you'd expect.

Featuring:

  • box-sizing: border-box; -- Sizes based on border-box, not content-box.
  • margin: 0 -- Remove default margin. Add margins as needed in application CSS.
  • line-height: calc(2px + 2ex + 2px); -- Dyslexia friendly line height.

[!NOTE]
You may want to override the line-height for headings in your application CSS. See this article for more info about line-height.

font is a rarely-used shorthand that sets a bunch of font-related properties, like font-size, font-weight, and font-family.

bonus

Contents

Install

npm i -S @substrate-system/css-normalize

Use

Reset

import '@substrate-system/css-normalize'

bundler

If you are a bundling your CSS, e.g. with vite, just import from this module in your javascript:

import '@susbtrate-system/css-normalize'
import '@substrate-system/css-normalize/stack'

Or import the minified CSS:

import '@substrate-system/css-normalize/min'

pre-bundled

This package includes minified CSS also.

  • Copy the CSS so it is accessible to your web server. The minified file is at dist/index.min.css.
cp node_modules/@substrate-system/css-normalize/dist/index.min.css ./public/normalize.css
  • Add a link in your HTML.
<head>
  <link rel="stylesheet" href="/normalize.css">
</head>

<!-- ... -->

CSS import

Import from this module in CSS:

@import url("../node_modules/@substrate-system/css-normalize/dist/index.min.css");

See also

Keywords

css

FAQs

Package last updated on 14 May 2025

Did you know?

Socket

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.

Install

Related posts