Skip to content

[WebProfilerBundle] Fix anchor CSS #26230

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

Closed
wants to merge 3 commits into from
Closed

[WebProfilerBundle] Fix anchor CSS #26230

wants to merge 3 commits into from

Conversation

ro0NL
Copy link
Contributor

@ro0NL ro0NL commented Feb 19, 2018

Q A
Branch? 3.4
Bug fix? yes
New feature? no
BC breaks? no
Deprecations? no
Tests pass? yes/no
Fixed tickets #...
License MIT
Doc PR symfony/symfony-docs#...

Empty source lines overlap in /_profiler/open?file=x. AFAIK it's a regression after #23296, but it's the first time i noticed so maybe it's related to a chrome change in between. No real CSS expert.. but this seems to fix it.

Before:
image

After:
image

I can confirm both chrome and firefox render as shown in the after screenshot. Firefox worked before as well, chrome not.

cc @ogizanagi

@nicolas-grekas
Copy link
Member

nicolas-grekas commented Feb 19, 2018

does the anchor still work as expected ? ie anchoring to line 100 should create a top screen margin so that L100 is not hidden on the top of the screen, but has some offset before

@ro0NL
Copy link
Contributor Author

ro0NL commented Feb 19, 2018

you're right. Not sure what the quirk is but it needs to be a block element indeed.

Using inline-block fixes both the overlap as preserving top offset:

image

For /_profiler/open?file=src/Controller/MainController.php&line=9#line9.

But now there's this random space in both chrome and firefox:

image

Guess it's comes from a line break in source:

image

Can have a look at that.. but maybe some real CSS expert knows a better fix.

@ro0NL
Copy link
Contributor Author

ro0NL commented Feb 19, 2018

Now all good :)

@nicolas-grekas
Copy link
Member

Thank you @ro0NL.

nicolas-grekas added a commit that referenced this pull request Feb 19, 2018
This PR was squashed before being merged into the 3.4 branch (closes #26230).

Discussion
----------

[WebProfilerBundle] Fix anchor CSS

| Q             | A
| ------------- | ---
| Branch?       | 3.4
| Bug fix?      | yes
| New feature?  | no
| BC breaks?    | no
| Deprecations? | no
| Tests pass?   | yes/no
| Fixed tickets | #... <!-- #-prefixed issue number(s), if any -->
| License       | MIT
| Doc PR        | symfony/symfony-docs#... <!--highly recommended for new features-->

Empty source lines overlap in `/_profiler/open?file=x`. AFAIK it's a regression after #23296, but it's the first time i noticed so maybe it's related to a chrome change in between. No real CSS expert.. but this seems to fix it.

Before:
![image](https://user-images.githubusercontent.com/1047696/36377240-ba3f897a-1576-11e8-8660-8b04a6f7bd76.png)

After:
![image](https://user-images.githubusercontent.com/1047696/36377574-f99bd73a-1577-11e8-913c-d4287d5115a2.png)

I can confirm both chrome and firefox render as shown in the after screenshot. Firefox worked before as well, chrome not.

cc @ogizanagi

Commits
-------

ee45992 [WebProfilerBundle] Fix anchor CSS
@ro0NL ro0NL deleted the anchor-css branch February 19, 2018 16:59
This was referenced Mar 1, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants