@w0s/base.css 1.3.3 → 1.4.1

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 +2 -1
  2. package/dist/base.css +26 -0
  3. package/package.json +35 -21
package/README.md CHANGED
@@ -1,6 +1,7 @@
1
1
  # base.css
2
2
 
3
3
  [![npm version](https://badge.fury.io/js/%40w0s%2Fbase.css.svg)](https://www.npmjs.com/package/@w0s/base.css)
4
+ [![CI status](https://github.com/SaekiTominaga/base.css/actions/workflows/ci.yml/badge.svg)](https://github.com/SaekiTominaga/base.css/actions/workflows/ci.yml)
4
5
 
5
6
  私の個人サイト([`w0s.jp`](https://github.com/SaekiTominaga/w0s.jp), [`blog.w0s.jp`](https://github.com/SaekiTominaga/blog.w0s.jp))で使用している、いわゆるリセット CSS です。個人的な用途をモチベーションに開発していますが、本ドキュメントで記す条件、考え方にマッチしているのであればどのような Web サイトにも使えます。
6
7
 
@@ -46,7 +47,7 @@ PostCSS 設定([`postcss.config.js`](https://github.com/SaekiTominaga/base.css
46
47
 
47
48
  現代ではブラウザに開発者ツールが組み込まれているのでそのようなことは気にする必要がない、というのは誤った考えです。公共施設のパソコンではその機能が封じられている事例があります(国立国会図書館の館内端末を体験してみると良いでしょう)。そのような環境下でも、ユーザーは Web ページのソースコードを直接閲覧する権利があります。
48
49
 
49
- 本 CSS ではビルド後に [Prettier](https://prettier.io/) で整形処理を行うことで、機械可読のみならず人間が見やすいように調整を行っています。
50
+ 本 CSS ではビルド後に [Oxfmt](https://oxc.rs/docs/guide/usage/formatter.html) で整形処理を行うことで、機械可読のみならず人間が見やすいように調整を行っています。
50
51
 
51
52
  ## 日本語ページ前提
52
53
 
package/dist/base.css CHANGED
@@ -8,29 +8,36 @@ p,
8
8
  pre {
9
9
  margin-block: unset;
10
10
  }
11
+
11
12
  blockquote,
12
13
  figure {
13
14
  margin-inline: unset;
14
15
  }
16
+
15
17
  address:lang(ja) {
16
18
  font-style: unset;
17
19
  }
20
+
18
21
  pre {
19
22
  font-family: ui-monospace, monospace; /* Specifying multiple values prevents the font size from becoming smaller */
20
23
  }
24
+
21
25
  @media print {
22
26
  pre {
23
27
  text-wrap-mode: unset;
24
28
  }
25
29
  }
30
+
26
31
  dialog {
27
32
  border-style: unset;
28
33
  padding: unset;
29
34
  }
35
+
30
36
  dialog:modal {
31
37
  max-block-size: unset;
32
38
  max-inline-size: unset;
33
39
  }
40
+
34
41
  [popover] {
35
42
  border-style: unset;
36
43
  padding: unset;
@@ -38,6 +45,7 @@ dialog:modal {
38
45
  :is(cite, dfn, em):lang(ja) {
39
46
  font-style: unset;
40
47
  }
48
+
41
49
  code,
42
50
  kbd,
43
51
  samp {
@@ -58,9 +66,11 @@ ol,
58
66
  ul {
59
67
  margin-block: unset;
60
68
  }
69
+
61
70
  dd {
62
71
  margin-inline-start: unset;
63
72
  }
73
+
64
74
  menu,
65
75
  ol,
66
76
  ul {
@@ -84,6 +94,7 @@ fieldset {
84
94
  padding-inline: unset;
85
95
  min-inline-size: unset;
86
96
  }
97
+
87
98
  legend {
88
99
  padding-inline: unset;
89
100
  }
@@ -99,6 +110,7 @@ summary::-webkit-details-marker {
99
110
  a:not(:any-link) {
100
111
  color: unset; /* for Dark Reader, iOS Firefox with Website Dark Mode <https://github.com/darkreader/darkreader/issues/9836> */
101
112
  }
113
+
102
114
  input,
103
115
  select,
104
116
  button,
@@ -107,37 +119,51 @@ textarea,
107
119
  {
108
120
  font: unset;
109
121
  }
122
+
110
123
  input:is([type="checkbox" i], [type="radio" i]) {
111
124
  margin-block: unset;
112
125
  margin-inline: unset;
113
126
  }
127
+
114
128
  optgroup {
115
129
  font-style: unset; /* for Firefox <resource://gre-resources/forms.css> */
116
130
  }
131
+
117
132
  textarea {
118
133
  margin-block: unset; /* for Firefox <resource://gre-resources/forms.css> */
119
134
  }
135
+
120
136
  :root {
121
137
  overflow-wrap: anywhere;
122
138
  text-autospace: ideograph-alpha;
123
139
  }
140
+
124
141
  *,
125
142
  ::before,
126
143
  ::after {
127
144
  box-sizing: border-box;
128
145
  }
146
+
129
147
  :any-link {
130
148
  text-decoration-thickness: from-font;
131
149
  }
150
+
132
151
  pre {
133
152
  overflow-inline: auto;
134
153
  }
154
+
135
155
  table {
136
156
  border-collapse: collapse;
137
157
  }
158
+
138
159
  input[type="search" i] {
139
160
  appearance: textfield; /* for Safari */
140
161
  }
162
+
141
163
  textarea {
142
164
  resize: block;
143
165
  }
166
+
167
+ :is(:any-link, abbr[title], ins, del):lang(ja) {
168
+ text-decoration-inset: auto;
169
+ }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@w0s/base.css",
3
- "version": "1.3.3",
3
+ "version": "1.4.1",
4
4
  "description": "Base CSS file used on `w0s.jp`",
5
5
  "keywords": [
6
6
  "reset-css",
@@ -11,36 +11,50 @@
11
11
  "bugs": {
12
12
  "url": "https://github.com/SaekiTominaga/base.css/issues"
13
13
  },
14
+ "license": "MIT",
15
+ "author": "Saeki Tominaga",
14
16
  "repository": {
15
17
  "type": "git",
16
18
  "url": "git+https://github.com/SaekiTominaga/base.css.git"
17
19
  },
18
- "license": "MIT",
19
- "author": "Saeki Tominaga",
20
- "type": "module",
21
- "main": "dist/base.css",
22
20
  "files": [
23
- "dist/**/*.css"
21
+ "dist"
24
22
  ],
23
+ "type": "module",
24
+ "exports": {
25
+ ".": "./dist/base.css"
26
+ },
27
+ "publishConfig": {
28
+ "access": "public"
29
+ },
25
30
  "scripts": {
26
31
  "dev": "http-server -o demo -c-1",
27
- "prebuild": "npm run lint && rimraf -g dist",
32
+ "prebuild": "rimraf dist",
28
33
  "build": "postcss src/base.css -d dist",
29
- "postbuild": "prettier --config ./.prettierrc.mjs --ignore-path .prettierignore -w \"dist/**/*.css\"",
30
- "lint": "stylelint demo/**/*.css src/**/*.css"
34
+ "postbuild": "oxfmt dist/base.css",
35
+ "prelint": "npm run build",
36
+ "lint": "conc --raw \"npm run lint:css\" \"npm run lint:package\"",
37
+ "lint:css": "stylelint \"demo/**/*.css\" \"src/**/*.css\"",
38
+ "lint:package": "publint"
31
39
  },
32
40
  "devDependencies": {
33
- "@w0s/stylelint-config": "^4.17.0",
34
- "http-server": "^14.1.1",
35
- "postcss": "^8.5.6",
36
- "postcss-cli": "^11.0.1",
37
- "postcss-discard-comments": "^7.0.5",
38
- "postcss-import": "^16.1.1",
39
- "postcss-nesting": "^13.0.2",
40
- "prettier": "^3.7.4",
41
- "rimraf": "^6.1.2"
42
- },
43
- "publishConfig": {
44
- "access": "public"
41
+ "@w0s/stylelint-config": "4.24.0",
42
+ "concurrently": "10.0.5",
43
+ "http-server": "14.1.1",
44
+ "oxfmt": "0.66.0",
45
+ "postcss": "8.5.26",
46
+ "postcss-cli": "11.0.1",
47
+ "postcss-discard-comments": "8.0.4",
48
+ "postcss-import": "17.0.0",
49
+ "postcss-nesting": "14.0.1",
50
+ "publint": "0.3.24",
51
+ "rimraf": "6.1.3",
52
+ "stylelint": "17.14.1",
53
+ "stylelint-attribute-case-sensitivity": "3.1.1",
54
+ "stylelint-config-concentric-order": "5.5.0",
55
+ "stylelint-config-standard": "40.0.0",
56
+ "stylelint-no-default-viewport": "2.0.1",
57
+ "stylelint-plugin-logical-css": "2.1.0",
58
+ "stylelint-root-colors": "3.0.1"
45
59
  }
46
60
  }