Skip to content

default style does not work immediately #71

Description

@Anxcye

I set a custom style through this code:

rendition.themes.default({
  'html': {
    'background-color': '#$backgroundColor',
    'color': '#$textColor',
  },
  'body': {
    'padding-top': '${style.topMargin}px !important',
    'padding-bottom': '${style.bottomMargin}px !important', 
    'line-height': '${style.lineHeight} !important',
    'letter-spacing': '${style.letterSpacing}px !important',
  },
  'p': {
    'padding-top': '${style.paragraphSpacing}px !important',
    'line-height': '${style.lineHeight} !important',
  },
  'pre':{

    'white-space': 'pre-wrap',
  },
  'img':{
    'max-width':'-webkit-fill-available !important',
  }
});

This can work normally. However, when switching chapters, there is a brief moment (about 100ms) where it does not use my set style, and then it uses my style, which will cause the interface to flicker. How can I solve this problem?
2024-04-29-16-23-22

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions