Bug
Bootstrap grids should work inside an expansion panel
When trying to use bootstrap grids inside expansion panel to use the panel width, the line breaks in the last column
http://plnkr.co/edit/V2B5ISY0qE7L8QJbGxGF
Using bootstrap grids inside an expansion panel
Material beta.10
This is caused by bootstrap expecting that the entire page will have a box-sizing: border-box; and all items inherit this same rule.
From scaffolding.less:
* {
.box-sizing(border-box);
}
*:before,
*:after {
.box-sizing(border-box);
}
.mat-expansion-panel however defines box-sizing: content-box. You should be able to work around this by applying a css rule for your content in the panel that reestablishes box-sizing: border-box;.
I see ! Thanks for giving the work around. I have observed it is happening with other components too.
@josephperrott So what is the plan? will it resolve in next update or we have to set it manually every time.
@micronyks You will need to set it manually as it is simply a conflict in expectation from the bootstrap grid.
@josephperrott You saved my day.
- {
.box-sizing(border-box);
}
*:before,
*:after {
.box-sizing(border-box);
}
This is not working for me in Angular 8.1.1 and in component css file. I am using expansion panel into stepper.
Do I need to do something extra?
Can someone clarify (@josephperrott ?) why the expansion panels have a box-sizing: content-box ... ?
What are the cons for using content-box as a default value for the expansion panels?
I've set the .mat-expansion-panel class to box-sizing: inherit like this
.mat-expansion-panel {
box-sizing: inherit;
}
and it looks like everything is working correctly, which makes me wonder why the default value is content-box
There must be a good explantion for it :-)
I have tried to overwrite mat-classes but didn't work. Even I have tried @richardsengers solution. It shows applied css into browser developer tools but behaviour is still same.
I am using mat-expansion-panel into mat-vertical-stepper.
I used mat-grid-list to test and it works properly with it but on mobile screens it doesn't wrap content properly. Please provide if there is any anything else I would need to change anywhere.
Welll...my solution only works if no parent element has a box-sizing: content-box
Maybe that's the problem you are facing.
Try
.mat-expansion-panel {
box-sizing: border-box;
}
Welll...my solution only works if no parent element has a box-sizing: content-box
Maybe that's the problem you are facing.
Try.mat-expansion-panel { box-sizing: border-box; }
Thanks Richard, I tried it before reaching on Google and this thread but didn't work. It gets applied and doesn't change anything. Also Expansion panels are hiding content on mobile screens even after applying this style.
There is one more issue with HORIZONTAL(No option of Horizontal Orientation into mat-selection-lists) - There is no Above|Below checkBox position setting and doesn't wrap itself nor can define custom template with bootstrap.
This issue has been automatically locked due to inactivity.
Please file a new issue if you are encountering a similar or related problem.
Read more about our automatic conversation locking policy.
_This action has been performed automatically by a bot._
Most helpful comment
This is caused by bootstrap expecting that the entire page will have a
box-sizing: border-box;and all items inherit this same rule.From scaffolding.less:
.mat-expansion-panelhowever definesbox-sizing: content-box. You should be able to work around this by applying a css rule for your content in the panel that reestablishesbox-sizing: border-box;.