GithubHelp home page GithubHelp logo

simple-resets's Introduction

Simple CSS resets

This is a simple CSS reset. It's not meant to be a full reset. It's just meant to get you started quickly.

Installation

npm install simple-resets

Usage

Simply include the following in your stylesheet

@import 'simple-resets';

Or use the @use directive

@use 'simple-resets';

Examples

Box sizing

*,
*::after,
*::before {
  box-sizing: border-box;
}

Slightly bigger line-height

body {
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}

Hide content from screen readers

.sr-only {
  border: 0 !important;
  clip: rect(1px, 1px, 1px, 1px) !important;
  -webkit-clip-path: inset(50%) !important;
  clip-path: inset(50%) !important;
  height: 1px !important;
  margin: -1px !important;
  overflow: hidden !important;
  padding: 0 !important;
  position: absolute !important;
  width: 1px !important;
  white-space: nowrap !important;
}

Remove default list styles

ul,
ol {
  list-style: none;
}

Remove default form styles

input,
button,
textarea,
select {
  font: inherit;
}

Remove default button styles

button {
  background: none;
  border: none;
  cursor: pointer;
}

Stop words from overflowing

p,
h1,
h2,
h3,
h4,
h5,
h6 {
  overflow-wrap: break-word;
}

Set default image styles

img,
picture,
video,
canvas,
svg {
  display: block;
  max-width: 100%;
}

Set default link styles

a {
  text-decoration: none;
  font: inherit;
  color: inherit;
  &:hover {
    text-decoration: underline;
  }
}

License

MIT

Author

Shubham Giri

simple-resets's People

Contributors

xshubhamg avatar

Watchers

 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.