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

Option to set class for top-level list #83

Open
egeesin opened this issue Apr 1, 2024 · 1 comment
Open

Option to set class for top-level list #83

egeesin opened this issue Apr 1, 2024 · 1 comment

Comments

@egeesin
Copy link

egeesin commented Apr 1, 2024

I'm looking for a way to set unique class for top-level list. In my own markup, I have different class at 2nd or deeper levels of ol/uls like below:

<nav class="containerClass">  
	<ul class="topListClass"> <!-- <-- An exception to linkClass option that I wish to set separately) -->
		<li class="itemClass">
			<a class="linkClass" href="#list-item">Top-Level List Item #1</a>
		</li>
		<li class="itemClass">
			<a class="linkClass" href="#list-item">Top-Level List Item #1</a>
			<ul class="submenuListClass"> <!-- <-- (i.e. I'd prefer to set this as default linkClass option for the rest of levels) -->
				<li>...</li>
				<li>...</li>
				<li ...>
					<a ...></a>
					<ul class="submenuListClass">...</ul> <!-- <-- -->
				</li>
				<li>...</li>
			</ul>
		</li>
		<li class="itemClass">
			<a class="linkClass" href="#list-item">Top-Level List Item #3</a>
		</li>
	</ul>
</nav>
@hunterpankey
Copy link

I also need something like this. I only need to stick the classes on the topmost ul, and using listClass applies to all the child lists, which is pushing some styles out to the right of the container because they're indented.

@egeesin Did you ever find a solution to this?

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

2 participants