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

md-collapsible doesn't admit div in collapsible body #761

Open
miriamgonp opened this issue May 27, 2019 · 2 comments · May be fixed by #763
Open

md-collapsible doesn't admit div in collapsible body #761

miriamgonp opened this issue May 27, 2019 · 2 comments · May be fixed by #763

Comments

@miriamgonp
Copy link

Trying to use components inside the md-collapsible component, I've realized with the <p> tag you couldn't use <div> tag in the collapsible body because <p> doesn't admit <div> tag inside.

In order to allow this, we can change the <p> tag with a <div> tag.
What do you think about this solution?

<div> {{yield}} </div>

Shall I create a PR with the code?

<div class="collapsible-body"> 
    <p>{{yield}}</p>
</div> 
@jacobq
Copy link
Collaborator

jacobq commented May 28, 2019

I assume you mean something like this (keeping the CSS class name):

<div class="collapsible-header {{if active 'active'}}" onClick={{action "headerClicked"}}>
  {{#if icon}}
    {{bw-compat-icon icon}}
  {{/if}}

  {{title}}
</div>

<div class="collapsible-body">{{yield}}</div>

MaterializeCSS suggests <span> but that has the same problem as <p> in that it's an inline element.

@miriamgonp
Copy link
Author

Yes, That's exactly what I'm talking about.

@miriamgonp miriamgonp linked a pull request Jun 3, 2019 that will close this issue
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

Successfully merging a pull request may close this issue.

2 participants