Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Don't display the Symfony debug toolbar when printing the page#23460

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 ourterms of service andprivacy statement. We’ll occasionally send you account related emails.

Already on GitHub?Sign in to your account

Closed
javiereguiluz wants to merge3 commits intosymfony:2.8fromjaviereguiluz:fix_23303

Conversation

@javiereguiluz
Copy link
Member

QA
Branch?2.8
Bug fix?yes
New feature?no
BC breaks?no
Deprecations?no
Tests pass?yes
Fixed tickets#23303
LicenseMIT
Doc PR-

sstok and yceruto reacted with thumbs up emoji
@media print {
.sf-toolbar, .sf-error-toolbar {
display: none;
visibility: hidden;
Copy link
Contributor

Choose a reason for hiding this comment

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

what's the reason for this if there is alreadydisplay: none?

Copy link
MemberAuthor

Choose a reason for hiding this comment

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

It was in the original CSS rule ... but you are right and this is no longer needed (Bootstrap v4 doesn't use that either. Seehttps://github.com/twbs/bootstrap/blob/v4-dev/scss/_print.scss)

@xabbuhxabbuh added this to the2.8 milestoneJul 10, 2017
@stof
Copy link
Member

Actually, the issue is that the media query hiding the whole toolbar (error one or normal one) is missing now.
the 2.7 branch has this code before the error toolbar:

/***** Media query print: Do not print the Toolbar. *****/@media print {    .sf-toolbar {display: none;visibility: hidden;    }}

But the 2.8 branch does not seem to have it anymore.

I suspect a bad conflict resolution when merging branches


/***** Media query print: Do not print the Toolbar. *****/
@media print {
.sf-toolbar, .sf-error-toolbar {
Copy link
Member

Choose a reason for hiding this comment

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

.sf-error-toolbar is useless here, as the error toolbar also has thesf-toolbar class

yceruto reacted with thumbs up emoji
@nicolas-grekas
Copy link
Member

Thank you@javiereguiluz.

This was referencedJul 17, 2017
fabpot added a commit that referenced this pull requestOct 16, 2020
This PR was merged into the 3.4 branch.Discussion----------[WebProfilerBundle] Hide debug toolbar in print view| Q             | A| ------------- | ---| Branch?       | 3.4| Bug fix?      | yes| New feature?  | no| Deprecations? | no| License       | MITThe debug toolbar is intended to be hidden when printed. This was accomplished in 2.8 with [this PR](#23460). Since then, additional JavaScript code was added which results in `display: block` being applied directly to the toolbar element. This overrides the print style, which causes the toolbar to show up in the print view. I fixed this by adding `!important` to the print CSS display rule.A few notes:1. I hesitated to solve this with `!important` but couldn't come up with another way to make this work with the existing JavaScript code. Also, `profiler.css.twig` already has some `!important` styles, so I figured this was acceptable.2. I wasn't sure how to write a test for this, but I am open to ideas.Commits-------fb30516 [WebProfilerBundle] Hide debug toolbar in print view
Sign up for freeto join this conversation on GitHub. Already have an account?Sign in to comment

Reviewers

@stofstofstof requested changes

@xabbuhxabbuhxabbuh approved these changes

+1 more reviewer

@ostroluckyostroluckyostrolucky left review comments

Reviewers whose approvals may not affect merge requirements

Assignees

No one assigned

Projects

None yet

Milestone

2.8

Development

Successfully merging this pull request may close these issues.

6 participants

@javiereguiluz@stof@nicolas-grekas@ostrolucky@xabbuh@carsonbot

[8]ページ先頭

©2009-2025 Movatter.jp