Skip to content

Light and dark themes in a custom format #4700

Answered by dragonstyle
juba asked this question in Q&A
Discussion options

You must be logged in to vote

Right now I don't know if a way to conditionalize this except to provide a number of output variants like:

_extension.yaml

contributes:
  formats:
    html:
       theme:
        light: [bookup.scss]
        dark: [bookup.scss, bookup_dark.scss]
    html+light:
       theme: bookup.scss
    html+dark:
       theme: [bookup.scss, bookup_dark.scss]
    html+prefer-dark:
       theme:
        dark: [bookup.scss, bookup_dark.scss]
        light: [bookup.scss]

The user would then have to use the format in the project/document to control the theme behavior. I think this should work...

Replies: 4 comments 1 reply

Comment options

You must be logged in to vote
0 replies
Answer selected by juba
Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
1 reply
@juba
Comment options

Comment options

You must be logged in to vote
0 replies
# for free to join this conversation on GitHub. Already have an account? # to comment
Category
Q&A
Labels
None yet
3 participants