• Stars
    star
    357
  • Rank 115,273 (Top 3 %)
  • Language
    CSS
  • License
    MIT License
  • Created almost 6 years ago
  • Updated 11 months ago

Reviews

There are no reviews yet. Be the first to send feedback to the community and the maintainers!

Repository Details

Minimal barebone CSS Reset

CSS Micro Reset

You probably don't need CSS Reset, at least not the complete CSS Reset.

Every Browser has its own CSS Reset. Resetting it again means that later you need to set all reset elements.

Basically you have:

Browser Reset -> Your Reset -> Setting all Reset Elements -> Probably more styling after.

A typical H1 tag mistake:

/* "Chrome  Reset" - default Chrome CSS stylesheet */

h1 {
    display: block;
    font-size: 2em;
    -webkit-margin-before: 0.67em;
    -webkit-margin-after: 0.67em;
    -webkit-margin-start: 0px;
    -webkit-margin-end: 0px;
    font-weight: bold;
}

/* Your Reset */

h1 {
  margin: 0;
  padding: 0;
  border: 0;
  line-height: 1;
  font-weight: normal;

}

/* Now you need to set the H1 */

h1 {
  margin: 0 0 0 1em;
  line-height: 1.5;
  font-weight: normal;
}

/* And probably you will do one more further H1 setting */

h1 {
color: #111;
font: 2em/1.5 Arial, sans-serif;
font-weight: normal;
}

/* I will assume one or two more setting of H1 tag here :) */

We've all made this mistake too many times.

Why not skip the reset and just set the elements that you need for your project?

Also why are you resetting some elements if you are not using them in your project. For example, if you don't have forms in your project, don't reset them.

Another thing: It's Ok for some elements to be different between browsers.

Why not start with bare bones reset and only add some elements if needed?

I've done just that: CSS Micro Reset

Feel free to add or remove elements to CSS Micro Reset, don't just blindly use it. For example, if you don't use tables, remove all the table related tags in the CSS Micro Reset.

Like I said in the beginning: You may not need this or any other CSS reset.

Before use, understand what this reset does.

Download or Install

You can copy-paste the CSS code, use the direct download, or use npm:

Note: I'm avere that using npm for project this small is ridiculous. But when I don't put npm there is always someone who complains why there is no: npm, yarn, bower and where is CDN link?

$ npm i css-micro-reset

Or use the CDN link:

 <link rel="stylesheet" href="https://unpkg.com/[email protected]/micro-css-reset.css">

License

This project is licensed under the MIT License

More Repositories

1

screenshoteer

Make website screenshots and mobile emulations from the command line.
JavaScript
1,675
star
2

Basic.css

Basic.css - Classless CSS Starter File
HTML
679
star
3

nanoJS

Minimal standalone JS library for DOM manipulation
JavaScript
653
star
4

Hartija---CSS-Print-Framework

Universal CSS for web printing
HTML
529
star
5

SMART-CSS-GRID

SMART CSS GRID - CSS Framework
HTML
307
star
6

femtoJS

femtoJS - Really small JavaScript (ES6) library for DOM manipulation.
JavaScript
142
star
7

Box-CSS-Framework

Box - CSS Framework
HTML
138
star
8

Minimal-Notes

Minimal Notes web app build with Vue.js
HTML
127
star
9

infinity-css-grid

Fluid Flex Solution for making infinite grid columns.
HTML
120
star
10

flexy

Flexy is minimal CSS framework made with Flex
HTML
115
star
11

1-line-CSS-Framework

One Line CSS Framework
HTML
69
star
12

picoCSS

picoCSS - really small JavaScript Framework
HTML
67
star
13

60gs

60GS - 60 Columns Grid System based on CSS Grid Layout
HTML
65
star
14

ramd.js

ramd.js JavaScript library for making web applications.
HTML
63
star
15

Katana

Katana is CSS Layout System made with Flexbox
HTML
58
star
16

keywordsextract

keywords-extract - Command line tool extract keywords from any web page.
JavaScript
55
star
17

CSS-Mini-Reset

CSS Mini Reset
CSS
52
star
18

AutoObjectDocumentation

Auto Object Documentation - JavaScript
JavaScript
51
star
19

Flex-One

1 CSS Class Layout System made with Flex
HTML
49
star
20

Basic-CSS-Typography-Reset

Essential CSS Typography Set
HTML
47
star
21

Scribble-Font

Scribble Font for Prototyping & Wireframing
HTML
47
star
22

PDFSave

Convert websites into readable PDFs
JavaScript
46
star
23

CSS-Mobile-Reset

36
star
24

boilerplate-readme-template

Boilerplate README.md Template for GitHub or GitLab use.
36
star
25

floaty

CSS Float Based Layout System
HTML
35
star
26

HTML-Lorem-Ipsum-Crash-Test

HTML Lorem Ipsum Crash Test for testing your CSS
HTML
35
star
27

HTML5-Mini-Template

HTML5 Mini Template
35
star
28

o---JS-Library-for-Object-Manipulation

o - JS Library for Object Manipulation
JavaScript
31
star
29

CSS3-Fancy-Box

CSS3 Fancy Box
HTML
27
star
30

Two-Lines-CSS-Framework

Two Lines CSS Framework
17
star
31

Foxy-CSS-Framework

Foxy CSS Framework
16
star
32

CSS3-Chat-Bubble

CSS3 Chat Bubble
9
star
33

Font-Pairing-Glyph-Comparison-Tool

Web Template for Glyph Comparison
HTML
7
star
34

Simple-Button

Simple CSS Button - Starter Kit for CSS Buttons
HTML
4
star
35

Spacestone

CLI for tesseract.js
JavaScript
2
star
36

emastic---css-framework--beta3--0.8

Emastic is small, fluid, em based CSS Framework
2
star
37

npm-I-love-you-too

npm love us. we love it back.
2
star
38

foam-template

CSS
1
star
39

Child-Selector-System-CSS_Framework

Child Selector System is experimental CSS Framework that use child selectors for making multiple simple (column) grid.
HTML
1
star
40

Pangram-Proveruvac-Makedonski

Панграм проверувач
HTML
1
star
41

font-pairing

Font Pairing
HTML
1
star