It should have space between them as they have in v5.0
Providing a StackBlitz reproduction is the best way to share your issue.
StackBlitz starter: https://goo.gl/wwnhMV
This has nothing to do with the buttons of angular material. The difference is, that Angular 6 changed preserveWhitespaces to false in the default.
This changes your generated HTML from something like this <button></button> <button></button> to <button></button><button></button> (observe the missing whitespace here)
For details read the Angular changelog found here: https://github.com/angular/angular/blob/master/CHANGELOG.md, specifically this point:
Yes it looks like we need to add :
@Component({preserveWhitespaces: true}) to have the space between buttons now.
Closing as this is likely the result of preserveWhitespaces
The problem for me is that I also created a css rule to add margin.
Of course it gets overridden by default material styling (yes, my rules are loaded after the material theme, but still).
I had to wrap all buttons in divs. Horrible.
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
Yes it looks like we need to add :
@Component({preserveWhitespaces: true}) to have the space between buttons now.
https://stackblitz.com/edit/angular-material2-issue-urtyjg