Open
Description
I'm submitting a ...
[ ] Regression (behavior that used to work and stopped working in a new release)
[ ] Bug report
[x] Feature request
[ ] Documentation issue or request
[ ] Support request => Please do not submit support request here, instead see https://github.com/angular/angular/blob/master/CONTRIBUTING.md#question
Current behavior
Currently, if you have a @Directive
that requires some custom styles you have to deal with the inclusion of styles, the @Directive
does not accept styles
and styleUrls
(and maybe encapsulation: None|Emulated
).
Expected behavior
The DirectiveResolver
should accept styles
, styleUrls
(and encapsulation: None|Emulated
) for the @Directive
decorator.
What is the motivation / use case for changing the behavior?
/**
* Removes the spacing around an `md-list` component when it is a child of `md-card`.
*/
@Directive({
selector: 'md-list[my-md-list-in-card]',
styles: [`
md-list[my-md-list-in-card] {
.mat-list-item-content {
padding-left: 0 !important;
padding-right: 0 !important;
}
}
`]
})
export class MyMdListInCardStylerDirective { }