components icon indicating copy to clipboard operation
components copied to clipboard

Can't change height of toolbar-row. Fixed at 64px;

Open dfarago opened this issue 10 years ago • 4 comments

Trying to set the toolbar-row height to 50px; Setting the toolbar height works fine;

dfarago avatar Oct 11 '16 16:10 dfarago

It sounds like you're not turning ViewEncapsulation off in the component that uses the toolbar. If you do, the styles should work as expected.

@Component({
   ...
   encapsulation: ViewEncapsulation.None
})

If you're seeing a different issue, please open a new issue with some sample code (following the issue template helps us).

kara avatar Oct 11 '16 20:10 kara

@kara, this is not very nice and maintainable solution for all components, which I need to customize material styles for, with ViewEncapsulation.None encapsulaton and to force styles with !important suffix. It looks like CSS hacking to me.

It would be much better and cleaner solution to use toolbar SCSS variables, which have the !default moditier by the way, so they expect to be overwritten from outside:

$mat-toolbar-height-desktop: 64px !default;
$mat-toolbar-height-mobile-portrait: 56px !default;
$mat-toolbar-height-mobile-landscape: 48px !default;

But unfortunately the SCSS files for components are not accessible anymore, which is a pity and I would say a showstopper for some more serious customization.

moravcik avatar Oct 17 '17 15:10 moravcik

Hello guys ! I'm having the same issue and the solution @kara gave isn't really working with the heigth. Comment if something was founded.

stephane-segning avatar Apr 26 '18 13:04 stephane-segning

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.