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

Fix/prod styling bug #41

Merged
merged 3 commits into from
Jan 24, 2021
Merged

Fix/prod styling bug #41

merged 3 commits into from
Jan 24, 2021

Conversation

clairefro
Copy link
Collaborator

Addresses a docusaurus bug that was causing some styles to not render in production.

Problem and solution was discovered in this issue comment at docusaurus

Basically, any selectors in custom.css that include long docusaurus module names should instead use substring selectors (apprarently the modules are rendered differently in production)

example:

/* NO! This works in development but breaks in production */ 
.docTitle_node_modules-\@docusaurus-theme-classic-lib-next-theme-DocItem- {
  font-size: 2rem !important;
}

/* YES! This works in all environments */
[class^='docTitle'] {
  font-size: 2rem !important;
}

Now The codeblock and font styles are rendering in a local production bundle + serve

yarn build 
yarn serve

image

@cannikin
Copy link
Member

Nice! I'll still have to take another pass at some code syntax like the comments and see if the contrast is still acceptable, but this at least restores the initial changes.

@clairefro
Copy link
Collaborator Author

awesome, I am going to merge this so there is a clean working basis for those things

@clairefro clairefro merged commit 9d07052 into master Jan 24, 2021
@clairefro clairefro deleted the fix/prod-styling-bug branch January 24, 2021 21:56
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.

2 participants