Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Integrate check functionality with new vivliostyle-theme #407

Closed
kenhys opened this issue May 20, 2023 · 3 comments
Closed

Integrate check functionality with new vivliostyle-theme #407

kenhys opened this issue May 20, 2023 · 3 comments

Comments

@kenhys
Copy link

kenhys commented May 20, 2023

It's not vivliostyle-cli itself problem, but it is helpful if there is checking functionality with a new vivliostyle-themes.

https://vivliostyle.org/ja/blog/2023/04/23/intro-new-themes/

image

For example, --vs--heading-font-size should not be --vs-heading-font-size.
It is useful if vivliostyle-cli emits a warning against such a failure.

@spring-raining
Copy link
Member

CSS variableはプログラミング言語の変数とは異なり、宣言と再代入を区別していないので、そのような静的解析を実装するのは本質的には困難です (--vs--heading-font-size を上書きしたいのか、--vs-heading-font-size というCSS variableを新しく作成したいのかが判断できない)。そのため、この問題を解決するには別のアプローチが良さそうです。

一つの案としては、定義済みのCSS variableをエディタでの補完機能として提供するという解決策はあります。例えば、VSCodeのプラグインとして提供するなどの方法は考えられます。

@MurakamiShinyu
Copy link
Member

一つの案としては、定義済みのCSS variableをエディタでの補完機能として提供するという解決策はあります。例えば、VSCodeのプラグインとして提供するなどの方法は考えられます。

これに関連して、VSCodeでCSS Paged Media関係のCSSの構文(@page :nth(1) {…} など)やVivliostyleでサポートしているCSSプロパティがエラー扱いになるのをなんとかしたいという問題もあります。
https://github.com/microsoft/vscode-css-languageservice
などに手を入れないとならないのかなと思ってましたが、VSCodeの拡張機能でできればそれがよいなと思います。

@kenhys
Copy link
Author

kenhys commented Jun 5, 2023

vivliostyle-cliではないレイヤで解決するのが筋がよさそうなのでクローズします。
ありがとうございました!

@kenhys kenhys closed this as completed Jun 5, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants