@dmkishi/css-reset 1.1.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.
Files changed (3) hide show
  1. package/README.md +32 -0
  2. package/package.json +16 -0
  3. package/reset.css +105 -0
package/README.md ADDED
@@ -0,0 +1,32 @@
1
+ CSS Reset
2
+ ================================================================================
3
+ [DM Kishi's custom CSS reset](https://github.com/dmkishi/css-reset/).
4
+
5
+ Install
6
+ --------------------------------------------------------------------------------
7
+ ```sh
8
+ npm install @dmkishi/css-reset
9
+ ```
10
+
11
+ Usage
12
+ --------------------------------------------------------------------------------
13
+ ```css
14
+ @import '@dmkishi/css-reset/reset.css' layer(reset);
15
+ ```
16
+
17
+ Changelog
18
+ --------------------------------------------------------------------------------
19
+ ### v1.1.0 (2025-3-30)
20
+ #### Features
21
+ - Add rule for `<address>`.
22
+ #### Others
23
+ - Add support for NPM.
24
+
25
+ ### v1.0.0 (2025-3-28)
26
+ Initial release.
27
+
28
+ Acknowledgments
29
+ --------------------------------------------------------------------------------
30
+ Taken from:
31
+ - <https://www.joshwcomeau.com/css/custom-css-reset/>
32
+ - <https://piccalil.li/blog/a-more-modern-css-reset/>
package/package.json ADDED
@@ -0,0 +1,16 @@
1
+ {
2
+ "name": "@dmkishi/css-reset",
3
+ "version": "1.1.0",
4
+ "scripts": {
5
+ "lint": "npx stylelint reset.css",
6
+ "prepare": "husky"
7
+ },
8
+ "devDependencies": {
9
+ "@stylistic/stylelint-config": "^2.0.0",
10
+ "@stylistic/stylelint-plugin": "^3.1.2",
11
+ "husky": "^9.1.7",
12
+ "stylelint": "^16.17.0",
13
+ "stylelint-config-standard": "^37.0.0"
14
+ },
15
+ "files": ["reset.css"]
16
+ }
package/reset.css ADDED
@@ -0,0 +1,105 @@
1
+ /*******************************************************************************
2
+ * Global
3
+ ******************************************************************************/
4
+ /* Use a more-intuitive box-sizing model. */
5
+ *,
6
+ *::before,
7
+ *::after {
8
+ box-sizing: border-box;
9
+ }
10
+
11
+ /* Remove default margins */
12
+ * {
13
+ margin: 0;
14
+ }
15
+
16
+ /*******************************************************************************
17
+ * Layout
18
+ ******************************************************************************/
19
+ /* Prevent font size inflation. */
20
+ html {
21
+ -moz-text-size-adjust: none;
22
+ -webkit-text-size-adjust: none;
23
+ text-size-adjust: none;
24
+ }
25
+
26
+ body {
27
+ /* Add accessible line-height. */
28
+ line-height: 1.5;
29
+
30
+ /* Improve text rendering. */
31
+ -webkit-font-smoothing: antialiased;
32
+ }
33
+
34
+ /* Make media easier to work with. */
35
+ img,
36
+ picture,
37
+ video,
38
+ canvas,
39
+ svg {
40
+ display: block;
41
+ max-width: 100%;
42
+ }
43
+
44
+ /*******************************************************************************
45
+ * Text
46
+ ******************************************************************************/
47
+ /* Set shorter line heights on headings and interactive elements. */
48
+ h1,
49
+ h2,
50
+ h3,
51
+ h4,
52
+ button,
53
+ input,
54
+ label {
55
+ line-height: 1.1;
56
+ }
57
+
58
+ /* Avoid text overflows. */
59
+ p,
60
+ h1,
61
+ h2,
62
+ h3,
63
+ h4,
64
+ h5,
65
+ h6 {
66
+ overflow-wrap: break-word;
67
+ }
68
+
69
+ /* Improve line wrapping. */
70
+ p {
71
+ text-wrap: pretty;
72
+ }
73
+
74
+ /* Balance text wrapping on headings. */
75
+ h1,
76
+ h2,
77
+ h3,
78
+ h4,
79
+ h5,
80
+ h6 {
81
+ text-wrap: balance;
82
+ }
83
+
84
+ /* Inherit fonts for inputs and buttons. */
85
+ input,
86
+ button,
87
+ textarea,
88
+ select {
89
+ font-family: inherit;
90
+ font-size: inherit;
91
+ }
92
+
93
+ /* Remove bad default. */
94
+ address {
95
+ font-style: normal;
96
+ }
97
+
98
+ /*******************************************************************************
99
+ * Other
100
+ ******************************************************************************/
101
+ /* Opt-in to decorated lists. */
102
+ ol,
103
+ ul {
104
+ list-style: none;
105
+ }