Make WordPress Core

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's profile 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

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

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

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:

Thank you,
The WordPress Project

#3 @georgestephanis
4 years ago

  • Version changed from trunk to 3.1

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


4 years ago

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


4 years ago

#6 @sabernhardt
4 years ago

Related/duplicate: #43452, #46371

Last edited 4 years ago by sabernhardt (previous) (diff)

#7 @sabernhardt
4 years ago

  • Milestone Awaiting Review deleted
  • Resolution set to duplicate
  • Status changed from new to closed

Thanks for the patch! I added an updated version to #46371 so future discussion can stay on one ticket.

Note: See TracTickets for help on using tickets.