-
-
Notifications
You must be signed in to change notification settings - Fork 29
Open
Description
From #728 (comment):
指定したスタイルシートと同名のファイルがinputファイルの場所に存在する場合の問題
--styleオプションで指定したスタイルシートと同名のファイルがinputファイルの場所に存在する場合に、指定したスタイルシートではなく、inputファイルの場所に存在するスタイルシートが適用されてしまう問題があります。例:
$ tree . ├── content │ ├── index.html │ └── style.css └── style.css $ cat content/index.html <h1>Hello World!</h1> $ cat content/style.css h1 { color: red; } $ cat style.css h1 { color: green; } $ ../../vivliostyle-cli/dist/cli.js preview content/index.html --style style.css INFO Start preview Vivliostyle CLI v10.3.0 ║ 📘 Up and running (press Ctrl+C to quit) ╙─ Preview URL: http://localhost:13000/__vivliostyle-viewer/index.html#src=http://localhost:13000/vivliostyle/index.html&bookMode=true&renderAllPages=true&style=/vivliostyle/style.cssこの結果のプレビュー表示を見ると、カレントディレクトリの
style.cssではなく、contentディレクトリ内のstyle.cssが適用されていることがわかります。Preview URL で、
src=http://localhost:13000/vivliostyle/index.htmlとstyle=/vivliostyle/style.cssが同じディレクトリ/vivliostyle/にあるのが問題ではないかと思います。--style/--user-styleオプションで指定したスタイルシートは、別のディレクトリにホストされるべきではないでしょうか。
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels