Description
From @SanderElias on September 7, 2018 11:19
I'm submitting a...
[ X ] Feature request
[ X ] Documentation issue or request
Current behaviour
When you create a new component, by default it gets no setting for css display.
Expected behavior
it should have display:block
by default.
What is the motivation/use case for changing the behavior?
I know this has been discussed before (#5960), and pops up in (#12340) too.
Still, I'm putitng this back on the roll. For the following reasons:
- Current behaviour is confusing for new devs
- Devs need
display:block
most of the time (for me, its 99+%) - The web doesn't break if we put this in place.
- The expected impact of this "breaking" change is minimal
- Saves a few bits from the app's payload
- Less questions. no more, why does my css....
- One more thing less to remember when creating a component.
I want to elaborate on point 3 a bit. The same discussion has been held in by standarts committee, If you follow along that discussion you will see that the general consensus is that it is actually a good idea, but it can't be changed because that would break the web. Angular does not have that issue. Angular can change this, and the impact of the change would be minimal. probably something that has less impact as for example rxjs 5 to 6.
Others:
If we don't do this change, at least there should be more emphasis on this in the documentation.
Copied from original issue: angular/angular#25856