├── .gitignore
├── README.md
├── index.js
├── package.json
├── recsst.css
└── src.js
/.gitignore:
--------------------------------------------------------------------------------
1 | node_modules
2 | .DS_Store
3 |
--------------------------------------------------------------------------------
/README.md:
--------------------------------------------------------------------------------
1 | # recsst
2 |
3 | Micro CSS reset.
4 |
5 | ```css
6 | html { box-sizing: border-box }
7 | *, *:before, *:after { box-sizing: inherit }
8 | html, body, h1, h2, h3, h4, h5, h6, p, ol, ul, li, dl,
9 | dt, dd, blockquote, address { margin: 0; padding: 0 }
10 | ```
11 |
12 | ## Usage
13 |
14 | ```
15 | npm i recsst
16 | ```
17 |
18 | ### CSS
19 |
20 | ```html
21 |
22 | ```
23 |
24 | ### JS
25 |
26 | ```js
27 | const recsst = require('recsst')
28 | recsst.attach()
29 | ```
30 |
31 | Attaches style tag with the reset to the document head.
32 |
33 | ```js
34 | recsst.toString()
35 | ```
36 |
37 | Returns css as simple string. Generally useful for writing to file.
38 |
--------------------------------------------------------------------------------
/index.js:
--------------------------------------------------------------------------------
1 | (function(f){if(typeof exports==="object"&&typeof module!=="undefined"){module.exports=f()}else if(typeof define==="function"&&define.amd){define([],f)}else{var g;if(typeof window!=="undefined"){g=window}else if(typeof global!=="undefined"){g=global}else if(typeof self!=="undefined"){g=self}else{g=this}g.recsst = f()}})(function(){var define,module,exports;return (function e(t,n,r){function s(o,u){if(!n[o]){if(!t[o]){var a=typeof require=="function"&&require;if(!u&&a)return a(o,!0);if(i)return i(o,!0);var f=new Error("Cannot find module '"+o+"'");throw f.code="MODULE_NOT_FOUND",f}var l=n[o]={exports:{}};t[o][0].call(l.exports,function(e){var n=t[o][1][e];return s(n?n:e)},l,l.exports,e,t,n,r)}return n[o].exports}var i=typeof require=="function"&&require;for(var o=0;o index.js"
8 | },
9 | "keywords": [],
10 | "author": "",
11 | "license": "ISC",
12 | "devDependencies": {
13 | "brfs": "^1.4.3",
14 | "browserify": "^13.1.0",
15 | "es2020": "^1.1.8"
16 | }
17 | }
18 |
--------------------------------------------------------------------------------
/recsst.css:
--------------------------------------------------------------------------------
1 | html { box-sizing: border-box }
2 | *, *:before, *:after { box-sizing: inherit }
3 | html, body, h1, h2, h3, h4, h5, h6, p, ol, ul, li, dl,
4 | dt, dd, blockquote, address { margin: 0; padding: 0 }
5 |
--------------------------------------------------------------------------------
/src.js:
--------------------------------------------------------------------------------
1 | const fs = require('fs')
2 |
3 | const reset = fs.readFileSync(__dirname + '/recsst.css', 'utf8')
4 |
5 | exports.toString = () => reset
6 |
7 | exports.attach = () => {
8 | let node = document.createElement('style')
9 | node.innerHTML = reset
10 | document.head.appendChild(node)
11 | }
12 |
--------------------------------------------------------------------------------