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

Support breadcrumbs without ul/li #156

Closed
tom-asmblr opened this issue Aug 25, 2021 · 6 comments
Closed

Support breadcrumbs without ul/li #156

tom-asmblr opened this issue Aug 25, 2021 · 6 comments

Comments

@tom-asmblr
Copy link

Hello, apologies for the issue spam today.
I was wondering if it's worth extending the breadcrumbs to work without requiring the ul/li elements. I can take the core styles and adapt them to work for my own project, but just wanted to float the suggestion.

Thanks!

@saadeghi
Copy link
Owner

saadeghi commented Aug 25, 2021

@tom-acceleratecompliance May I ask why are you using some element other than ul and li ?
Because to me, a <ul> list seems like the best element for a list of links.

@tom-asmblr
Copy link
Author

Hi @saadeghi - 100% recognise this might be too much of an edge case to include in the library.

In our case, our breadcrumbs are automatically generated from the users requirements using custom svelte components, due to that we need the tag to be:

<svelte:component this={CustomClass} class="breadcrumbs">
  <svelte:component this={DifferentClass} class='breadcrumb-item'>
    Item 1
   </svelte>
</svelte:component>

This is the same reason for the request #151 - which again I fully understand is an odd requirement, however, with the emergence of web components it may be something that becomes more common.

Thanks!

@tom-asmblr
Copy link
Author

To follow on - lots of pushback in the svelte community to fix this at the svelte level, which would support:

<svelte:component this={CustomClass} type='ul'>

sveltejs/svelte#2324

But unfortunately still hasn't been actioned in the last year.

@saadeghi
Copy link
Owner

@tom-acceleratecompliance Does <svelte:component> create a new <div> or they just insert anything from the component file?
Looking at this example seems like you can have any tag inside the component and it just loads them. So something like this might work?

<ul>
  <svelte:component this={CustomClass}>
    <svelte:component this={DifferentClass}>
      <li>Item 1</li>
     </svelte>
  </svelte:component>
</ul>

@tom-asmblr
Copy link
Author

Ah sorry, you're 100% correct, we have some other restraints around how our visual builder works, but the combination of those 2 factors makes this well and truely a niche problem, sorry for wasting your time!

@saadeghi
Copy link
Owner

@tom-acceleratecompliance No problem. I'd be happy to help.

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