nani-reset 1.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/LICENSE +21 -0
- package/README.md +107 -0
- package/package.json +23 -0
- package/reset.css +171 -0
- package/reset.min.css +1 -0
package/LICENSE
ADDED
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2026 D. H. Alezard (Nani)
|
|
4
|
+
|
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
7
|
+
in the Software without restriction, including without limitation the rights
|
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
10
|
+
furnished to do so, subject to the following conditions:
|
|
11
|
+
|
|
12
|
+
The above copyright notice and this permission notice shall be included in all
|
|
13
|
+
copies or substantial portions of the Software.
|
|
14
|
+
|
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
21
|
+
SOFTWARE.
|
package/README.md
ADDED
|
@@ -0,0 +1,107 @@
|
|
|
1
|
+

|
|
2
|
+

|
|
3
|
+
|
|
4
|
+
# nani-reset โจ
|
|
5
|
+
|
|
6
|
+
A minimal, modern and consistent CSS reset.
|
|
7
|
+
|
|
8
|
+
`nani-reset` removes browser inconsistencies and provides clean, predictable CSS defaults without enforcing design decisions.
|
|
9
|
+
|
|
10
|
+
Perfect for modern frontend projects using tools like React, Vite or plain HTML/CSS.
|
|
11
|
+
|
|
12
|
+
---
|
|
13
|
+
|
|
14
|
+
## ๐ Installation
|
|
15
|
+
|
|
16
|
+
Install from npm:
|
|
17
|
+
|
|
18
|
+
```bash
|
|
19
|
+
npm install nani-reset
|
|
20
|
+
```
|
|
21
|
+
|
|
22
|
+
Then import it in your project:
|
|
23
|
+
|
|
24
|
+
```css
|
|
25
|
+
@import "nani-reset/reset.css";
|
|
26
|
+
```
|
|
27
|
+
|
|
28
|
+
or in JavaScript / TypeScript:
|
|
29
|
+
|
|
30
|
+
```js
|
|
31
|
+
import "nani-reset/reset.css"
|
|
32
|
+
```
|
|
33
|
+
|
|
34
|
+
---
|
|
35
|
+
|
|
36
|
+
## ๐งน What it does
|
|
37
|
+
|
|
38
|
+
`nani-reset` provides a clean foundation by:
|
|
39
|
+
|
|
40
|
+
* Removing default margins and paddings
|
|
41
|
+
* Normalizing the box model
|
|
42
|
+
* Making media elements responsive by default
|
|
43
|
+
* Resetting form elements to inherit typography
|
|
44
|
+
* Removing default list styles
|
|
45
|
+
* Removing default link styling
|
|
46
|
+
* Improving text wrapping behavior
|
|
47
|
+
* Creating a safe stacking context for modern apps
|
|
48
|
+
|
|
49
|
+
---
|
|
50
|
+
|
|
51
|
+
## ๐ฆ Example usage
|
|
52
|
+
|
|
53
|
+
```css
|
|
54
|
+
@import "nani-reset/reset.css";
|
|
55
|
+
|
|
56
|
+
body {
|
|
57
|
+
font-family: system-ui, sans-serif;
|
|
58
|
+
}
|
|
59
|
+
|
|
60
|
+
main {
|
|
61
|
+
max-width: 1100px;
|
|
62
|
+
margin: auto;
|
|
63
|
+
padding: 2rem;
|
|
64
|
+
}
|
|
65
|
+
```
|
|
66
|
+
|
|
67
|
+
---
|
|
68
|
+
|
|
69
|
+
## ๐ฏ Goals
|
|
70
|
+
|
|
71
|
+
The philosophy behind `nani-reset` is simple:
|
|
72
|
+
|
|
73
|
+
* minimal
|
|
74
|
+
* predictable
|
|
75
|
+
* modern
|
|
76
|
+
* non-opinionated
|
|
77
|
+
|
|
78
|
+
It avoids forcing typography, layout or visual styles so developers remain in full control.
|
|
79
|
+
|
|
80
|
+
---
|
|
81
|
+
|
|
82
|
+
## โ๏ธ Features
|
|
83
|
+
|
|
84
|
+
* Modern box-sizing model
|
|
85
|
+
* Responsive media elements
|
|
86
|
+
* Neutral form controls
|
|
87
|
+
* Safe defaults for SPA frameworks
|
|
88
|
+
* Smooth scrolling
|
|
89
|
+
* Lightweight (~1kb)
|
|
90
|
+
|
|
91
|
+
---
|
|
92
|
+
|
|
93
|
+
## ๐ง Why another CSS reset?
|
|
94
|
+
|
|
95
|
+
Many resets either:
|
|
96
|
+
|
|
97
|
+
* reset too little
|
|
98
|
+
* normalize too much
|
|
99
|
+
* or enforce styling decisions
|
|
100
|
+
|
|
101
|
+
`nani-reset` aims to sit in the middle: a **balanced modern reset** for everyday frontend work.
|
|
102
|
+
|
|
103
|
+
---
|
|
104
|
+
|
|
105
|
+
## ๐ License
|
|
106
|
+
|
|
107
|
+
MIT ยฉ D. H. Alezard (Nani)
|
package/package.json
ADDED
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "nani-reset",
|
|
3
|
+
"version": "1.0.0",
|
|
4
|
+
"description": "A minimal, modern and consistent CSS reset",
|
|
5
|
+
"author": "Daniel Alejandro Hernandez Alezard",
|
|
6
|
+
"license": "MIT",
|
|
7
|
+
"main": "reset.css",
|
|
8
|
+
"keywords": [
|
|
9
|
+
"css",
|
|
10
|
+
"css-reset",
|
|
11
|
+
"reset",
|
|
12
|
+
"normalize",
|
|
13
|
+
"modern-css",
|
|
14
|
+
"frontend"
|
|
15
|
+
],
|
|
16
|
+
"repository": {
|
|
17
|
+
"type": "git",
|
|
18
|
+
"url": "https://github.com/dhalezard/nani-reset.git"
|
|
19
|
+
},
|
|
20
|
+
"devDependencies": {
|
|
21
|
+
"clean-css-cli": "^5.6.3"
|
|
22
|
+
}
|
|
23
|
+
}
|
package/reset.css
ADDED
|
@@ -0,0 +1,171 @@
|
|
|
1
|
+
/*
|
|
2
|
+
nani-reset v1.0
|
|
3
|
+
By Nani @dhalezard
|
|
4
|
+
A modern, minimal and consistent CSS reset
|
|
5
|
+
|
|
6
|
+
github repo:
|
|
7
|
+
https://github.com/dhalezard/nani-reset
|
|
8
|
+
*/
|
|
9
|
+
|
|
10
|
+
/* ============================= */
|
|
11
|
+
/* Root defaults */
|
|
12
|
+
/* ============================= */
|
|
13
|
+
|
|
14
|
+
:root {
|
|
15
|
+
font-synthesis: none;
|
|
16
|
+
-webkit-font-smoothing: antialiased;
|
|
17
|
+
-webkit-text-size-adjust: 100%;
|
|
18
|
+
}
|
|
19
|
+
|
|
20
|
+
/* ============================= */
|
|
21
|
+
/* Box model */
|
|
22
|
+
/* ============================= */
|
|
23
|
+
|
|
24
|
+
*,
|
|
25
|
+
*::before,
|
|
26
|
+
*::after {
|
|
27
|
+
box-sizing: border-box;
|
|
28
|
+
}
|
|
29
|
+
|
|
30
|
+
/* ============================= */
|
|
31
|
+
/* Remove default spacing */
|
|
32
|
+
/* ============================= */
|
|
33
|
+
|
|
34
|
+
* {
|
|
35
|
+
margin: 0;
|
|
36
|
+
padding: 0;
|
|
37
|
+
}
|
|
38
|
+
|
|
39
|
+
/* ============================= */
|
|
40
|
+
/* Document defaults */
|
|
41
|
+
/* ============================= */
|
|
42
|
+
|
|
43
|
+
html,
|
|
44
|
+
body {
|
|
45
|
+
height: 100%;
|
|
46
|
+
line-height: 1.5;
|
|
47
|
+
scroll-behavior: smooth;
|
|
48
|
+
}
|
|
49
|
+
|
|
50
|
+
body {
|
|
51
|
+
min-height: 100vh;
|
|
52
|
+
}
|
|
53
|
+
|
|
54
|
+
/* ============================= */
|
|
55
|
+
/* Media elements */
|
|
56
|
+
/* ============================= */
|
|
57
|
+
|
|
58
|
+
img,
|
|
59
|
+
picture,
|
|
60
|
+
video,
|
|
61
|
+
canvas,
|
|
62
|
+
svg {
|
|
63
|
+
display: block;
|
|
64
|
+
max-width: 100%;
|
|
65
|
+
height: auto;
|
|
66
|
+
border-style: none;
|
|
67
|
+
}
|
|
68
|
+
|
|
69
|
+
/* ============================= */
|
|
70
|
+
/* Typography */
|
|
71
|
+
/* ============================= */
|
|
72
|
+
|
|
73
|
+
p,
|
|
74
|
+
h1,
|
|
75
|
+
h2,
|
|
76
|
+
h3,
|
|
77
|
+
h4,
|
|
78
|
+
h5,
|
|
79
|
+
h6 {
|
|
80
|
+
overflow-wrap: break-word;
|
|
81
|
+
}
|
|
82
|
+
|
|
83
|
+
b,
|
|
84
|
+
strong {
|
|
85
|
+
font-weight: bolder;
|
|
86
|
+
}
|
|
87
|
+
|
|
88
|
+
cite {
|
|
89
|
+
font-style: normal;
|
|
90
|
+
}
|
|
91
|
+
|
|
92
|
+
/* ============================= */
|
|
93
|
+
/* Lists */
|
|
94
|
+
/* ============================= */
|
|
95
|
+
|
|
96
|
+
ul,
|
|
97
|
+
ol,
|
|
98
|
+
dd,
|
|
99
|
+
menu {
|
|
100
|
+
list-style: none;
|
|
101
|
+
}
|
|
102
|
+
|
|
103
|
+
/* ============================= */
|
|
104
|
+
/* Links */
|
|
105
|
+
/* ============================= */
|
|
106
|
+
|
|
107
|
+
a,
|
|
108
|
+
button {
|
|
109
|
+
cursor: pointer;
|
|
110
|
+
}
|
|
111
|
+
|
|
112
|
+
a {
|
|
113
|
+
text-decoration: none;
|
|
114
|
+
color: inherit;
|
|
115
|
+
background-color: transparent;
|
|
116
|
+
}
|
|
117
|
+
|
|
118
|
+
/* ============================= */
|
|
119
|
+
/* Forms */
|
|
120
|
+
/* ============================= */
|
|
121
|
+
|
|
122
|
+
input,
|
|
123
|
+
button,
|
|
124
|
+
optgroup,
|
|
125
|
+
textarea,
|
|
126
|
+
select,
|
|
127
|
+
fieldset {
|
|
128
|
+
border-width: 0;
|
|
129
|
+
font-family: inherit;
|
|
130
|
+
font-size: inherit;
|
|
131
|
+
text-transform: none;
|
|
132
|
+
overflow: visible;
|
|
133
|
+
}
|
|
134
|
+
|
|
135
|
+
/* remove default button styling */
|
|
136
|
+
|
|
137
|
+
button {
|
|
138
|
+
background: none;
|
|
139
|
+
border: none;
|
|
140
|
+
}
|
|
141
|
+
|
|
142
|
+
/* allow text selection in inputs */
|
|
143
|
+
|
|
144
|
+
input,
|
|
145
|
+
textarea {
|
|
146
|
+
-webkit-user-select: auto;
|
|
147
|
+
user-select: auto;
|
|
148
|
+
}
|
|
149
|
+
|
|
150
|
+
/* placeholder */
|
|
151
|
+
|
|
152
|
+
::placeholder {
|
|
153
|
+
color: unset;
|
|
154
|
+
}
|
|
155
|
+
|
|
156
|
+
/* ============================= */
|
|
157
|
+
/* Hidden attribute */
|
|
158
|
+
/* ============================= */
|
|
159
|
+
|
|
160
|
+
[hidden] {
|
|
161
|
+
display: none;
|
|
162
|
+
}
|
|
163
|
+
|
|
164
|
+
/* ============================= */
|
|
165
|
+
/* React / SPA stacking context */
|
|
166
|
+
/* ============================= */
|
|
167
|
+
|
|
168
|
+
#root,
|
|
169
|
+
#__next {
|
|
170
|
+
isolation: isolate;
|
|
171
|
+
}
|
package/reset.min.css
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
:root{font-synthesis:none;-webkit-font-smoothing:antialiased;-webkit-text-size-adjust:100%}*,::after,::before{box-sizing:border-box}*{margin:0;padding:0}body,html{height:100%;line-height:1.5;scroll-behavior:smooth}body{min-height:100vh}canvas,img,picture,svg,video{display:block;max-width:100%;height:auto;border-style:none}h1,h2,h3,h4,h5,h6,p{overflow-wrap:break-word}b,strong{font-weight:bolder}cite{font-style:normal}dd,menu,ol,ul{list-style:none}a,button{cursor:pointer}a{text-decoration:none;color:inherit;background-color:transparent}button,fieldset,input,optgroup,select,textarea{border-width:0;font-family:inherit;font-size:inherit;text-transform:none;overflow:visible}button{background:0 0;border:none}input,textarea{-webkit-user-select:auto;user-select:auto}::placeholder{color:unset}[hidden]{display:none}#__next,#root{isolation:isolate}
|