simple-resets

1.0.0 • Public • Published

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

Readme

Keywords

Package Sidebar

Install

npm i simple-resets

Weekly Downloads

0

Version

1.0.0

License

ISC

Unpacked Size

3.69 kB

Total Files

4

Last publish

Collaborators

  • xshubhamg