Make WordPress Core

Opened 3 months ago

Closed 4 weeks ago

#61130 closed defect (bug) (worksforme)

Twenty Twenty-Four: Bullet points are outside the surrounding box

Reported by: strukturdoktor's profile strukturdoktor Owned by:
Milestone: Priority: normal
Severity: normal Version: 6.5
Component: Bundled Theme Keywords: reporter-feedback needs-screenshots close
Focuses: Cc:

Description (last modified by sabernhardt)

Hi there,

I use WP 2024 Version 6.5.2 an 2024 Theme Version 1.1. I use standard bullet points in the List element. The bullet points are left outside the surrounding box, and depending on the other elements below they disappear.

I used following code in the custom css:

ul li {
 list-style-position:inside;
}

Then, the bullet points are more or less in the right position, but then some errors occur:

  • In the Block Editor the bullet point is on one line and the text is shown on the next line
  • In normal view mode, the bullet points and text is shown properly, but if there is an automatic line break, the text starts at the beginning of the new line and is not indented correctly

Attachments (4)

Bildschirmfoto 2024-05-02 um 21.15.45.png (204.6 KB) - added by strukturdoktor 3 months ago.
Bildschirmfoto 2024-05-02 um 21.17.01.png (91.3 KB) - added by strukturdoktor 3 months ago.
Bildschirmfoto 2024-05-09 um 10.36.07.png (81.8 KB) - added by strukturdoktor 3 months ago.
Bildschirmfoto 2024-05-09 um 10.36.20.png (83.6 KB) - added by strukturdoktor 3 months ago.

Download all attachments as: .zip

Change History (10)

#1 @poena
3 months ago

  • Component changed from Themes to Bundled Theme

#2 follow-up: @sabernhardt
3 months ago

  • Description modified (diff)
  • Keywords reporter-feedback needs-screenshots added

Hi and welcome to WordPress Core Trac!

The bullet points are left outside the surrounding box, and depending on the other elements below they disappear.

Could you share images and/or steps to reproduce your issues with the bullets disappearing (without any custom styles) in Twenty Twenty-Four?

if there is an automatic line break, the text starts at the beginning of the new line and is not indented correctly

When list items are set to list-style-position: inside, the text should wrap to the next line beneath the bullet point (list marker). If that is not the style you want, you probably would prefer increasing the padding on the list instead of editing list-style-position. For example, you could double the default indentation with something like this (specifically within the post content area, and not affecting nested lists):

.entry-content > ul {
  padding-left: 2rem;
}

In the Block Editor the bullet point is on one line and the text is shown on the next line

The editor has a rich text div element inside the List Item block, and that may need to retain the element's display: block default style. However, you could open an issue on the Gutenberg repository to consider changing that to display: inline for anyone else who might have the list marker's position set to inside.

#3 @SergeyBiryukov
3 months ago

  • Summary changed from WP 2024 Theme CSS Bug to Twenty Twenty-Four: Bullet points are outside the surrounding box

#4 in reply to: ↑ 2 @strukturdoktor
3 months ago

Hi,

I tried your suggestion with the padding, but it had no effect. I inserted it that way:
with the inside command:

ul li {
 list-style:square;
 list-style-position:inside;
}

.entry-content > ul {
  padding-left: 2rem;
}

Please find attached the two images. Especially in the first image you can see, that the bullet points are at the left side of the page. In the second image you can see the bullet points slightly outside the box. That would be ok for me.

I took the screenshots in Gutenberg Editor mode, but it looks the same on the website.

Last edited 3 months ago by strukturdoktor (previous) (diff)

#5 @karmatosed
4 weeks ago

  • Keywords close added

I admit, I am struggling to replicate this. I do think this might be specific to your setup @strukturdoktor which absolutely doesn't mean there isn't an issue but I think @sabernhardt is correct in suggesting this might need exploring within the editor itself not the theme.

The editor has a rich text div element inside the List Item block, and that may need to retain the element's display: block default style. However, you could open an issue on the Gutenberg repository to consider changing that to display: inline for anyone else who might have the list marker's position set to inside.

For now, unless we can replicate on the theme outside your setup I would recommend this is closed and then we have an issue opened within the editor for this issue.

#6 @karmatosed
4 weeks ago

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

For now, I am going to close this. We can always reopen. Thank you everyone.

Note: See TracTickets for help on using tickets.