postcss-enumerates-in-line 0.0.1 → 0.0.9

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/.gitattributes ADDED
@@ -0,0 +1,2 @@
1
+ # Auto detect text files and perform LF normalization
2
+ * text=auto
@@ -0,0 +1,28 @@
1
+ name: Publish Package to npmjs
2
+ on: push
3
+ #on:
4
+ # push:
5
+ # branches:
6
+ # - master
7
+
8
+ jobs:
9
+ build:
10
+ runs-on: ubuntu-latest
11
+ permissions:
12
+ contents: read
13
+ id-token: write
14
+ steps:
15
+ - uses: actions/checkout@v5
16
+ # Setup .npmrc file to publish to npm
17
+ - uses: actions/setup-node@v6
18
+ with:
19
+ node-version: '24.x'
20
+ registry-url: 'https://registry.npmjs.org/'
21
+ #scope: '@hadukinei'
22
+ #- run: npm i -g npm@latest
23
+ - run: npm ci
24
+ #- run: npm pkg fix
25
+ #- run: npm publish --otp=068938
26
+ # env:
27
+ # NODE_AUTH_TOKEN: ${{ secrets.NPMJS_TOKEN_PEIL }}
28
+ - run: npm publish --provenance --access public
Binary file
Binary file
@@ -0,0 +1,7 @@
1
+ # Using image source
2
+ [twemoji](https://github.com/twitter/twemoji)
3
+ version 14.0.2
4
+
5
+ Copyright 2019 Twitter, Inc and other contributors
6
+ Code licensed under the MIT License: http://opensource.org/licenses/MIT
7
+ Graphics licensed under CC-BY 4.0: https://creativecommons.org/licenses/by/4.0/
package/README.md CHANGED
@@ -1,45 +1,552 @@
1
- # postcss-enumerates-in-line
1
+ # PostCSS Enumerates in Line
2
2
 
3
- ## ⚠️ IMPORTANT NOTICE ⚠️
3
+ |言語|Language|
4
+ |---|---|
5
+ |[<img width="24" height="24" align="left" src="README.img/1f1ef-1f1f5.png" alt="🇯🇵"> 日本語](README.md)|[<img width="24" height="24" align="left" src="README.img/1f1fa-1f1f8.png" alt="🇺🇸"> English](README_EN.md)|
4
6
 
5
- **This package is created solely for the purpose of setting up OIDC (OpenID Connect) trusted publishing with npm.**
6
7
 
7
- This is **NOT** a functional package and contains **NO** code or functionality beyond the OIDC setup configuration.
8
+ ## 更新点: v0.0.1
8
9
 
9
- ## Purpose
10
+ - 公開開始
10
11
 
11
- This package exists to:
12
- 1. Configure OIDC trusted publishing for the package name `postcss-enumerates-in-line`
13
- 2. Enable secure, token-less publishing from CI/CD workflows
14
- 3. Establish provenance for packages published under this name
12
+ ---
15
13
 
16
- ## What is OIDC Trusted Publishing?
14
+ この[PostCSS]プラグインは、複数のCSSプロパティを1つの行にまとめ上げて記述できるようにします。
17
15
 
18
- OIDC trusted publishing allows package maintainers to publish packages directly from their CI/CD workflows without needing to manage npm access tokens. Instead, it uses OpenID Connect to establish trust between the CI/CD provider (like GitHub Actions) and npm.
16
+ [Tailwind CSS]の`@apply`構文と似た働きをします。
19
17
 
20
- ## Setup Instructions
18
+ ```scss
19
+ // header
20
+ .c-header {
21
+ @enums my:1.5rem;
21
22
 
22
- To properly configure OIDC trusted publishing for this package:
23
+ &--caption {
24
+ @enums ff:"Rammetto^One",sans-serif fs:1.25em;
25
+ }
23
26
 
24
- 1. Go to [npmjs.com](https://www.npmjs.com/) and navigate to your package settings
25
- 2. Configure the trusted publisher (e.g., GitHub Actions)
26
- 3. Specify the repository and workflow that should be allowed to publish
27
- 4. Use the configured workflow to publish your actual package
27
+ &--description {
28
+ @enums fs:0.85em;
29
+ }
30
+ }
31
+ ```
28
32
 
29
- ## DO NOT USE THIS PACKAGE
33
+ 具体的には上のような書式を取ります。(言語は[SCSS])
30
34
 
31
- This package is a placeholder for OIDC configuration only. It:
32
- - Contains no executable code
33
- - Provides no functionality
34
- - Should not be installed as a dependency
35
- - Exists only for administrative purposes
35
+ > `@enum`で始まるat-rulesの一種であり、`@apply`と記述方法は全く同じです。
36
+ >
37
+ > `my`は`margin-top` & `margin-bottom`の、`ff`は`font-family`の、`fs`は`font-size`のショートハンドです。
38
+ > 何がショートハンドとして定義されているかは[プロパティ名のショートハンド](#プロパティ名のショートハンド)を参照してください。
39
+ >
40
+ > `:`記号の前がプロパティ名、後ろがプロパティ値になっています。
41
+ > ホワイトスペースはプロパティの区切り文字であるため、プロパティ値に半角スペース記号を使いたい場合は`^`で代用します。
42
+ >
43
+ > 詳しい書式は目次の次へお進みください。
36
44
 
37
- ## More Information
45
+ プロパティの列挙を目的としているため、hoverのような状態遷移・メディアクエリ・ダークモードなどへの対応はしません。
38
46
 
39
- For more details about npm's trusted publishing feature, see:
40
- - [npm Trusted Publishing Documentation](https://docs.npmjs.com/generating-provenance-statements)
41
- - [GitHub Actions OIDC Documentation](https://docs.github.com/en/actions/deployment/security-hardening-your-deployments/about-security-hardening-with-openid-connect)
47
+ > [Tailwind CSS]における`hover:`・`md:`・`dark:`などに対応する機能は備えていないという意味です。
42
48
 
43
- ---
49
+ 基本的には[gulp]および[gulp-postcss]での動作を想定していますが、JS-APIによるPostCSS単体でも動作します。
50
+
51
+ [PostCSS]: https://github.com/postcss/postcss
52
+ [Tailwind CSS]: https://tailwindcss.com/
53
+ [SCSS]: https://sass-lang.com/
54
+ [gulp]: https://gulpjs.com/
55
+ [gulp-postcss]: https://github.com/postcss/gulp-postcss
56
+
57
+ <div class="x--hr"></div>
58
+
59
+
60
+ ## 目次
61
+
62
+ - [PostCSS Enumerates in Line](#postcss-enumerates-in-line)
63
+ - [更新点: v0.0.1](#更新点-v001)
64
+ - [目次](#目次)
65
+ - [CSSでの記述方法](#cssでの記述方法)
66
+ - [特殊な記号](#特殊な記号)
67
+ - [コロン記号](#コロン記号)
68
+ - [エクスクラメーション記号](#エクスクラメーション記号)
69
+ - [サーカムフレックス記号](#サーカムフレックス記号)
70
+ - [二重角括弧記号](#二重角括弧記号)
71
+ - [プロパティ名のショートハンド](#プロパティ名のショートハンド)
72
+ - [プラグインを使用する方法](#プラグインを使用する方法)
73
+ - [gulpでの使い方](#gulpでの使い方)
74
+ - [package.json](#packagejson)
75
+ - [Javascriptモジュール](#javascriptモジュール)
76
+ - [読み込み処理](#読み込み処理)
77
+ - [タスク処理](#タスク処理)
78
+ - [サンプルのソースファイル](#サンプルのソースファイル)
79
+ - [実行](#実行)
80
+ - [JS-APIでの使い方](#js-apiでの使い方)
81
+ - [package.json](#packagejson-1)
82
+ - [Javascriptモジュール](#javascriptモジュール-1)
83
+ - [読み込み処理](#読み込み処理-1)
84
+ - [タスク処理](#タスク処理-1)
85
+ - [サンプルのソースファイル](#サンプルのソースファイル-1)
86
+ - [実行](#実行-1)
87
+ - [オプション引数](#オプション引数)
88
+ - [prependDefaultColor](#prependdefaultcolor)
89
+ - [prependDefaultStyle](#prependdefaultstyle)
90
+
91
+ <div class="x--hr"></div>
92
+
93
+
94
+ ## CSSでの記述方法
95
+
96
+ CSS(やSCSSなど)での書式は単純です。
97
+
98
+ ```scss
99
+ html {
100
+ @enums background-color:#000 color:#fff;
101
+
102
+ h1 {
103
+ @enums font-size:100%;
104
+ }
105
+ }
106
+ ```
107
+
108
+ [Tailwind CSS]における`@import tailwindcss;`のような記述をCSS側ファイルに行う必要はありません。
109
+
110
+ `@enums`で開始し、`;`で終了します。
111
+
112
+ ホワイトスペースで区切られているため、半角スペースだけでなく改行記号でも複数あるCSSスタイル宣言を分割することができます。
113
+
114
+ CSSスタイル宣言についても単純で、「`プロパティ名`・`半角コロン記号`・`プロパティ値`」の組み合わせになっています。
115
+
116
+ プロパティ値は任意の値を取ることができるため、`border:1px^#888^solid`など自由な指示をすることができるでしょう。
117
+
118
+
119
+ ### 特殊な記号
120
+
121
+ 特殊な振る舞いを起こす文字は、`:`・`^`・`!`・`[[`・`]]`の5種類です。
122
+
123
+
124
+ #### コロン記号
125
+
126
+ 前述の通り`:`記号はプロパティ名とプロパティ値を区切るために使います。
127
+
128
+ このため`content:":"`という表記はできません。
129
+
130
+ `content:"\03A"`のように文字エスケープを行ってください。
131
+
132
+
133
+ #### エクスクラメーション記号
134
+
135
+ `padding-top:1rem!`などのようにして、`!`記号をプロパティ値の末尾に付けると`!important`宣言をしたことになります。
136
+
137
+
138
+ #### サーカムフレックス記号
139
+
140
+ `^`記号はこのPostCSSプラグインにおいて半角スペースに自動変換されます。
141
+
142
+ 上述の`border:1px^#888^solid`など、ホワイトスペースで区切る必要がある場合に使用します。
143
+
144
+ 一括指定型プロパティだけでなく、演算記号の問題や、複数のプロパティ値を持つ場合、`//`の回避などに使うことができます。どういう事例を想定しているかはNo. 1から3を参照してください。
145
+
146
+
147
+ 1. 演算記号
148
+
149
+ `calc(100vw - 1rem)`などの算術関数の中で使われる演算記号(`+`・`-`・`*`・`/`)は、両端に空白記号を挿入する必要があります。空白記号を補うために`calc(100vw^-^1rem)`のようにしてください。
150
+
151
+
152
+ 2. 複数のプロパティ値
153
+
154
+ `filter:blur(5px) grayscale(80%)`などのような複数のプロパティ値を組み合わせることで効果を発揮する場合もあります。同様に空白記号を補うべく`filter:blur(5px)^grayscale(80%)`などと表してください。
155
+
156
+ 3. `//`の回避
157
+
158
+ ショートハンドを利用した特殊な記法として、`border-image: linear-gradient(#333,#333) fill 0 // 0 100vw`のようなものがあります。
159
+
160
+ > DOM要素の左右へ飛び出してビューポートの横幅いっぱいを塗りつぶすCSSトリックの一種です。
161
+
162
+ この中に`//`が含まれており、CSSにはブロックコメントアウトしか存在しないため問題ないのですが、SCSSでは一行コメントアウトとして機能してしまうため構文エラーを引き起こします。
163
+
164
+ > `/ /`のようにして半角スペースを補えば問題ないのですが、CSSの文法として成立する以上は考慮する必要がありました。
165
+
166
+ そのため`border-image:linear-gradient(#333,#333)^fill^0^/^/^0^100vw`のようにして空白記号に替わる`^`を補い、明示的に`/ /`だと表記してSCSS構文エラーを回避するのです。
167
+
168
+
169
+ #### 二重角括弧記号
170
+
171
+ なお実験的機能ではありますが、算術関数における演算子(`+`・`-`・`*`・`/`)の空白記号問題については別の解決方法も用意しています。
172
+
173
+ `width:calc(100vw^-^(100%^+^2rem)^*^2^+^1rem)`のような記述は視覚的ではないため、`[[`と`]]`に囲んだ中であれば`width:calc[[100vw-(100%+2rem)*(2)+1rem]]`としてサーカムフレックス記号を省くことができます。
174
+
175
+ > `var`関数など算術関数でないものに`[[`・`]]`記号は使わないでください。
176
+ >
177
+ > 例えば`var(--foo-bar)`が誤変換されて、`var(--foo - bar)`のようにして意味のないCSSへと破壊されてしまうためです。
178
+
179
+ しかし変換書式を改善中であるため、意図したように演算子の両端へ正常に空白記号が挿入されない可能性があります。
180
+
181
+ こうした場合でも`^`記号を補えば正常な算術関数へと修正できるのですが、より確実な手段としては`[[`・`]]`記号を使わず人力で`^`記号を補う方が間違いは少ないでしょう。
182
+
183
+
184
+ ### プロパティ名のショートハンド
185
+
186
+ いくつかのプロパティ名にはショートハンド定義がしてあります。
187
+
188
+ 例えば`border-top-width:1px`は`bw8:1px`と同義となります。
189
+
190
+ + margin
191
+ - `m`: margin
192
+ - `m8`: margin-top
193
+ - `m6`: margin-right
194
+ - `m2`: margin-bottom
195
+ - `m4`: margin-left
196
+ - `mx`: margin-left & margin-right
197
+ - `my`: margin-top & margin-bottom
198
+ + padding
199
+ - `p`: padding
200
+ - `p8`: padding-top
201
+ - `p6`: padding-right
202
+ - `p2`: padding-bottom
203
+ - `p4`: padding-left
204
+ - `px`: padding-left & padding-right
205
+ - `py`: padding-top & padding-bottom
206
+ + outline
207
+ - `o`: outline
208
+ - `o8`: outline-top
209
+ - `o6`: outline-right
210
+ - `o2`: outline-bottom
211
+ - `o4`: outline-left
212
+ - `ox`: outline-left & outline-right
213
+ - `oy`: outline-top & outline-bottom
214
+ + border-width
215
+ - `bw`: border-width
216
+ - `bw8`: border-top-width
217
+ - `bw6`: border-right-width
218
+ - `bw2`: border-bottom-width
219
+ - `bw4`: border-left-width
220
+ - `bwx`: border-left-width & border-right-width
221
+ - `bwy`: border-top-width & border-bottom-width
222
+ + border-style
223
+ - `bs`: border-style
224
+ - `bs8`: border-top-style
225
+ - `bs6`: border-right-style
226
+ - `bs2`: border-bottom-style
227
+ - `bs4`: border-left-style
228
+ - `bsx`: border-left-style & border-right-style
229
+ - `bsy`: border-top-style & border-bottom-style
230
+ + border-color
231
+ - `bc`: border-color
232
+ - `bc8`: border-top-color
233
+ - `bc6`: border-right-color
234
+ - `bc2`: border-bottom-color
235
+ - `bc4`: border-left-color
236
+ - `bcx`: border-left-color & border-right-color
237
+ - `bcy`: border-top-color & border-bottom-color
238
+ + border-radius
239
+ - `br`: border-radius
240
+ - `br7`: border-top-left-radius
241
+ - `br9`: border-top-right-radius
242
+ - `br3`: border-bottom-right-radius
243
+ - `br1`: border-bottom-left-radius
244
+ + color
245
+ - `ct`: color
246
+ - `cb`: background-color
247
+ + inset
248
+ - `i`: inset
249
+ - `i8`: top
250
+ - `i6`: right
251
+ - `i2`: bottom
252
+ - `i4`: left
253
+ + sizing
254
+ - `w`: width
255
+ - `wmin`: min-width
256
+ - `wmax`: max-width
257
+ - `h`: height
258
+ - `hmin`: min-height
259
+ - `hmax`: max-height
260
+ + grid position
261
+ - `gx`: grid-column
262
+ - `g4`: grid-column-start
263
+ - `g6`: grid-column-end
264
+ - `gy`: grid-row
265
+ - `g8`: grid-row-start
266
+ - `g2`: grid-row-end
267
+ + font
268
+ - `ff`: font-family
269
+ - `fs`: font-size
270
+ - `fw`: font-weight
271
+ - `fh`: line-height
272
+
273
+ `x`はleft & right、`y`はtop & bottomの意味です。
274
+
275
+ 数字の`1`から`9`が使われる理由はテンキーの配置を想像してみてください。
276
+
277
+
278
+ ## プラグインを使用する方法
279
+
280
+ ### gulpでの使い方
281
+
282
+ 動作サンプルを`test/gulp`フォルダに用意してあります。
283
+
284
+
285
+ #### package.json
286
+
287
+ ```powershell
288
+ npm init -y
289
+ ```
290
+
291
+ `package.json`ファイルの該当箇所を次のように書き換えます。
292
+
293
+ ```json
294
+ {
295
+ "type": "module",
296
+ "scripts": {
297
+ "clean": "gulp clean",
298
+ "build": "npm run clean && gulp",
299
+ "dev": "gulp dev"
300
+ }
301
+ }
302
+ ```
303
+
304
+ ```powershell
305
+ npm install autoprefixer browser-sync gulp gulp-plumber gulp-postcss gulp-sass postcss-csso postcss-enumerates-in-line sass
306
+ ```
307
+
308
+
309
+ #### Javascriptモジュール
310
+
311
+ `gulpfile.mjs`ファイルを作ります。
312
+
313
+ その中でもこのパッケージに関する処理だけを説明します。
314
+
315
+
316
+ ##### 読み込み処理
317
+
318
+ PostCSS本体や他のプラグインパッケージと同様に読み込みます。
319
+
320
+ ```javascript
321
+ // PostCSS
322
+ import postcss from 'gulp-postcss'
323
+ import autoprefixer from 'autoprefixer'
324
+ import csso from 'postcss-csso'
325
+ import { enumSpreader } from 'postcss-enumerates-in-line'
326
+ ```
327
+
328
+
329
+ ##### タスク処理
330
+
331
+ ```javascript
332
+ // CSS <- SCSS
333
+ const task_css = done => {
334
+ src('src/css/**/!(_)*.scss', {
335
+ allowEmpty: true,
336
+ })
337
+ .pipe(plumber())
338
+ .pipe(sass())
339
+ .pipe(postcss([
340
+ enumSpreader({}),
341
+ autoprefixer(),
342
+ csso(),
343
+ ]))
344
+ .pipe(dest('dist/css'))
345
+
346
+ done()
347
+ }
348
+ ```
349
+
350
+ PostCSS処理の配列の中に、`enumSpreader({})`関数を差し込みます。
351
+
352
+ > Sass (SCSS)の後に実行し、他のPostCSSプラグインよりも前に記述してください。
353
+
354
+ この関数は初期設定のまま利用する場合は空のオブジェクトを指定します。
355
+
356
+ 動作を変更したい場合は引数にオプション設定を加えます。
357
+
358
+ 設定内容は[オプション引数](#オプション引数)を参照してください。
359
+
360
+
361
+ #### サンプルのソースファイル
362
+
363
+ `src`・`src/css`・`src/js`・`dist`フォルダを作成し、`src/index.html`・`src/css/app.scss`・`src/js/app.js`ファイルを用意しました。
364
+
365
+ このパッケージの利用方法は、主に`src/css/app.scss`をご参照ください。
366
+
367
+
368
+ #### 実行
369
+
370
+ デバッグモードは`npm run dev`、ビルドモードは`npm run build`です。
371
+
372
+
373
+ ### JS-APIでの使い方
374
+
375
+ 動作サンプルを`test/postcss`フォルダに用意してあります。
376
+
377
+ #### package.json
378
+
379
+ ```powershell
380
+ npm init -y
381
+ ```
382
+
383
+ `package.json`ファイルの該当箇所を次のように書き換えます。
384
+
385
+ ```json
386
+ {
387
+ "type": "module",
388
+ "scripts": {
389
+ "clean": "node build-clean.mjs",
390
+ "common:copy": "node build-copy.mjs",
391
+ "build:css": "node build-css.mjs -- build",
392
+ "dev:css": "node build-css.mjs -- dev",
393
+ "build": "npm run clean && run-s common:* build:*",
394
+ "dev": "run-s common:* dev:*"
395
+ }
396
+ }
397
+ ```
398
+
399
+ ```powershell
400
+ npm install autoprefixer glob npm-run-all2 postcss postcss-csso postcss-enumerates-in-line sass
401
+ ```
402
+
403
+
404
+ #### Javascriptモジュール
405
+
406
+ `build-clean.mjs`・`build-copy.mjs`・`build-css.mjs`ファイルを作ります。
407
+
408
+ build-clean.mjsとbuild-copy.mjsはこのパッケージに直接関係するものではないため説明を省略します。
409
+
410
+
411
+ ##### 読み込み処理
412
+
413
+ 各種パッケージを読み込みます。
414
+
415
+ ```javascript
416
+ // Files
417
+ import fs from 'node:fs'
418
+ import { glob } from 'glob'
419
+ import path from 'node:path'
420
+
421
+ // SCSS
422
+ import * as dartSass from 'sass'
423
+
424
+ // PostCSS
425
+ import postcss from 'postcss'
426
+ import autoprefixer from 'autoprefixer'
427
+ import csso from 'postcss-csso'
428
+ import { enumSpreader } from 'postcss-enumerates-in-line'
429
+ ```
430
+
431
+
432
+ ##### タスク処理
433
+
434
+ ```javascript
435
+ const task = async () => {
436
+ const files = await glob('src/css/**/!(_)*.scss', {
437
+ ignore: 'node_modules/**',
438
+ })
439
+
440
+ files.forEach(file => {
441
+ const distPath = path.dirname(file).replace(/^src/, 'dist') + path.sep + path.basename(file).replace(/\.scss$/, '.css')
442
+
443
+ let body = fs.readFileSync(file, {
444
+ encoding: 'utf-8',
445
+ })
446
+
447
+ body = dartSass.compile(file).css.replace(/[\t\r\n\s]+/g, ' ')
448
+
449
+ postcss([
450
+ enumSpreader({}),
451
+ autoprefixer(),
452
+ csso(),
453
+ ])
454
+ .process(body, {from: file, to: distPath})
455
+ .then(res => {
456
+ fs.writeFileSync(res.opts.to, res.css)
457
+ })
458
+ })
459
+ }
460
+
461
+ task()
462
+ ```
463
+
464
+ PostCSS処理の配列の中に、`enumSpreader({})`関数を差し込みます。
465
+
466
+ > 他のPostCSSプラグインよりも前に記述してください。
467
+
468
+ この関数は初期設定のまま利用する場合は空のオブジェクトを指定します。
469
+
470
+ 動作を変更したい場合は引数にオプション設定を加えます。
471
+
472
+ 設定内容は[オプション引数](#オプション引数)を参照してください。
473
+
474
+
475
+ #### サンプルのソースファイル
476
+
477
+ `src`・`src/css`・`src/js`・`dist`フォルダを作成し、`src/index.html`・`src/css/app.scss`・`src/js/app.js`ファイルを用意しました。
478
+
479
+ このパッケージの利用方法は、主に`src/css/app.scss`をご参照ください。
480
+
481
+
482
+ #### 実行
483
+
484
+ デバッグモードは`npm run dev`、ビルドモードは`npm run build`です。
485
+
486
+
487
+ ## オプション引数
488
+
489
+ ### prependDefaultColor
490
+
491
+ 自動的に出力される色設定への対応内容。
492
+
493
+ 初期値: true (boolean|string)
494
+
495
+ `true`を設定した時(または何も設定しなかった時、あるいは`"hsl"`や`"HSL"`を設定した時)において、次のような色設定(HSL形式)がCSSに出力されます。
496
+
497
+ ```css
498
+ :root {
499
+ --enums-color-gray-100: hsl(210 5% 10%);
500
+ }
501
+ ```
502
+
503
+ これを`false`にすると、色設定は出力されません。
504
+
505
+ 初期状態のHSL形式でなく、RGB形式で出力させたい場合は`"rgb"` (string型; `"RGB"`でも可)と設定してください。
506
+
507
+ ```css
508
+ :root {
509
+ --enums-color-gray-100: #181a1b;
510
+ }
511
+ ```
512
+
513
+ また`"oklch"` (string型; `"OKLCH"`でも可)と設定した場合はOKLCH形式で出力します。
514
+
515
+ ```css
516
+ :root {
517
+ --enums-color-gray-100: oklch(0.21 0.01 210);
518
+ }
519
+ ```
520
+
521
+
522
+ ### prependDefaultStyle
523
+
524
+ 自動的に出力されるリセットCSS設定への対応内容。
525
+
526
+ 初期値: true (boolean|string[])
527
+
528
+ `true`を設定した時(または何も設定しなかった時)、次のようなリセットCSS設定がCSSに出力されます。
529
+
530
+ ```css
531
+ *, ::before, ::after, ::backdrop, ::file-selector-button {
532
+ box-sizing: border-box;
533
+ margin: 0;
534
+ padding: 0;
535
+ border: 0 solid;
536
+ }
537
+ ```
538
+
539
+ これを`false`にすると、リセットCSSの設定は出力されません。
540
+
541
+ ```javascript
542
+ prependDefaultStyle: [
543
+ 'a { color: red }',
544
+ 'a:hover { text-decoration: underline }',
545
+ ]
546
+ ```
547
+
548
+ `prependDefaultStyle`オプションにCSSブロック(string[]型)を記述すると、オリジナルのリセットCSSを追記することができます。
549
+
550
+ 追記するだけであって、このプラグインが最初から搭載しているリセットCSSの一部だけを除去することはできません。
44
551
 
45
- **Maintained for OIDC setup purposes only**
552
+ 完全に自己流のリセットCSSだけを出力したい場合は`prependDefaultStyle`オプションを`false`にした上で、SCSSファイルにその設定を記述してください。