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(cards): card title/subtitle support attribute selectors #4122

Merged
merged 1 commit into from
Apr 21, 2017
Merged
Show file tree
Hide file tree
Changes from all commits
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
3 changes: 2 additions & 1 deletion src/lib/card/card-header.html
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
<ng-content select="[md-card-avatar], [mat-card-avatar]"></ng-content>
<div class="mat-card-header-text">
<ng-content
select="md-card-title, mat-card-title, md-card-subtitle, mat-card-subtitle"></ng-content>
select="md-card-title, mat-card-title, md-card-subtitle, mat-card-subtitle,
[md-card-title], [mat-card-title], [md-card-subtitle], [mat-card-subtitle]"></ng-content>
</div>
<ng-content></ng-content>
3 changes: 2 additions & 1 deletion src/lib/card/card-title-group.html
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
<div>
<ng-content
select="md-card-title, mat-card-title, md-card-subtitle, mat-card-subtitle"></ng-content>
select="md-card-title, mat-card-title, md-card-subtitle, mat-card-subtitle,
[md-card-title], [mat-card-title], [md-card-subtitle], [mat-card-subtitle]"></ng-content>
</div>
<ng-content select="img"></ng-content>
<ng-content></ng-content>
4 changes: 2 additions & 2 deletions src/lib/card/card.ts
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ export class MdCardContent {}
* @docs-private
*/
@Directive({
selector: 'md-card-title, mat-card-title',
selector: 'md-card-title, mat-card-title, [md-card-title], [mat-card-title]',
host: {
'[class.mat-card-title]': 'true'
}
Expand All @@ -35,7 +35,7 @@ export class MdCardTitle {}
* @docs-private
*/
@Directive({
selector: 'md-card-subtitle, mat-card-subtitle',
selector: 'md-card-subtitle, mat-card-subtitle, [md-card-subtitle], [mat-card-subtitle]',
host: {
'[class.mat-card-subtitle]': 'true'
}
Expand Down
4 changes: 4 additions & 0 deletions src/lib/core/compatibility/compatibility.ts
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,8 @@ export class MdCompatibilityInvalidPrefixError extends MdError {
/** Selector that matches all elements that may have style collisions with AngularJS Material. */
export const MAT_ELEMENTS_SELECTOR = `
[mat-button],
[mat-card-subtitle],
[mat-card-title],
[mat-dialog-actions],
[mat-dialog-close],
[mat-dialog-content],
Expand Down Expand Up @@ -92,6 +94,8 @@ export const MAT_ELEMENTS_SELECTOR = `
/** Selector that matches all elements that may have style collisions with AngularJS Material. */
export const MD_ELEMENTS_SELECTOR = `
[md-button],
[md-card-subtitle],
[md-card-title],
[md-dialog-actions],
[md-dialog-close],
[md-dialog-content],
Expand Down