Check out this Stackblitz demo that showcases a dialog with a radio group inside the mat-dialog-content div.
Notice how the dialog-content displays an unsightly scrollbar:
https://i.sstatic.net/gvqlH.png
This issue doesn't occur with other components, like input fields, for example.
By inspecting with chrome dev-tools, it's evident that the mat-radio-button
s have a height of 20px
:
https://i.sstatic.net/NNMsx.png
On the contrary, the mat-radio-group
has a height of only 17px
:
https://i.sstatic.net/Bk6aN.png
Could this be a bug within the angular material components (current version being 12.0.4
), or is there a simple CSS workaround to eliminate the scrollbar?
Attempts to manually set the height on the mat-radio-group
have proven ineffective.
Additional Details:
- When it comes to production, we frequently utilize dialogs, some of which are extensive and require scrollbars.
- We're in need of a universal solution or workaround for the application.
- Making the scrollbars invisible is not an option; they must remain set to
auto
to allow for dynamic changes to dialog size (such as device rotation, dynamic display of items, etc.)