WordPress.org

Make WordPress Core

Opened 5 months ago

Last modified 4 weeks ago

#51910 new enhancement

Use New CSS Scroll-Padding Feature to Account for Admin Bar When Deep Linking

Reported by: Nyiriland Owned by:
Milestone: Awaiting Review 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 (6)

This ticket was mentioned in PR #782 on WordPress/wordpress-develop by Nyiriland.


5 months ago

  • Keywords has-patch added

Adding scroll-padding-top to the html to make scrolling to content much more enjoyable.

Trac ticket: https://core.trac.wordpress.org/ticket/51910

#2 @prbot
5 months ago

github-actions[bot] commented on PR #782:

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:

Thank you,
The WordPress Project

#3 @georgestephanis
5 months ago

  • Version changed from trunk to 3.1

This ticket was mentioned in Slack in #core-css by georgestephanis. View the logs.


5 months ago

This ticket was mentioned in Slack in #core-css by sabernhardt. View the logs.


5 months ago

#6 @sabernhardt
4 months ago

Related/duplicate: #43452, #46371

Last edited 4 weeks ago by sabernhardt (previous) (diff)
Note: See TracTickets for help on using tickets.