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

Override theme CSS by file #23

Merged
merged 2 commits into from
Sep 20, 2018
Merged

Override theme CSS by file #23

merged 2 commits into from
Sep 20, 2018

Conversation

yhatt
Copy link
Member

@yhatt yhatt commented Sep 19, 2018

This PR will support to override theme CSS at --theme option by file path.

--theme option may allow passing CSS file path in addition to the name of theme. The passed theme CSS is always used in all convertions even though theme was specified in Marp Markdown.

The notable point is that allows anonymous theme. Normally Marpit framework requires @theme metadata comment to theme CSS. But marp-cli will generate the unique name (like /* @theme ym2qyqimipqn2gfzjddbnrdrwrkb2vtkk3sjkdj0x */) for the theme CSS passed to --theme. It is useful when developing/debugging theme.

@import 'default';

section {
  background: #f93;
}
marp --theme theme.css slide.md

ToDo

  • Add tests for --theme option by file

It can override theme by CSS directly and accept anonymous theme.
(Override theme name by unique)
@yhatt yhatt merged commit a75b08b into master Sep 20, 2018
@yhatt yhatt deleted the theme-path branch September 20, 2018 00:25
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.

1 participant