Skip to content

Associate CSS with sidebar sections #643

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

Closed
Kikobeats opened this issue Oct 10, 2018 · 10 comments
Closed

Associate CSS with sidebar sections #643

Kikobeats opened this issue Oct 10, 2018 · 10 comments
Labels
pinned This is to pinned the PR/Issue in order to keep it open

Comments

@Kikobeats
Copy link
Contributor

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>
@cheng-kang
Copy link
Contributor

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

@Kikobeats
Copy link
Contributor Author

not too intuitive 🤔

@cheng-kang
Copy link
Contributor

It's not ideal, but meets the need.

@didiraja
Copy link

Just what I needed, really into specify classname to elements

@stale
Copy link

stale bot commented Feb 17, 2020

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.

@stale stale bot added the wontfix label Feb 17, 2020
@Kikobeats
Copy link
Contributor Author

EH EH DONT CLOSE BRO

@stale stale bot removed the wontfix label Feb 17, 2020
@anikethsaha anikethsaha added the pinned This is to pinned the PR/Issue in order to keep it open label Feb 17, 2020
@anikethsaha
Copy link
Member

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

Please check

@anikethsaha
Copy link
Member

ok please correct me if I am wrong

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

@trusktr
Copy link
Member

trusktr commented May 18, 2020

I opened an issue about making better markup for the sidebar, #1181, before I saw this one.

@trusktr
Copy link
Member

trusktr commented May 18, 2020

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.

@trusktr trusktr closed this as completed May 18, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
pinned This is to pinned the PR/Issue in order to keep it open
Projects
None yet
Development

No branches or pull requests

5 participants