Skip to content

Link decoration not showing up in lists #120

@tagd

Description

@tagd

Describe the bug
When adding links to items in a list block, the links don't inherit the expected styling.

To Reproduce

  1. Create a new blog post.
  2. Create a list section.
  3. Add a link to the list.
  4. See error

Expected behavior
I would expect the link to be stylised the same way they are in paragraphs.

Screenshots

Image

Image

Desktop (please complete the following information):

  • OS: Linux Mint Cinnamon 22.0
  • Browser: Firefox
  • Version 136.0.1

Additional context
Solved on an individual level by setting styling for list items to the sites color.
To see another user with this issue on wordpress forums here

Cause(So far as I understand)
In list items, the CSS for lists has higher specificity(ul li a 0, 0, 3) than the inline styling(a:where(:not(.wp-element-button) with 0,0,1) for links, which causes the styling to be inherited from the body rather than the theme.
When this is disabled, styling is fixed:
Image
I think the list section may be unnecessary, as color and text-decoration are inherited by default, so the re-declaration causes unintended effects. I've elaborated on specificity on WP forums answer, though I'd imagine you know a whole lot more about it than I do.

Thanks for making a great theme, hope this issue help improve it!

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions