Opened 4 years ago
Closed 4 years ago
#51910 closed enhancement (duplicate)
Use New CSS Scroll-Padding Feature to Account for Admin Bar When Deep Linking
Reported by: | Nyiriland | Owned by: | |
---|---|---|---|
Milestone: | Priority: | normal | |
Severity: | normal | Version: | 3.1 |
Component: | Toolbar | Keywords: | has-patch |
Focuses: | css | Cc: |
Description
It's been a long-standing annoyance with WordPress that when deep linking to content inside of a page, the fixed admin bar covers the first 32px of the linked content (or 46px on widths =< 782px).
To account for this, we should use the new CSS property of scroll-padding, to account for the fixed element eating up x amount of pixels of vertical screen.
The browser support is sufficient for usage: https://caniuse.com/?search=scroll-padding-top
Change History (7)
This ticket was mentioned in PR #782 on WordPress/wordpress-develop by Nyiriland.
4 years ago
#1
- Keywords has-patch added
github-actions[bot] commented on PR #782:
4 years ago
#2
Hi @Nyiriland! 👋
Thank you for your contribution to WordPress! 💖
It looks like this is your first pull request to wordpress-develop
. Here are a few things to be aware of that may help you out!
No one monitors this repository for new pull requests. Pull requests must be attached to a Trac ticket to be considered for inclusion in WordPress Core. To attach a pull request to a Trac ticket, please include the ticket's full URL in your pull request description.
Pull requests are never merged on GitHub. The WordPress codebase continues to be managed through the SVN repository that this GitHub repository mirrors. Please feel free to open pull requests to work on any contribution you are making.
More information about how GitHub pull requests can be used to contribute to WordPress can be found in this blog post.
Please include automated tests. Including tests in your pull request is one way to help your patch be considered faster. To learn about WordPress' test suites, visit the Automated Testing page in the handbook.
If you have not had a chance, please review the Contribute with Code page in the WordPress Core Handbook.
The Developer Hub also documents the various coding standards that are followed:
- PHP Coding Standards
- CSS Coding Standards
- HTML Coding Standards
- JavaScript Coding Standards
- Accessibility Coding Standards
- Inline Documentation Standards
Thank you,
The WordPress Project
Adding scroll-padding-top to the html to make scrolling to content much more enjoyable.
Trac ticket: https://core.trac.wordpress.org/ticket/51910