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
add theme-techbook-ja #7
Conversation
@@ -0,0 +1,504 @@ | |||
@charset "UTF-8"; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Could you include also SCSS source? When we publish the style file, we can omit SCSS files by specifying oh we don't need them because .npmignore
.files
is set in package.json
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
私もSCSSソースがテーマ・パッケージに含まれるべきだと思います。そのことに関連するissueを書きました:
How to customize the style of themes? #9
- テーマのパッケージにSass (scss)などスタイルシートのソースファイルが含まれている場合(その方法の定義も必要)、ソースファイルがコピーされて、ユーザーはそのscssファイル類を修正してカスタマイズしたうえで本のビルドやプレビューをできるようにする。
"vivliostyle", | ||
"vivliostyle-theme" | ||
], | ||
"license": "CC0-1.0", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please note that the license of this file becomes CC0 cc: @akabekobeko
} | ||
|
||
a[data-ref=sec]::before { | ||
content: target-counter(attr(href), section) "章"; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It seems this theme is designed for Japanese documents so I suppose it's better to rename this theme to such as @vivliostyle/theme-techbook-ja
, otherwise it should support multi-language.
html[lang=ja] a[data-ref=sec]::before {
content: target-counter(attr(href), section) "章";
}
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Renamed to "theme-techbook-ja".
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I like the idea of supporting multi-language in a single theme than separating them into multiple packages.
The downside of theme with language suffix is that the number of theme packages in npm could be bloated as it continues to support a new language, and it would make search experience worsen.
How about adding html[lang=<lang>]
selector to language specific style?
Note: also we have to add this scenario to the design guide.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Done: 8632aa0
02b9950
to
8632aa0
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I agree with the publication of the theme. I think that the design that branches the language by CSS definition is also good.
No description provided.