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

add theme-techbook-ja #7

Merged
merged 4 commits into from Jul 31, 2020
Merged

add theme-techbook-ja #7

merged 4 commits into from Jul 31, 2020

Conversation

MurakamiShinyu
Copy link
Member

No description provided.

@@ -0,0 +1,504 @@
@charset "UTF-8";
Copy link
Member

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 .npmignore. oh we don't need them because files is set in package.json

Copy link
Member Author

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",
Copy link
Member

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) "章";
Copy link
Member

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) "章";
}

Copy link
Member Author

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".

Copy link
Member

@uetchy uetchy Jul 30, 2020

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.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Done: 8632aa0

@spring-raining spring-raining changed the title add theme-techbook add theme-techbook-ja Jul 26, 2020
Copy link
Member

@akabekobeko akabekobeko left a 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.

@spring-raining spring-raining merged commit d3dd29b into master Jul 31, 2020
@spring-raining spring-raining deleted the theme-techbook branch July 31, 2020 01:58
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

Successfully merging this pull request may close these issues.

None yet

4 participants