Skip to content

Conversation

@eak12913
Copy link
Contributor

@eak12913 eak12913 commented Nov 18, 2020

This PR fixes the visual issues on the guides pages where all of the code blocks were rendered improperly.

The root cause of the issue is that Prism is a library used for automatically syntax highlighting code in <code> blocks. This functionality was already being used by our Guides pages to render code. The new Landing Zone page also uses this library but wanted to provide a custom theme. The latter page introduction updated the css and unintentionally overrode the styles for Guides.

This PR brings back the notion of a "default" prism theme and then exposes a page variable that a page can set to have a custom prism theme on a per-page basis.

This PR fixes the visual issues on the guides pages where all of the code blocks were rendered improperly.

The root cause of the issue is that Prism is a library used for automatically syntax highlighting code in <code> blocks. This functionality was already being used by our Guides pages to render code. The new Landing Zone page also uses this library but wanted to provide a custom theme. The latter page introduction updated the css and unintentionally overrode the styles for Guides.

This PR brings back the notion of a "default" prism theme and then exposes a page variable that a page can set to have a custom prism theme on a per-page basis.
@netlify
Copy link

netlify bot commented Nov 18, 2020

Deploy preview for keen-clarke-470db9 ready!

Built with commit c502b08

https://deploy-preview-380--keen-clarke-470db9.netlify.app

Copy link
Contributor

@josh-padnick josh-padnick left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Awesome turnaround time on this!

@josh-padnick josh-padnick merged commit a9fd795 into master Nov 18, 2020
@josh-padnick josh-padnick deleted the fix-prism-css branch November 18, 2020 20:20
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.

3 participants