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

Allow color customization through CSS variables in Gaia and Uncover theme #221

Merged
merged 4 commits into from
Apr 24, 2021

Conversation

yhatt
Copy link
Member

@yhatt yhatt commented Apr 17, 2021

Allowed color customization through CSS variables, in gaia theme and uncover theme.

Related: #209.

Usage

Gaia theme

---
theme: gaia
style: |
  :root {
    --color-background: #fff !important;
    --color-foreground: #333 !important;
    --color-highlight: #f96 !important;
    --color-dimmed: #888 !important;
  }
---

Uncover theme

---
theme: uncover
style: |
  :root {
    --color-background: #ddd;
    --color-background-code: #ccc;
    --color-background-paginate: rgba(128, 128, 128, 0.05);
    --color-foreground: #345;
    --color-highlight: #99c;
    --color-highlight-hover: #aaf;
    --color-highlight-heading: #99c;
    --color-header: #bbb;
    --color-header-shadow: transparent;
  }
---

!important is required to make custom colors force, against specified color via HTML class like invert and gaia.

ToDo

  • [ ] Default theme
    • Marp default theme is depending on github-markdown-css and it is not provided variables-based color defintion as like as GitHub's dark mode. Current invert class has many unique definitions against the current GitHub dark mode. It seems wise to wait for the support of variables used by GitHub.
  • Gaia theme
  • Uncover theme

@yhatt yhatt linked an issue Apr 24, 2021 that may be closed by this pull request
3 tasks
@yhatt yhatt marked this pull request as ready for review April 24, 2021 13:47
@yhatt yhatt merged commit 47eeae7 into main Apr 24, 2021
@yhatt yhatt deleted the css-variables-for-builtin-theme branch April 24, 2021 14:07
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