Skip to content

Commit

Permalink
feat(card): allow md-card-title and subtitle to be used as attributes (
Browse files Browse the repository at this point in the history
  • Loading branch information
willshowell authored and kara committed Apr 21, 2017
1 parent 7de316f commit a200024
Show file tree
Hide file tree
Showing 4 changed files with 10 additions and 4 deletions.
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

0 comments on commit a200024

Please sign in to comment.