Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Nested list: <ul> margin-top with bold first element #277

Closed
davlgd opened this issue Feb 5, 2024 · 1 comment · Fixed by #280
Closed

Nested list: <ul> margin-top with bold first element #277

davlgd opened this issue Feb 5, 2024 · 1 comment · Fixed by #280

Comments

@davlgd
Copy link
Contributor

davlgd commented Feb 5, 2024

Description

As mentionned in #229 there is an issue in nested list rendering. The 0.7.2 fix wasn't complete, as it doesn't solve the problem when there are multiple nested lists.

Steps To Reproduce

  1. Create a nested list in a page
  2. Put bold on first-level elements of the list
  3. Serve

For example:

- **List 1** 
  - Item 1
  - Item 1 
- **List 2**
  - Item 1
  - Item 2
- **List 3**
  - Item 1
  - Item 2 

Screenshots

As you can see below, margin-top is too high (1.5em) even with Hextra 0.7.2, only first element is rendered right. On the contrary a margin-bottom could be nice:

image

If I replace margin-top: 1.5em by margin-bottom: 1.5em in inspect dev mode result seems better:

image

Environment

  • Hugo Version: [0.7.2]
  • Browser/OS: [Brave, Safari, macOS]
  • Theme Version: [e.g., v2.0]

Additional Context

@imfing
Copy link
Owner

imfing commented Feb 5, 2024

hi thanks for creating this issue.

we might need to update the CSS rule in my previous PR

#276

to

:where(ul, ol) > li > :where(ul, ol):not(:where([class~=not-prose], [class~=not-prose] *)) {
    @apply mt-0;
}

(replying from my phone, not sure if it would work)


CleverCloud/documentation#183

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants