Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: add camelCase ng-content selectors #5953

Merged
merged 2 commits into from
Jul 28, 2017
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion src/lib/card/card-header.html
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
<ng-content select="[md-card-avatar], [mat-card-avatar]"></ng-content>
<ng-content select="[md-card-avatar], [mat-card-avatar], [mdCardAvatar], [matCardAvatar]"></ng-content>
<div class="mat-card-header-text">
<ng-content
select="md-card-title, mat-card-title, md-card-subtitle, mat-card-subtitle,
Expand Down
4 changes: 2 additions & 2 deletions src/lib/grid-list/grid-tile-text.html
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
<ng-content select="[md-grid-avatar], [mat-grid-avatar]"></ng-content>
<div class="mat-grid-list-text"><ng-content select="[md-line], [mat-line]"></ng-content></div>
<ng-content select="[md-grid-avatar], [mat-grid-avatar], [mdGridAvatar], [matGridAvatar]"></ng-content>
<div class="mat-grid-list-text"><ng-content select="[md-line], [mat-line], [mdLine], [matLine]"></ng-content></div>
<ng-content></ng-content>
10 changes: 8 additions & 2 deletions src/lib/list/list-item.html
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,13 @@
</div>

<ng-content
select="[md-list-avatar],[md-list-icon], [mat-list-avatar], [mat-list-icon]"></ng-content>
<div class="mat-list-text"><ng-content select="[md-line], [mat-line]"></ng-content></div>
select="[md-list-avatar], [md-list-icon], [mat-list-avatar], [mat-list-icon],
[mdListAvatar], [mdListIcon], [matListAvatar], [matListIcon]">
</ng-content>

<div class="mat-list-text">

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

lines 12-14 have to be on one line so the ".mat-list-text:empty" css selector works.

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

A little more context: The :empty selector is used to set display:none on the mat-list-text div so it doesn't take up space in the flexbox container leaving no room for anything else. The actual text seems to come after that div rather than inside it.

https://github.com/angular/material2/blob/5bc97ec89462a2dc11fdeccf69ee41eadc265bd4/src/lib/list/list.scss#L80
https://github.com/angular/material2/blob/dcc857664c9313694d020845135f1ce63a66f43a/src/lib/core/style/_list-common.scss#L46

<ng-content select="[md-line], [mat-line], [mdLine], [matLine]"></ng-content>
</div>

<ng-content></ng-content>
</div>