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 lists do not indent #537

Closed
willcumbie opened this issue Dec 20, 2018 · 2 comments
Closed

Nested lists do not indent #537

willcumbie opened this issue Dec 20, 2018 · 2 comments

Comments

@willcumbie
Copy link

Bug Report

Nested unordered lists have identical indentation levels to the base list, making it difficult to visually distinguish them.

*The default style applies a padding of 0 to all <ul> elements. This overrides default CSS styling that would pad nested lists more than their containing lists. Additionally, since unordered lists receive the same class, regardless of whether they're nested or not, it's difficult to create custom themes that would fix this behavior. *

To Reproduce

  1. Create an indented list in your mdx file:
* Unordered list item
* Additional list item
    * Nested list item 1
    * Nested list item 2
* Final list item 
  1. Inspect the resulting HTML in your browser. You'll see that a nested <ul> element is correctly created, but that the styles make it difficult to distinguish from the parent list.

screen shot 2018-12-20 at 2 17 25 pm

Expected behavior

Nested lists should receive an additional class, and the default theme should add padding to that class, creating the expected visual differentiation.

Environment

  • OS: OSX 10.13.6
  • Node/npm version: Node 11/npm 6
@XANOZOID
Copy link

XANOZOID commented Feb 14, 2019

Until this is fixed, my workaround was to create a basic component which would do this for me (I actually just inlined the code, but I plan on making a reusable component if that's possible). The dumb way was just to add marginLeft, based on the starting count of spaces/tabs, per item. It's probably possible to keep the styling consistent, too, by importing the docz-CSS-module somehow. I didn't bother with that though.

@pedronauck
Copy link
Member

Fixed in the latest release canditate of v1

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

No branches or pull requests

3 participants