documentation icon indicating copy to clipboard operation
documentation copied to clipboard

fix codeblock theme on landing page

Open bennobuilder opened this issue 4 years ago • 2 comments
trafficstars

for instance see video below

https://user-images.githubusercontent.com/57860196/108713445-87074e80-7518-11eb-957b-23903a1e21bc.mov

bennobuilder avatar Feb 22 '21 13:02 bennobuilder

https://github.com/facebook/docusaurus/issues/4258#issuecomment-784121925 might have something todo with (see above)

bennobuilder avatar Feb 23 '21 18:02 bennobuilder

// The Prism theme on SSR is always the default theme but the site theme // can be in a different mode. React hydration doesn't update DOM styles // that come from SSR. Hence force a re-render after mounting to apply the // current relevant styles. There will be a flash seen of the original // styles seen using this current approach but that's probably ok. Fixing // the flash will require changing the theming approach and is not worth it // at this point. https://github.com/facebook/docusaurus/blob/master/packages/docusaurus-theme-classic/src/theme/CodeBlock/index.tsx

bennobuilder avatar Feb 25 '21 06:02 bennobuilder