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

feat: hide devtools when printing #648

Merged
merged 3 commits into from Apr 30, 2024
Merged

feat: hide devtools when printing #648

merged 3 commits into from Apr 30, 2024

Conversation

anbraten
Copy link
Contributor

@anbraten anbraten commented Apr 8, 2024

Currently when printing a page in dev-mode with nuxt the holder to open the dev-tools will be printed as well which often results in additional empty pages containing just the holder.

Please let me know if I should adjust the approach to something else.

@antfu
Copy link
Member

antfu commented Apr 8, 2024

How about doing it with CSS directly?

@anbraten
Copy link
Contributor Author

anbraten commented Apr 8, 2024

Sure that would work as well. Any preferences where I should add it. Would add

@media print {
  #nuxt-devtools-container {
    display: none;
  }
}

@antfu
Copy link
Member

antfu commented Apr 8, 2024

You can put it here:

@anbraten
Copy link
Contributor Author

Added it to the suggested place and seems to work.

@antfu antfu merged commit 1be7b2d into nuxt:main Apr 30, 2024
1 check passed
@anbraten anbraten deleted the print branch April 30, 2024 13:11
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.

None yet

2 participants