docsify icon indicating copy to clipboard operation
docsify copied to clipboard

Better markup for sidebar menu items

Open trusktr opened this issue 5 years ago • 0 comments

Feature request

The markup in the sidebar has uls, lis, ps, and as, but without any semantic classes.

I'd like to be able to more easily style the menu levels.

For example, to achieve something like this:

sidebar

What problem does this feature solve?

Currently, to do this, we have to write CSS like this:

ul > li > p {
  /* style first level */
}

ul > li > ul > li p {
  /* style second level */
}

/* etc */

What does the proposed API look like?

It may be cleaner to have classes, like

.menu-level1 {
  /* style first level */
}

.menu-level2 {
  /* style second level */
}

or similar. Thoughts?

trusktr avatar May 11 '20 05:05 trusktr