Coder Social home page Coder Social logo

ftlimit / the-new-css-reset Goto Github PK

View Code? Open in Web Editor NEW

This project forked from elad2412/the-new-css-reset

0.0 0.0 0.0 74 KB

The New Simple and Lighter CSS Reset

Home Page: https://elad2412.github.io/the-new-css-reset/

License: MIT License

CSS 100.00%

the-new-css-reset's Introduction

The New CSS Reset

This new CSS reset 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.

What is the-new-css-reset resetting?

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

This CSS reset removes all the default styles which we are getting on specific HTML elements except the ‘display’ property, as I already mentioned, and special HTML elements like iframe, canvas, img, svg, video, and audio.

In case you want the default style of the browser of a specific HTML element back, you can revert back 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;
}

Download the Latest Version

NPM and How to Use?

The package name on NPM is 'the-new-css-reset'.

Import /css/reset.css before the regular styles of the project.

In a React project, insert it to the main entry file:

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

Accessibility Recommendation

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

:focus { /* focus styles */ }

/* or/and */

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

Browser Support

All evergreen browsers

  • Chrome, Edge: version 88+
  • FireFox: version 84+
  • Safari/iOS browsers: version 14+
  • Opera: version 75+
  • Samsung Browser: version 15+

the-new-css-reset's People

Contributors

elad2412 avatar eladyad2 avatar thomasrettig avatar nullbert avatar adir-sl avatar manzoorwanijk avatar noleli avatar teppeis avatar timhettler avatar heppokofrontend avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.