-
Notifications
You must be signed in to change notification settings - Fork 1.5k
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
accordion markup missing flexibility #2490
Comments
Something like this would do, probably needs a different class name though |
Could you show me an example of markup (both HTML & CSS) that you were using prior to the change. To be honest I don't really see what the change introduced in #2368 has broken for you. It was the same before. We basically replaced an So either I am missing your problem, or maybe it was already not doable .... |
Before the markup looked like this:
The chevron from the picture above could be styled as follows:
Not super-pretty by using
In order to have the chance to style the header based on the expansion state, I recommend adding a class like in my PR. |
Thank you for the explanation. Let me try to explain: Before, as you mentioned, we had an inline html element, the Now we have an extra block element, the So you can continue to do the exact same thing you were doing... .card-header button[aria-expanded=true]:after {
font: 18px/1 FontAwesome;
content: "\f078";
margin-top: 0;
float: right;
color: #fff;
} Previously, the Now, the Here is a Stackblitz showing you can do it in the same way. |
Trying to put a button or an anchor with a different action than toggle the content into the title(ngbPanelTitle) does not work in IE11 and firefox because of Content model for button: "Phrasing content, but there must be no interactive content descendant". Any clue on how to make this work? |
With the new accordion markup introduced by #2368, it is no longer possible to style the header based on its collapsed/expanded state.
Suppose one wants to add a chevron pointing right for closed and down for opened panes:
This would be appended to the
h5
element like this:With the new markup, there is no way to get the collapsed/expanded state at the level where style needs to be applied because it is only represented on the
button
child element. In the previous markup, there was aa
element which had the expanded style.In my view, ng-bootstrap should apply a class at the
.card-header
level to allow for such styling.The text was updated successfully, but these errors were encountered: