question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

List.Section and List.Item margins

See original GitHub issue

Is it possible to get rid of the margins when using List.Section / List.Item? see example image: image

I’d like to control the margin between items… I was trying different approaches with margin/padding but it didn’t work for me.

<List.Section style={{ margin: 0, padding: 0 }}>
      <List.Item style={{ margin: 0, padding: 0 }}>

Issue Analytics

  • State:closed
  • Created 3 years ago
  • Reactions:1
  • Comments:6 (1 by maintainers)

github_iconTop GitHub Comments

7reactions
longebanecommented, Nov 13, 2020

@Trancever are you sure? according to MD Lists specs there should be a divider, for sure, and list items should not have such margins between them

I agree. The margins are massive (and moreso that it isn’t editable). I think I can see the margins from outer space

5reactions
longebanecommented, Nov 13, 2020

Workaround for this arbitrary restriction is to wrap it with a <View> and give it negative marginVertical values

Read more comments on GitHub >

github_iconTop Results From Across the Web

Styling lists - Learn web development | MDN
The list items ( <li> elements) have no set defaults for spacing. The <dl> element has a top and bottom margin of 16px...
Read more >
Adding a margin to a single list item in a horizontal list
It seems changing the margin of a single item only works if the list has float: left to it, it is possible to...
Read more >
Styling Lists : MGA - Web Development Tutorials
Setting Margins for Unordered Lists ... Normally, unordered lists are indented a fixed number of pixels from the left margin. In certain cases,...
Read more >
CSS list-style-position property - W3Schools
list -style-position: inside; means that the bullet points will be inside the list item. As it is part of the list item, it...
Read more >
ListItem.Margin Property (System.Windows.Documents)
Gets or sets the margin thickness for the element. ... ListItem.Margin Property ... <Section Background="DarkMagenta" Margin="0" Padding="0"> <Paragraph ...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found