Docsify: Associate CSS with sidebar sections

Created on 10 Oct 2018  路  10Comments  路  Source: docsifyjs/docsify

screen shot 2018-10-10 at 21 09 02

Hello,

I want to style different sidebar sections.

In the screenshot, notification correspond to a h4 in markdown and the rest are h5.

The problem I found is a css class is not associated with the markup generated in the sidebar, so I can't apply different style.

right now

<li class="">
  <a class="section-link" href="#/?id=notification">notification</a>
</li>

expected

<li class="">
  <a class="section-link sidebar-h4" href="#/?id=notification">notification</a>
</li>
pinned

All 10 comments

You can target h4 level subside bar element by using .sidebar-nav > ul > li > ul > li > ul > ul > ul > li.

not too intuitive 馃

It's not ideal, but meets the need.

Just what I needed, really into specify classname to elements

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

EH EH DONT CLOSE BRO

Please can you describe the issue you are requesting .
The screen shot is not showing. maybe the link expired.

Please check

ok please correct me if I am wrong

you want to add sidebar-h4 class to the li > a for sidebar-section ?

I opened an issue about making better markup for the sidebar, https://github.com/docsifyjs/docsify/issues/1181, before I saw this one.

I'll close this one in favor of the other one, where we can discuss more markup changes that in general can make the sidebar styling/theming more robust.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

patrickboulay picture patrickboulay  路  4Comments

dialex picture dialex  路  4Comments

Mohsens22 picture Mohsens22  路  4Comments

jhildenbiddle picture jhildenbiddle  路  4Comments

jhildenbiddle picture jhildenbiddle  路  3Comments