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 { }
I'm submitting a ...
Current behavior
Currently, if you have a
@Directivethat requires some custom styles you have to deal with the inclusion of styles, the@Directivedoes not acceptstylesandstyleUrls(and maybeencapsulation: None|Emulated).Expected behavior
The
DirectiveResolvershould acceptstyles,styleUrls(andencapsulation: None|Emulated) for the@Directivedecorator.What is the motivation / use case for changing the behavior?