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

[docs] Fix branding theme leaking on the templates #28120

Merged
merged 1 commit into from Sep 3, 2021

Conversation

mnajdova
Copy link
Member

@mnajdova mnajdova commented Sep 3, 2021

This PR adds the MD theme on the templates so that the docs theme does not leak its styles on the templates.

@mui-pr-bot
Copy link

mui-pr-bot commented Sep 3, 2021

No bundle size changes (experimental)

Generated by 🚫 dangerJS against af0a14e

@mnajdova mnajdova merged commit ccb2506 into mui:next Sep 3, 2021
@oliviertassinari
Copy link
Member

oliviertassinari commented Sep 3, 2021

The alternative approach would have been to remove the custom them from the _app.js and to only apply it with the pages' top-level component. For instance, https://deploy-preview-28120--material-ui.netlify.app/performance/table-mui/ is not using the default theme, or say, if a maintainer would like to copy and paste a reproduction in an empty Next.js's page to work on it, he won't see the default theme either.

Oh actually, it might be what #28119 is doing, scoping the global theme provider away from _app.js

@oliviertassinari oliviertassinari added the docs Improvements or additions to the documentation label Sep 5, 2021
@oliviertassinari
Copy link
Member

oliviertassinari commented Sep 23, 2021

I'm hitting this pain again during the Lisbon company Hackathon. Our code behaves differently in a raw Next.js docs page compared to codesandbox. @mnajdova could have the _app.js barer? So that by default, the default theme is used?

@mnajdova
Copy link
Member Author

I'm hitting this pain again during the Hackathon. Our code behaves differently in a raw Next.js docs page compared to codesandbox. @mnajdova could have the _app.js barer? So that by default, the default theme is used?

Putting it on my TODO list.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
docs Improvements or additions to the documentation
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants