Making WordPress.org

Opened 4 years ago

Closed 3 years ago

Last modified 3 years ago

#6732 closed defect (bug) (fixed)

table of contents is width of longest link

Reported by: joyously Owned by:
Priority: normal Milestone:
Component: Developer Hub Keywords: has-screenshots
Cc:

Description

Some of the headings can be long, and the table of contents is not set to a max width, so the long heading can make the table wider than the page content.

It looks like CSS for max-width is needed.
See ​https://developer.wordpress.org/reference/functions/wp_enqueue_script/ for an example.

Attachments (1)

wp_enqueue_script() Function WordPress Developer Resources-01.jpg​ (81.1 KB ) - added by joyously 4 years ago.
table of contents is wider than page content

Download all attachments as: .zip

Change History (4)

@joyously
4 years ago

table of contents is wider than page content

#1 @dufresnesteven
4 years ago

I've tested this in the new theme (​https://github.com/WordPress/wporg-developer), which should be launched soon-ish, and this issue no longer exists there.

I'll leave this open for now but it shouldn't require any work.

#2 @coffee2code
3 years ago

  • Resolution → fixed
  • Status new → closed

Fixed in ​884ca0a on GitHub:

Prevent long links in ToC from making ToC too wide.

Props joyously.
Fixes #6732.

#3 @coffee2code
3 years ago

#7075 was marked as a duplicate.

Note: See TracTickets for help on using tickets.