1.11.2 • Published 6 months ago

the-new-css-reset v1.11.2

Weekly downloads
-
License
MIT
Repository
github
Last release
6 months ago

⏪ The New CSS Reset

A package that resets some of the default, user agent based, styles.

It doesn't affect the display property and special HTML elements like iframe, canvas, img, svg and video.

This package is using the new CSS features:

  • The global CSS reset keywords, unset and revert keywords.
  • The new property of all which can reset all properties combined.
  • The :where() pseudo-class to remove specificity.
  • The :not() pseudo-class with multi arguments.

Motivation

This package is built with the understanding that we don’t want to use default styles we are getting from the browsers, except for the display property.

How to get started?

Run npm i the-new-css-reset OR Download the Latest Version.

Once installed, you can use it in two different ways:

1) Import /css/reset.css before the regular styles of the project. 2) Include the following snippet in one of the JavaScript/TypeScript entry files:

import "the-new-css-reset/css/reset.css";

Want to exclude some of the resets?

You can revert to the default styles of the browser!

For example:

input[type="checkbox"],
input[type="radio"] {
    all: revert;
}

or all input elements:

input,
textarea,
select {
   all: revert;
}

Accessibility Recommendation

To keep your website accessible, don't forget to take care of the :focus states.

:focus { /* focus styles */ }

/* or/and */

:focus-visible { /* keyboard only focus styles */ }

Browser Support

ChromeEdgeFirefoxSafariOperaSamsung Internet
88+ ✔88+ ✔84+ ✔14+ ✔75+ ✔15+ ✔
1.11.2

6 months ago

1.11.1

7 months ago

1.9.0

11 months ago

1.8.7

11 months ago

1.8.6

11 months ago

1.8.5

11 months ago

1.11.0

8 months ago

1.10.0

8 months ago

1.8.4

1 year ago

1.8.3

1 year ago

1.8.2

1 year ago

1.8.1

1 year ago

1.8.0

1 year ago

1.7.3

2 years ago

1.7.2

2 years ago

1.7.1

2 years ago

1.7.0

2 years ago

1.6.1

2 years ago

1.6.0

2 years ago

1.5.1

2 years ago

1.5.0

2 years ago

1.4.6

2 years ago

1.4.5

2 years ago

1.4.4

2 years ago

1.4.3

2 years ago

1.4.9

2 years ago

1.4.8

2 years ago

1.4.7

2 years ago

1.4.2

2 years ago

1.4.1

2 years ago

1.4.0

2 years ago

1.3.1

3 years ago

1.3.0

3 years ago

1.2.0

3 years ago

1.1.3

3 years ago

1.1.1

3 years ago

1.1.2

3 years ago

1.1.0

3 years ago

1.0.0

3 years ago