Skip to content

[WebProfilerBundle] Fix css trick used for offsetting html anchor from fixed header #23296

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

Merged
merged 1 commit into from
Jul 3, 2017
Merged

[WebProfilerBundle] Fix css trick used for offsetting html anchor from fixed header #23296

merged 1 commit into from
Jul 3, 2017

Conversation

ogizanagi
Copy link
Contributor

Q A
Branch? 3.2
Bug fix? yes (minor DX)
New feature? no
BC breaks? no
Deprecations? no
Tests pass? yes
Fixed tickets N/A
License MIT
Doc PR N/A

The css trick used was incomplete (missing display: block;), which is probably why it has been changed in https://github.com/symfony/symfony/pull/22455/files#diff-7d417267ae50374356ab990c58233a9bR67.
Despite the current version works well, it behaves quite ugly specifically on Chrome:

Before After
juin-25-2017 18-07-01 juin-25-2017 18-07-26

For ref about the trick: https://stackoverflow.com/questions/10732690/offsetting-an-html-anchor-to-adjust-for-fixed-header/13184714#13184714

@fabpot
Copy link
Member

fabpot commented Jul 3, 2017

Thank you @ogizanagi.

@fabpot fabpot merged commit 9f9697a into symfony:3.2 Jul 3, 2017
fabpot added a commit that referenced this pull request Jul 3, 2017
… anchor from fixed header (ogizanagi)

This PR was merged into the 3.2 branch.

Discussion
----------

[WebProfilerBundle] Fix css trick used for offsetting html anchor from fixed header

| Q             | A
| ------------- | ---
| Branch?       | 3.2 <!-- see comment below -->
| Bug fix?      | yes (minor DX)
| New feature?  | no <!-- don't forget updating src/**/CHANGELOG.md files -->
| BC breaks?    | no
| Deprecations? | no <!-- don't forget updating UPGRADE-*.md files -->
| Tests pass?   | yes
| Fixed tickets | N/A <!-- #-prefixed issue number(s), if any -->
| License       | MIT
| Doc PR        | N/A

The css trick used was incomplete (missing `display: block;`), which is probably why it has been changed in https://github.com/symfony/symfony/pull/22455/files#diff-7d417267ae50374356ab990c58233a9bR67.
Despite the current version works well, it behaves quite ugly specifically on Chrome:

|Before|After|
|--|--|
|![juin-25-2017 18-07-01](https://user-images.githubusercontent.com/2211145/27517785-60cbd3a4-59d2-11e7-8e82-b8bb29ae15bb.gif)|![juin-25-2017 18-07-26](https://user-images.githubusercontent.com/2211145/27517786-60d165f8-59d2-11e7-9d9e-83aa2211041d.gif)|

For ref about the trick: https://stackoverflow.com/questions/10732690/offsetting-an-html-anchor-to-adjust-for-fixed-header/13184714#13184714

Commits
-------

9f9697a [WebProfilerBundle] Fix css trick used for offsetting html anchor from fixed header
@ogizanagi ogizanagi deleted the fix/3.2/profiler/anchor_offset branch July 3, 2017 06:57
This was referenced Jul 4, 2017
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
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.

4 participants